GestureBounds class

Per-direction container of DragBounds for a gesture's four sides. Replaces the old Map<DragBound, DragBounds> so the API stays const-constructible, type-safe, and ships named shortcuts for the common shapes. Use at for enum-keyed lookups inside physics code.

Convenience constructors cover the common shapes; for asymmetric configurations use the default constructor with named args.

Available extensions

Constructors

GestureBounds({DragBounds? top, DragBounds? bottom, DragBounds? left, DragBounds? right})
const
GestureBounds.all([DragBounds bounds = const DragBounds()])
const
GestureBounds.bottom(DragBounds? bottom)
const
GestureBounds.horizontal(DragBounds bounds)
const
GestureBounds.left(DragBounds? left)
const
GestureBounds.right(DragBounds? right)
const
GestureBounds.symmetric({DragBounds? vertical, DragBounds? horizontal})
const
GestureBounds.top(DragBounds? top)
const
GestureBounds.vertical(DragBounds bounds)
const

Properties

bottom → DragBounds?
final
hashCode → int
The hash code for this object.
no setterinherited
hasHorizontalBound → bool
no setter
hasHorizontalScaleResponse → bool
no setter
hasScaleResponse → bool
no setter
hasVerticalBound → bool
no setter
hasVerticalScaleResponse → bool
no setter
left → DragBounds?
final
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
top → DragBounds?
final

Methods

friction(AxisState state, double delta) → double

Available on GestureBounds, provided by the GestureBoundsPhysics extension

See frictionFromState. Returns the friction-scaled delta for the given axis state under these bounds.
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
operator [](DragBound bound) → DragBounds?