FlutterFlow Docs
Search…
Actions
Actions help in handling user gestures inside the app. Some of the common Actions that you can define include On Tap, On Double Tap, On Long Press, On Submit, and so on.
You can define actions by going to the Actions tab present in the Properties Panel. As actions are applied on a particular widget, you need to select the widget on which to apply the Action (by default the Scaffold widget of the page is selected).
NOTE: Actions differ according to the widget selected. You can't apply any action on some of the widgets.

User Gestures

Most of the widgets can handle three basic types of user gestures for which you can trigger an Action, they are as follows:
    1.
    On Tap: handles the user gesture of a single tap
    2.
    On Double Tap: handles the user gesture of double tap
    3.
    On Long Press: handles the user gesture of tapping and holding for some time
The Scaffold widget doesn't allow you to handle any user gesture, so Actions can't be set on it.
Apart from these gestures, there is one more type of gesture called On Submit that can only be handled by a TextField widget. The action will get called when the user indicates that they are done editing the text of the field.
Let's take a look at the different types of Action that you can trigger based on the user gesture.

Types of Action

FlutterFlow allows you to trigger and customize various types of Action on any widget. A list of all the available Actions are as follows (you can navigate to the specific Action page to learn how to use it):
    ​Navigate: It allows you to either move to a different page or go back to a previous page within the app
    Backend Call: Use this to create, update or delete a record from a Firestore Collection, or trigger an API call
    Authentication: Triggers an authentication according to the type selected (eg. Login, Create Account, Phone Sign In, etc.)
    Algolia Search: Triggers an Algolia search on a Firestore Collection
    Launch URL: Use an external URL to launch a webpage, to send an email, to use a phone number, and a lot more
    Upload Photo/Video: To upload a photo or video to Firebase Storage from the camera/gallery
    Date/Time Picker: Opens up the Date/Time Picker widget
    Bottom Sheet: Opens up the Bottom Sheet widget
    Alert Dialog: Opens up an Alert Dialog widget
    Commerce: Triggers a payment Action integrated with Braintree/PayPal
    Share: Triggers the native sharing functionality of the device

Adding Multiple Actions

You can add multiple Actions to the same widget that is triggered using the same or different user gestures. If you are adding multiple Actions for the same user gesture, for say, you add two Actions for the On Tap gesture, then there's another concept you should know about.
You can order the Actions to specify which Action should be triggered first, followed by the next one, and so on. Simply click on the Up Arrow button (Move action up) to move it upwards or click on the Down Arrow button (Move action down) to move it downwards to order them. The one on the top will be triggered first followed by the rest.
Last modified 16d ago