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

Modal sheets that slide in from the top, like an app bar dropdown. Awaitable, dismissible, with a configurable barrier, curves and duration.

1.0.0 #

The sheet is now a PopupRoute, so the framework owns the barrier and the transition instead of two hand-rolled AnimationControllers.

Breaking #

  • showModalTopSheet returns Future<T?> rather than void. Existing calls compile unchanged; the result can now be awaited.
  • customEaseInExpo and the curve_extension library are gone - the curves are parameters now.
  • ModalTopSheet no longer animates by itself; it is the layout the route builds. Push ModalTopSheetRoute to show a sheet yourself.

Added #

  • barrierColor, barrierLabel, duration, reverseDuration, curve, reverseCurve, padding, useSafeArea, useRootNavigator and routeSettings.
  • ModalTopSheetRoute, exported for pushing the sheet directly.

Fixed #

  • isDismissible: false refuses the system back gesture. It used to guard only the tap area below the sheet, so back closed the sheet regardless.
  • The sheet animates out on every path. Only the tap path reversed the animation; a back gesture removed the route with no transition at all.
  • The barrier is a real ModalBarrier with a semantics label, instead of a Scaffold whose background colour was tweened by a setState on every frame.
  • No more print on error, no BuildContext used across an async gap, and the deprecated onPopInvoked and withOpacity are gone.

Other #

  • Requires Dart 3.8 / Flutter 3.32; flutter_lints 6.
  • 12 tests, plus 2 in the example. The package previously shipped the default stub test.

0.0.2 #

  • pubspec description update.

0.0.1 #

  • Initial release.
1
likes
160
points
91
downloads

Documentation

API reference

Publisher

verified publisherbomsamdi.com

Weekly Downloads

Modal sheets that slide in from the top, like an app bar dropdown. Awaitable, dismissible, with a configurable barrier, curves and duration.

Repository (GitHub)
View/report issues

Topics

#modal #sheet #navigation #widget #ui

License

MIT (license)

Dependencies

flutter

More

Packages that depend on modal_top_sheet