Showing
1 changed file
with
11 additions
and
0 deletions
@@ -21,6 +21,7 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { | @@ -21,6 +21,7 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { | ||
21 | RouteSettings? settings, | 21 | RouteSettings? settings, |
22 | this.enterBottomSheetDuration = const Duration(milliseconds: 250), | 22 | this.enterBottomSheetDuration = const Duration(milliseconds: 250), |
23 | this.exitBottomSheetDuration = const Duration(milliseconds: 200), | 23 | this.exitBottomSheetDuration = const Duration(milliseconds: 200), |
24 | + this.curve, | ||
24 | }) : super(settings: settings) { | 25 | }) : super(settings: settings) { |
25 | RouterReportManager.instance.reportCurrentRoute(this); | 26 | RouterReportManager.instance.reportCurrentRoute(this); |
26 | } | 27 | } |
@@ -38,6 +39,7 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { | @@ -38,6 +39,7 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { | ||
38 | // final String name; | 39 | // final String name; |
39 | final Duration enterBottomSheetDuration; | 40 | final Duration enterBottomSheetDuration; |
40 | final Duration exitBottomSheetDuration; | 41 | final Duration exitBottomSheetDuration; |
42 | + final Curve? curve; | ||
41 | // remove safearea from top | 43 | // remove safearea from top |
42 | final bool removeTop; | 44 | final bool removeTop; |
43 | 45 | ||
@@ -62,6 +64,15 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { | @@ -62,6 +64,15 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { | ||
62 | } | 64 | } |
63 | 65 | ||
64 | @override | 66 | @override |
67 | + Animation<double> createAnimation() { | ||
68 | + if (curve != null) { | ||
69 | + return CurvedAnimation( | ||
70 | + curve: curve!, parent: _animationController!.view); | ||
71 | + } | ||
72 | + return _animationController!.view; | ||
73 | + } | ||
74 | + | ||
75 | + @override | ||
65 | AnimationController createAnimationController() { | 76 | AnimationController createAnimationController() { |
66 | assert(_animationController == null); | 77 | assert(_animationController == null); |
67 | _animationController = | 78 | _animationController = |
-
Please register or login to post a comment