SwipeDismissSensitivity class

Configuration for the swipe-to-dismiss sensitivity of ModalSheetRoute, ModalSheetPage, and related classes.

The modal will be dismissed under the following conditions:

  • A downward fling gesture with the ratio of the velocity to the viewport height that exceeds minFlingVelocityRatio.
  • A drag gesture ending with zero velocity, where the downward distance exceeds the resolved dismissalOffset.

Constructors

SwipeDismissSensitivity({double minFlingVelocityRatio = 2.0, SheetOffset dismissalOffset = const SheetOffset(0.3)})
Creates a swipe-to-dismiss sensitivity configuration.
const

Properties

dismissalOffset → SheetOffset
Defines the threshold in terms of SheetOffset, below which the sheet will be dismissed when the drag ends.
final
hashCode → int
The hash code for this object.
no setterinherited
minFlingVelocityRatio → double
Minimum ratio of gesture velocity to viewport height required to trigger dismissal for a downward fling gesture.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited