vex_router 1.0.0 copy "vex_router: ^1.0.0" to clipboard
vex_router: ^1.0.0 copied to clipboard

The ultimate Flutter router. Navigation 2.0 done right — no code generation, no GetMaterialApp lock-in, full GetX controller binding support, type-safe routes, deep linking, guards, nested navigation, [...]

Changelog #

1.0.0 — 2025-05-30 #

🎉 Initial release #

Core

  • Full Navigation 2.0 (RouterDelegate + RouteInformationParser)
  • VexRouter — root router, zero dependencies beyond Flutter SDK
  • VexRoute — route definition with path params, guards, binding, transition
  • VexPage — custom Page<T> backing every navigation entry
  • VexRouteInfo — typed parameter carrier (path params, query params, extra)
  • VexNavigatorScopeInheritedWidget exposing navigator to widget tree
  • VexNavigator.of(context) — context-bound navigator
  • VexNavigator.root — global navigator, no BuildContext required
  • push, replace, pushAndClearStack, pushAndRemoveUntil
  • pop, popUntil, popToRoot, maybePop, canPop
  • pushPath — navigate by raw URL string with auto param extraction
  • showDialog / showBottomSheet — route as overlay

Typed results

  • VexResult<T> sealed class — VexOk<T>, VexErr<T>, VexCancelled<T>
  • .when(onOk, onErr, onCancelled) pattern matching
  • .valueOrNull, .isOk, .isErr, .isCancelled

Guards

  • VexGuard abstract interface
  • VexGuardAllow, VexGuardRedirect, VexGuardRedirectPath, VexGuardBlock
  • VexAuthGuard — ready-to-use auth guard with excluded routes
  • Global guards (applied to all routes)
  • Per-route guards (evaluated after global guards)

Controller Binding (GetX-compatible)

  • VexBinding abstract class — onInit / onDispose
  • VexInlineBinding — no-class inline init / dispose
  • VexMultiBinding — compose multiple bindings, reversed dispose order
  • VexControllerScopeStatefulWidget managing binding lifecycle
  • Works with GetX, Riverpod, Bloc, Provider, MobX — no hard dependency on any

Transitions (10 total)

  • material, cupertino, fade, scale, slideUp, slideLeft, slideRight, rotation, size, none, custom
  • Per-route transition override
  • Global defaultTransition on VexRouter
  • Custom transitionBuilder callback

Shell navigation

  • VexShell — persistent scaffold with IndexedStack tab state preservation
  • VexShellTab — per-tab root route, label, icon, activeIcon

Observer

  • VexObserveronNavigate, onPop, onGuardBlocked, onRedirect, onDeepLink
  • VexNopObserver — no-op base

Extensions

  • BuildContext extensions: vexPush, vexPop, vexReplace, vexPushAndClear, vexPushPath, currentRoute
  • String extensions: vexPush, vexReplace, vexPushAndClear

Error handling

  • Custom errorBuilder — shown when a route's builder throws
  • Custom notFoundBuilder — shown for unmatched URLs
  • Built-in default error and 404 screens

Other

  • Deep link / URL sync via PlatformRouteInformationProvider
  • Web URL bar sync
  • Platform back button / Android back gesture support
  • fullscreenDialog, maintainState, opaque per route
  • restorationId for state restoration
  • pageTitle for web document title
  • 40+ unit tests covering all public APIs
2
likes
150
points
0
downloads

Documentation

Documentation
API reference

Publisher

verified publishermysteriouscoder.com

Weekly Downloads

The ultimate Flutter router. Navigation 2.0 done right — no code generation, no GetMaterialApp lock-in, full GetX controller binding support, type-safe routes, deep linking, guards, nested navigation, and a simple API. Zero boilerplate. Zero compromises.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on vex_router