modal_top_sheet 1.0.0
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 #
showModalTopSheetreturnsFuture<T?>rather thanvoid. Existing calls compile unchanged; the result can now be awaited.customEaseInExpoand thecurve_extensionlibrary are gone - the curves are parameters now.ModalTopSheetno longer animates by itself; it is the layout the route builds. PushModalTopSheetRouteto show a sheet yourself.
Added #
barrierColor,barrierLabel,duration,reverseDuration,curve,reverseCurve,padding,useSafeArea,useRootNavigatorandrouteSettings.ModalTopSheetRoute, exported for pushing the sheet directly.
Fixed #
isDismissible: falserefuses 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
ModalBarrierwith a semantics label, instead of aScaffoldwhose background colour was tweened by asetStateon every frame. - No more
printon error, noBuildContextused across an async gap, and the deprecatedonPopInvokedandwithOpacityare gone.
Other #
- Requires Dart 3.8 / Flutter 3.32;
flutter_lints6. - 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.