imp_router 0.3.9 copy "imp_router: ^0.3.9" to clipboard
imp_router: ^0.3.9 copied to clipboard

Imperative navigation in flutter. For those who prefer imperative navigation but still want to benefit from Navigation 2.0 features.

example/README.md

Basic example #

Basic example app using imp_router.

  • Home page with tabs and a detail page pushed with FAB.
  • Path/query parameters and url parsing.
  • uri<->widget mappings for full browser support.
  • NotFound screen when
  • Android back button and browser nav buttons can switch tabs.

A bit more advanced example #

Showcasing some more advanced features. In addition to the basic example:

  • Use PopScope to block android back button
    • homePage requires two back button clicks before app is closed,
    • user page always blocks (including iOS back swipe)
  • Show a login page overlay, whenever user is not logged in.
  • Listen on navigation changes and print the new stack.
  • web: Preserve state when back-navigating, illustrated through text fields.
  • Push multiple pages, then pop them all, back to home (ImpRouter.pushNewStack).
  • Use custom animations, including ContainerTransformPageTransitionsBuilder.
  • usePathUrlStrategy to get rid of '#' in url.
  • A technic to get statically typed uri mappings etc, with the enum NavTarget.
1
likes
150
points
30
downloads

Publisher

verified publishermartinsellergren.dev

Weekly Downloads

Imperative navigation in flutter. For those who prefer imperative navigation but still want to benefit from Navigation 2.0 features.

Repository (GitHub)
View/report issues

Topics

#imp-router #router #navigator

Documentation

API reference

License

MIT (license)

Dependencies

animations, collection, flutter, flutter_web_plugins, meta, provider, rxdart

More

Packages that depend on imp_router