Skip to content

Commit

Permalink
Merge pull request #257 from durannumit/extend-closeProgressThreshold…
Browse files Browse the repository at this point in the history
…-for-different-types

Feature: Extend close progress threshold for different types
  • Loading branch information
ulusoyca authored Jul 8, 2024
2 parents 3773c2d + 4b00b8d commit 1fe7a8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/src/modal_type/wolt_bottom_sheet_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class WoltBottomSheetType extends WoltModalType {
Duration transitionDuration = _defaultEnterDuration,
Duration reverseTransitionDuration = _defaultExitDuration,
minFlingVelocity = 700.0,
closeProgressThreshold = 0.5,
bool? barrierDismissible,
}) : super(
shapeBorder: shapeBorder,
Expand All @@ -27,6 +28,7 @@ class WoltBottomSheetType extends WoltModalType {
reverseTransitionDuration: reverseTransitionDuration,
dismissDirection: dismissDirection,
minFlingVelocity: minFlingVelocity,
closeProgressThreshold: closeProgressThreshold,
showDragHandle: showDragHandle,
barrierDismissible: barrierDismissible,
);
Expand Down Expand Up @@ -178,6 +180,7 @@ class WoltBottomSheetType extends WoltModalType {
Duration? reverseTransitionDuration,
WoltModalDismissDirection? dismissDirection,
double? minFlingVelocity,
double? closeProgressThreshold,
bool? barrierDismissible,
}) {
return WoltBottomSheetType(
Expand All @@ -189,6 +192,8 @@ class WoltBottomSheetType extends WoltModalType {
reverseTransitionDuration ?? this.reverseTransitionDuration,
dismissDirection: dismissDirection ?? this.dismissDirection,
minFlingVelocity: minFlingVelocity ?? this.minFlingVelocity,
closeProgressThreshold:
closeProgressThreshold ?? this.closeProgressThreshold,
barrierDismissible: barrierDismissible ?? this.barrierDismissible,
);
}
Expand Down
5 changes: 5 additions & 0 deletions lib/src/modal_type/wolt_side_sheet_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class WoltSideSheetType extends WoltModalType {
WoltModalDismissDirection? dismissDirection =
WoltModalDismissDirection.endToStart,
double minFlingVelocity = 365.0,
double closeProgressThreshold = 0.5,
bool? barrierDismissible,
}) : super(
shapeBorder: shapeBorder,
Expand All @@ -24,6 +25,7 @@ class WoltSideSheetType extends WoltModalType {
reverseTransitionDuration: reverseTransitionDuration,
dismissDirection: dismissDirection,
minFlingVelocity: minFlingVelocity,
closeProgressThreshold: closeProgressThreshold,
barrierDismissible: barrierDismissible,
);

Expand Down Expand Up @@ -189,6 +191,7 @@ class WoltSideSheetType extends WoltModalType {
Duration? reverseTransitionDuration,
WoltModalDismissDirection? dismissDirection,
double? minFlingVelocity,
double? closeProgressThreshold,
bool? barrierDismissible,
}) {
return WoltSideSheetType(
Expand All @@ -199,6 +202,8 @@ class WoltSideSheetType extends WoltModalType {
reverseTransitionDuration ?? this.reverseTransitionDuration,
dismissDirection: dismissDirection ?? this.dismissDirection,
minFlingVelocity: minFlingVelocity ?? this.minFlingVelocity,
closeProgressThreshold:
closeProgressThreshold ?? this.closeProgressThreshold,
barrierDismissible: barrierDismissible ?? this.barrierDismissible,
);
}
Expand Down

0 comments on commit 1fe7a8a

Please sign in to comment.