Skip to main content

tn_bottom_sheet_navigator 1.0.0 copy "tn_bottom_sheet_navigator: ^1.0.0" to clipboard
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 TnNavigator owns a TnNavigatorController (a ChangeNotifier, unit testable without widgets). Several sheets/dialogs can coexist.
  • Routes are passed per call (showTnBottomSheet(routes:, initialRoute:)) instead of TnRouter().setRoutes in main; arguments is an Object? instead of a Map.
  • showTnBottomSheet<T> returns the result given to context.tnClose(result); push<R> returns a Future completed by pop(result).
  • New navigation methods: replace, go, popUntil, popToRoot, plus context.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 + TickerMode instead of a 1px hack.
  • Unknown/duplicated paths fail fast with an ArgumentError.
  • TnBottomSheetScaffold child is flexible (scrollable content works), appBar optional, padding added. TnBottomSheetAppBar reacts 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 / showTnBottomSheetNavigator now return the sheet result (Future<T?>)
  • Add tnReplace, tnPopToRoot, tnClose([result]) and TnRouter.replace/popToRoot/stack
  • Add isDismissible (the misspelled isDismisable is deprecated) and backgroundColor, shape, barrierColor, showDragHandle settings
  • Fix: pages now get a unique key, so go to 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; setRoutes can 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
7
likes
150
points
52
downloads

Documentation

API reference

Publisher

verified publisherturneat.com.mx

Weekly Downloads

Modal bottom sheets and dialogs with their own internal navigation stack, animated transitions and a height that adapts to the visible page.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

buymeacoffee.com

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on tn_bottom_sheet_navigator