FrictionConfig class

Per-state friction during an active gesture.

Progress dimension: depth into the bound state (0 = entering, 1 = at the state's far edge). extending/retracting: motion deeper into the bound vs back toward origin. *PastDisplay: while the rect is outside the display area.

Available extensions

Constructors

FrictionConfig({Friction? extending, Friction? extendingPastDisplay, Friction? retracting, Friction? retractingPastDisplay})
const
FrictionConfig.byDirection({required Friction? extending, required Friction? retracting})
Direction-grouped: in-display and past-display states share the same ramp per direction.
const
FrictionConfig.byZone({required Friction inDisplay, required Friction pastDisplay})
Group by zone: inDisplay applies to both extending and retracting while the rect's edge is inside the display; pastDisplay applies to both once the edge has crossed.
const
FrictionConfig.uniform(Friction friction)
Same Friction for all four states.
const

Properties

extending → Friction?
final
extendingPastDisplay → Friction?
final
hashCode → int
The hash code for this object.
no setterinherited
retracting → Friction?
final
retractingPastDisplay → Friction?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({Friction? extending, Friction? extendingPastDisplay, Friction? retracting, Friction? retractingPastDisplay}) → FrictionConfig
forDirection(DragDirectionState direction) → Friction?

Available on FrictionConfig, provided by the FrictionConfigByDirection extension

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