tn_bottom_sheet_navigator 1.0.0
tn_bottom_sheet_navigator: ^1.0.0 copied to clipboard
Modal bottom sheets and dialogs with their own internal navigation stack, animated transitions and a height that adapts to the visible page.
1.0.0 #
Complete rewrite. Breaking, see the migration table in the README.
- No more global singleton: every
TnNavigatorowns aTnNavigatorController(aChangeNotifier, unit testable without widgets). Several sheets/dialogs can coexist. - Routes are passed per call (
showTnBottomSheet(routes:, initialRoute:)) instead ofTnRouter().setRoutesinmain;argumentsis anObject?instead of aMap. showTnBottomSheet<T>returns the result given tocontext.tnClose(result);push<R>returns a Future completed bypop(result).- New navigation methods:
replace,go,popUntil,popToRoot, pluscontext.tn*shortcuts. - Animated page transitions and height changes (
transitionDuration). - Pages get unique keys (no state leaking between pages of the same type) and offstage pages use
Offstage+TickerModeinstead of a 1px hack. - Unknown/duplicated paths fail fast with an
ArgumentError. TnBottomSheetScaffoldchild is flexible (scrollable content works), appBar optional,paddingadded.TnBottomSheetAppBarreacts to the stack by itself.- Dependencies removed:
equatable,mockito,build_runner. Requires Flutter >=3.22.
0.0.12 #
- Update dependencies (equatable 3, flutter_lints 6, mockito 5.8) and verify against Flutter 3.47
- Remove unnecessary library name
showTnBottomSheetNav/showTnBottomSheetNavigatornow return the sheet result (Future<T?>)- Add
tnReplace,tnPopToRoot,tnClose([result])andTnRouter.replace/popToRoot/stack - Add
isDismissible(the misspelledisDismisableis deprecated) andbackgroundColor,shape,barrierColor,showDragHandlesettings - Fix: pages now get a unique key, so
goto a page of the same type no longer reuses the previous page state - Fix: router stream is now broadcast with initial data (no "already listened" errors / missed first frame), and pushing after dispose no longer throws
- Fix: the router is no longer left as "opened" if showing the sheet throws;
setRoutescan be called again - Warn in debug when navigating to an unregistered path
- Perf: immutable stack snapshot only rebuilt on change, no per-build list copies,
MediaQuery.sizeOf
0.0.11 #
- Fix missing params prop in showTnBottomSheetNav method
0.0.10 #
- Fix deprecated method due to flutter 3.24 release
0.0.9 #
- Add TnNavigatorBuilder widget to be used in custom implementations (For example: Dialogs or CupertinoDialogs)
0.0.8 #
- Fix Android devices nav buttons navigation
0.0.7 #
- Update docs
0.0.6 #
- Change streambuild for an indexed stack to preserve pages state
0.0.5 #
- Add TnBottomSheetScaffold & TnBottomSheetAppBar
- Change example project to display new features
0.0.4 #
- Test Coverage at 93.8%
- Add missing docs
0.0.3 #
- Add Example project
- Fix Pub Sample Image
0.0.2 #
- Update Docs
0.0.1 #
- Initial release