Nicolas Lopez

BottomSheetDuration

@@ -16,6 +16,8 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { @@ -16,6 +16,8 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> {
16 this.enableDrag = true, 16 this.enableDrag = true,
17 @required this.isScrollControlled, 17 @required this.isScrollControlled,
18 RouteSettings settings, 18 RouteSettings settings,
  19 + this.enterBottomSheetDuration = const Duration(milliseconds: 250),
  20 + this.exitBottomSheetDuration = const Duration(milliseconds: 200),
19 }) : assert(isScrollControlled != null), 21 }) : assert(isScrollControlled != null),
20 name = "BOTTOMSHEET: ${builder.hashCode}", 22 name = "BOTTOMSHEET: ${builder.hashCode}",
21 assert(isDismissible != null), 23 assert(isDismissible != null),
@@ -33,7 +35,8 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { @@ -33,7 +35,8 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> {
33 final bool isDismissible; 35 final bool isDismissible;
34 final bool enableDrag; 36 final bool enableDrag;
35 final String name; 37 final String name;
36 - 38 + final Duration enterBottomSheetDuration;
  39 + final Duration exitBottomSheetDuration;
37 // remove safearea from top 40 // remove safearea from top
38 final bool removeTop; 41 final bool removeTop;
39 42
@@ -56,6 +59,8 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> { @@ -56,6 +59,8 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> {
56 assert(_animationController == null); 59 assert(_animationController == null);
57 _animationController = 60 _animationController =
58 BottomSheet.createAnimationController(navigator.overlay); 61 BottomSheet.createAnimationController(navigator.overlay);
  62 + _animationController.duration = enterBottomSheetDuration;
  63 + _animationController.reverseDuration = exitBottomSheetDuration;
59 return _animationController; 64 return _animationController;
60 } 65 }
61 66
@@ -638,6 +638,8 @@ extension GetNavigation on GetInterface { @@ -638,6 +638,8 @@ extension GetNavigation on GetInterface {
638 bool isDismissible = true, 638 bool isDismissible = true,
639 bool enableDrag = true, 639 bool enableDrag = true,
640 RouteSettings settings, 640 RouteSettings settings,
  641 + Duration enterBottomSheetDuration,
  642 + Duration exitBottomSheetDuration,
641 }) { 643 }) {
642 assert(bottomsheet != null); 644 assert(bottomsheet != null);
643 assert(persistent != null); 645 assert(persistent != null);