Wait

Using this action, you can add a delay before executing another Action.

Adding Wait action

Follow the steps below to add this action to any widget.

  1. Select the Widget (e.g., Button) on which you want to add the action.

  2. Select Actions from the properties panel (the right menu), If it's the first action, click + Add Action button. Otherwise, click the "+" button below the previous action tile (inside Action Flow Editor) and select Add Action.

  3. Search and select the Wait (Delay) (under Utilities) action.

  4. Specify a Duration in milliseconds.

Here, the Snack Bar (Action 1) has 2000ms as the duration, and Wait (Action 2) is set to have the same duration of 2000ms. These two actions are followed by Navigate (Action 3). So, as soon as the user is navigated to the new screen, the Snack Bar dismisses.

Code Overview

You can view the code that we generate in the background by going to the Developer Menu > View Code from the Tool Bar.

References

  • Learn how to define Navigate action from here.

  • Know more about Future.delayed() from here.

  • Check out this page if you want to add multiple actions.

Last updated