DecayConfig class
Per-state release-time decay model.
State semantics match FrictionConfig: applied based on rect position (in-display vs past-display) and direction (extending vs retracting). The release trajectory consults this 4-state map per phase, picking the Decay whose zone the segment occupies.
Constructors
- DecayConfig({Decay? extending, Decay? extendingPastDisplay, Decay? retracting, Decay? retractingPastDisplay, Settle? settle})
-
const
- DecayConfig.byDirection({required Decay? extending, required Decay? retracting, Settle? settle})
-
Group by direction:
extendingcovers both in-display and past-display extending;retractingcovers both retracting states.const - DecayConfig.byZone({required Decay inDisplay, required Decay pastDisplay, Settle? settle})
-
Group by zone:
inDisplaycovers both extending and retracting inside the display;pastDisplaycovers both once the edge has crossed.const - DecayConfig.uniform(Decay decay, {Settle? settle})
-
Same Decay for all four states.
settleis independent.const
Properties
- extending → Decay?
-
final
- extendingPastDisplay → Decay?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- retracting → Decay?
-
final
- retractingPastDisplay → Decay?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settle → Settle?
-
Rubber-back motion after decay ends. The simulation is driven by
Settle.simulationAt so velocity stays continuous from the decay's
end. Null = use package default (
FrictionSettle).final
Methods
-
copyWith(
{Decay? extending, Decay? extendingPastDisplay, Decay? retracting, Decay? retractingPastDisplay, Settle? settle}) → DecayConfig -
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