IndicatorPhysics class
Physics utilities for draggable indicators.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Static Methods
-
alignmentFromPosition(
Offset globalPosition, BuildContext context, int itemCount) → double - Converts global drag position to alignment with rubber band resistance.
-
applyRubberBandResistance(
double value, {double resistance = 0.4, double maxOverdrag = 0.3}) → double - Applies rubber band resistance when dragging beyond edges.
-
computeAlignment(
int index, int itemCount) → double - Converts item index to alignment (-1 to 1).
-
computeTargetIndex(
{required double currentRelativeX, required double velocityX, required double itemWidth, required int itemCount, double velocityThreshold = 0.5, double projectionTime = 0.3}) → int - Computes target index based on drag position and velocity.
-
jellyTransform(
{required Offset velocity, double maxDistortion = 0.7, double velocityScale = 1000.0}) → Matrix4 - Creates a jelly transform matrix based on velocity.