await_route 0.0.1 copy "await_route: ^0.0.1" to clipboard
await_route: ^0.0.1 copied to clipboard

Utility to await route transitions.

Await Route #

Convenience helper for awaiting route animation to finish.

This allows animating in keyboards, when a page with a form is opened, or deferring expensive animations and other work.

Example #

class ExampleWidgetState extends State<ExampleWidget> {
  var _didHandleInitialDependencies = false;

  @override
  void didChangeDependencies() {
    if (_didHandleInitialDependencies) return;

    // Focuses first input field and opens the keyboard, after the route has
    // finished animation.
    AwaitRoute.of(context).then(() => focusKeyboardOrSomething());
  }
}
0
likes
130
pub points
3%
popularity

Publisher

verified publishervolskaya.dev

Utility to await route transitions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

async, flutter

More

Packages that depend on await_route