nav 2.1.0
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: aMaterialPageRoute, so a push follows the app'sPageTransitionsTheme(Android's predictive back and system transitions, the iOS slide with swipe back). For aDialogWidgetit is Material'sshowDialog. AswitchoverNavAnithat lists every value needs aNavAni.platformcase - Add route options to
Nav.push,pushReplacement,clearAllAndPush,pushResult,NavPathandNavPage:reverseDurationMs(closing time, defaultdurationMs),curve(default linear),settings(RouteSettings),fullscreenDialog,opaqueandmaintainState. Defaults keep the 2.0 behaviour.NavAni.platformand the iOSNavAni.rightuse the platform's timing, so the durations, curve andopaquedo not apply to them.pushFromRight/getPushRightRoutetakesettingsandfullscreenDialog - Add
Nav.pushRoute(route): push a route you built yourself on Nav's navigator NavPathDelegate.opennames the route with its link (RouteSettings(name: uri)) andonGenerateRoutekeeps the engine'sRouteSettings; before, deep link routes had no nameSlideRouteBuilder,FadeRouteBuilder,RippleRouteBuilder,BlinkRouteBuilderandCustomPageRouteBuildertake the same options;CustomPageRouteBuildergetsfullscreenDialogandreverseTransitionDurationNavAniExt.createRoutetakes the options as named arguments, and itscontextmay be null (onlyNavAni.ripplereads it, falling back to Nav's navigator)- Add
DialogWidget(animationDuration:, animationCurve:)and the same two arguments onshow()(which win for that showing): how long a dialog's transition runs, opening and closing, and its easing. The duration applies to everyNavAniincludingRipple; the curve applies to the slides andFade(Ripplehas its own reveal). Defaults are unchanged (Nav.defaultDialogDurationMs,dialogTransitionCurve);NavAni.Fadestays Material'sshowDialogfade 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 analignmentfailed an assertion in debug builds;RippleRouteBuilderacceptscenterOffsetalone again (asRoundRevealRoutedid in 1.x), andcenterOffsetis 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.0Pagewith Nav's transitions, forNavigator.pagesand routerpageBuilders such as go_router's. A page replaced with the same key shows its new child, andNavAni.rightkeeps the iOS swipe-back gesture unlessprohibitSwipeBackis 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:iomock site servingassetlinks.json/apple-app-site-association, plustool/open_link.shforadb/simctl), Navigator 2.0 samples (Navigator.pageswithNavPage, and go_router withNavPageandNav.pushon top), tests for each, and a realexample/README.mdfor 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:
NavPathDelegatematches App Links, Universal Links, custom schemes andpushNamednames againstNavPathpatterns (/product/:id) and opens the screen with the parsedNavPathParams(path + query parameters, typedgetInt/getDouble/getBool). Plug it intoMaterialApp.onGenerateRoute/onUnknownRoute, or callopen(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
childargument from the internal dialog builder (usebuilder) - Rename route builders to the
*RouteBuilderconvention - Support Flutter 3.41.9 (Dart 3.11.5): drop unreachable switch defaults, replace deprecated
withOpacitywithwithValues - Update README to the 2.0 API (typed
NavScreen/pushResult/ positionalpopResult) - Fix:
DialogWidget'suseSafeAreaparameter was ignored (it was initialized fromuseRootNavigator) - Fix:
ModalBottomSheet'sisScrollControlledparameter was ignored (show()hardcodedtrue); the parameter is now honored and its default istrueto preserve existing behavior - Test coverage raised to 100% (
ModalBottomSheetshow/hide/result,DialogWidget.isShownlifecycle) - BREAKING: implementation moved into
lib/src/— importpackage:nav/nav.dart(whole API) orpackage:nav/testing.dart(NavAppForTesting) instead of deep paths - BREAKING: the four slide route classes are unified into
SlideRouteBuilderwithfromLeft/fromRight/fromTop/fromBottomnamed constructors - BREAKING:
Nav.push/pushReplacement/clearAllAndPush/pushFromRight/pushWithRippleEffecttake a non-nullWidget - BREAKING:
Nav.canPop()is now a synchronousbool - Add
Nav.init(navigatorKey, setting: ...)as an explicit alternative to the mixin; using Nav before initialization now throws a descriptiveStateErrorinstead ofLateInitializationError - Add lowerCamelCase
NavAnialiases (NavAni.left, ...); uppercase values will be removed in 3.0 - Dialog/route transitions now share one implementation;
DialogWidget.isShownis 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