Skip to main content

nav 2.1.0 copy "nav: ^2.1.0" to clipboard
nav: ^2.1.0 copied to clipboard

Provide easy way to navigate. Includes lots of routers. You can use this library on Android & iOS.

2.1.0 - 2026-11-05 #

  • Add NavAni.platform: a MaterialPageRoute, so a push follows the app's PageTransitionsTheme (Android's predictive back and system transitions, the iOS slide with swipe back). For a DialogWidget it is Material's showDialog. A switch over NavAni that lists every value needs a NavAni.platform case
  • Add route options to Nav.push, pushReplacement, clearAllAndPush, pushResult, NavPath and NavPage: reverseDurationMs (closing time, default durationMs), curve (default linear), settings (RouteSettings), fullscreenDialog, opaque and maintainState. Defaults keep the 2.0 behaviour. NavAni.platform and the iOS NavAni.right use the platform's timing, so the durations, curve and opaque do not apply to them. pushFromRight / getPushRightRoute take settings and fullscreenDialog
  • Add Nav.pushRoute(route): push a route you built yourself on Nav's navigator
  • NavPathDelegate.open names the route with its link (RouteSettings(name: uri)) and onGenerateRoute keeps the engine's RouteSettings; before, deep link routes had no name
  • SlideRouteBuilder, FadeRouteBuilder, RippleRouteBuilder, BlinkRouteBuilder and CustomPageRouteBuilder take the same options; CustomPageRouteBuilder gets fullscreenDialog and reverseTransitionDuration
  • NavAniExt.createRoute takes the options as named arguments, and its context may be null (only NavAni.ripple reads it, falling back to Nav's navigator)
  • Add DialogWidget(animationDuration:, animationCurve:) and the same two arguments on show() (which win for that showing): how long a dialog's transition runs, opening and closing, and its easing. The duration applies to every NavAni including Ripple; the curve applies to the slides and Fade (Ripple has its own reveal). Defaults are unchanged (Nav.defaultDialogDurationMs, dialogTransitionCurve); NavAni.Fade stays Material's showDialog fade unless one of them is given
  • Example: Dialog animation (pick NavAni, duration and curve), Per-show animation (show(animationDuration:) over the constructor's) and Route options samples, with tests

2.0.1 - 2026-10-26 #

  • Fix: Nav.pushWithRippleEffect(screen, offset: ...) without an alignment failed an assertion in debug builds; RippleRouteBuilder accepts centerOffset alone again (as RoundRevealRoute did in 1.x), and centerOffset is now optional
  • Fix: a ripple with an AlignmentDirectional (e.g. AlignmentDirectional.bottomEnd) threw a type error; directional alignments are now resolved against the ambient text direction
  • Add NavPage: a Navigator 2.0 Page with Nav's transitions, for Navigator.pages and router pageBuilders such as go_router's. A page replaced with the same key shows its new child, and NavAni.right keeps the iOS swipe-back gesture unless prohibitSwipeBack is set
  • Document using Nav.push, dialogs and bottom sheets under a router (Nav.init(router's navigatorKey)), tested with go_router
  • Fix the broken "contributing guide" link in the README
  • Example: a deep link tester (in-app WebView on a dart:io mock site serving assetlinks.json / apple-app-site-association, plus tool/open_link.sh for adb/simctl), Navigator 2.0 samples (Navigator.pages with NavPage, and go_router with NavPage and Nav.push on top), tests for each, and a real example/README.md for pub.dev's Example tab
  • CI fails if the pana (pub.dev score) report drops below the maximum

2.0.0 - 2026-10-26 #

First stable 2.0 release. It includes everything in 2.0.0-release-candidate-1 below; 1.x users should read "Migrating from 1.x" in the README.

  • Add deep link support: NavPathDelegate matches App Links, Universal Links, custom schemes and pushNamed names against NavPath patterns (/product/:id) and opens the screen with the parsed NavPathParams (path + query parameters, typed getInt/getDouble/getBool). Plug it into MaterialApp.onGenerateRoute/onUnknownRoute, or call open(uri) directly
  • Add a "Migrating from 1.x" guide to the README: deep imports, renamed route classes, removed members with their replacements, and behavior changes
  • Note on 2.0 removals: the members deprecated in 1.4.3 said they would be removed in 3.0. They were removed in 2.0 instead, so 1.x users migrate once rather than twice; the README guide lists each one with its replacement
  • Publish to pub.dev from GitHub Actions on a v<version> tag (OIDC, guarded by tag/pubspec/changelog agreement, analyze, test and a publish dry run); add a CI workflow for format, analyze, the example app and publishability

2.0.0-release-candidate-1 - 2024-02-05 #

  • Remove deprecated functions & constants
  • Remove the deprecated child argument from the internal dialog builder (use builder)
  • Rename route builders to the *RouteBuilder convention
  • Support Flutter 3.41.9 (Dart 3.11.5): drop unreachable switch defaults, replace deprecated withOpacity with withValues
  • Update README to the 2.0 API (typed NavScreen / pushResult / positional popResult)
  • Fix: DialogWidget's useSafeArea parameter was ignored (it was initialized from useRootNavigator)
  • Fix: ModalBottomSheet's isScrollControlled parameter was ignored (show() hardcoded true); the parameter is now honored and its default is true to preserve existing behavior
  • Test coverage raised to 100% (ModalBottomSheet show/hide/result, DialogWidget.isShown lifecycle)
  • BREAKING: implementation moved into lib/src/ — import package:nav/nav.dart (whole API) or package:nav/testing.dart (NavAppForTesting) instead of deep paths
  • BREAKING: the four slide route classes are unified into SlideRouteBuilder with fromLeft/fromRight/fromTop/fromBottom named constructors
  • BREAKING: Nav.push/pushReplacement/clearAllAndPush/pushFromRight/pushWithRippleEffect take a non-null Widget
  • BREAKING: Nav.canPop() is now a synchronous bool
  • Add Nav.init(navigatorKey, setting: ...) as an explicit alternative to the mixin; using Nav before initialization now throws a descriptive StateError instead of LateInitializationError
  • Add lowerCamelCase NavAni aliases (NavAni.left, ...); uppercase values will be removed in 3.0
  • Dialog/route transitions now share one implementation; DialogWidget.isShown is a getter and double-show() of one instance is guarded
  • Stop tracking generated coverage/ output in git

1.4.3 - 2024-02-05 #

  • Add test cases for various scenarios. (for a feature/nav_2.0 the coverage is 100%)
  • deprecate some anti pattern methods

1.4.2 - 2023-09-10 #

  • export NavAni enum

1.4.1 - 2023-09-10 #

  • allow to change offset with dx, dy

1.4.0 - 2023-09-10 #

  • change param name of pushWithRippleEffect
  • add durationMs

1.3.9 - 2023-05-24 #

  • make useSafeArea default value false

1.3.8 - 2023-05-12 #

  • fix useRootNavigator bug

1.3.7 - 2023-05-12 #

  • add nav setting to manage app global setting

1.3.6 - 2023-05-11 #

  • change to dialog context nullable.

1.3.4 - 2023-05-11 #

  • add nav app for testing

1.3.3 - 2023-05-10 #

  • open globalKey setter

1.3.2 - 2023-05-10 #

  • support useRootNavigator option for Dialog

1.3.1 - 2023-03-18 #

  • remove context from dialog

1.3.0 - 2023-03-17 #

  • add key on stateless widget
  • move dialog parameter to constructor
  • dart 2.17

1.2.0 - 2023-02-28 #

  • remove onHide dependency for dialog
  • support android v2

1.1.9 - 2023-02-28 #

  • add exception for unmounted statefulElement

1.1.8 - 2023-02-22 #

  • hide bottom sheet handle if it is not enabled

1.1.7 - 2023-02-22 #

  • resource organize

1.1.6 - 2023-02-22 #

  • add modal bottom sheet

1.1.5 - 2023-02-03 #

  • solve generic router problem

  • Dart format

1.1.4 - 2023-01-09 #

  • Dart format

1.1.3 2022-05-20. #

  • Generic type on show method

1.1.2 - 2022-05-20 #

  • Add return type for dialog widget

1.1.1 - 2022-05-20 #

  • Add return type for dialog widget

1.1.0 - 2022-05-20 #

  • flutter 3.0 fix

1.0.9 - 2022-02-28 #

  • fix NPE on get navigatorState

1.0.8 - 2022-02-28 #

  • fix NPE
  • remove unused imports

1.0.7 - 2021-07-29 #

  • fix warnings

1.0.6 - 2021-07-19 #

  • fix build bug

1.0.5 - 2021-07-19 #

  • nullable for widget

1.0.4 - 2021-07-16 #

  • Support barrier color to other animations

1.0.3 - 2021-07-12 #

  • Change Sample code

1.0.2 - 2021-07-09 #

  • Dart format

1.0.1 - 2021-07-09 #

  • Add Bottom sheet dialog example

1.0.0 - 2021-07-09 #

  • Support Null Safety

0.3.3 - 2020-12-27 #

  • Add Support Web
  • remove dart:io dependency

0.2.9 - 2020-12-26 #

  • Remove unused param

0.2.8 - 2020-12-26 #

  • Add Context in abstract class.

0.2.7 - 2020-12-26 #

  • Remove needless code.

0.2.6 - 2020-11-18 #

  • Add MutableValue to avoid Lint Check

0.2.5 - 2020-11-18 #

  • Fix dialog hide bug (context reference))

0.2.4 - 2020-11-09 #

  • Add MutableValue to avoid Lint Check

0.2.3 - 2020-11-06 #

  • Add Default duration value

0.2.2 - 2020-11-06 #

  • Support Cupertino Route on NavAni.Right.

0.2.1 - 2020-10-29 #

  • Add result param on hide method.

0.2.0 - 2020-10-29 #

  • Support barrierDismissible, barrierColor

0.1.9 - 2020-10-28 #

  • Fix dialog bug

0.1.8 - 2020-10-28 #

  • Export dialog state

0.1.7 - 2020-10-27 #

  • Apply Dartfmt

0.1.6 - 2020-10-27 #

  • Add Nav.clearAll method
  • Add support DialogWidget
14
likes
150
points
1.35k
downloads

Documentation

API reference

Publisher

verified publisherbansook.xyz

Weekly Downloads

Provide easy way to navigate. Includes lots of routers. You can use this library on Android & iOS.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter, meta

More

Packages that depend on nav