Benjamin Jaeger
Committed by GitHub

add curve property to bottomsheet

... ... @@ -21,6 +21,7 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> {
RouteSettings? settings,
this.enterBottomSheetDuration = const Duration(milliseconds: 250),
this.exitBottomSheetDuration = const Duration(milliseconds: 200),
this.curve,
}) : super(settings: settings) {
RouterReportManager.instance.reportCurrentRoute(this);
}
... ... @@ -38,6 +39,7 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> {
// final String name;
final Duration enterBottomSheetDuration;
final Duration exitBottomSheetDuration;
final Curve? curve;
// remove safearea from top
final bool removeTop;
... ... @@ -62,6 +64,15 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> {
}
@override
Animation<double> createAnimation() {
if (curve != null) {
return CurvedAnimation(
curve: curve!, parent: _animationController!.view);
}
return _animationController!.view;
}
@override
AnimationController createAnimationController() {
assert(_animationController == null);
_animationController =
... ...