MomentumSnap class final
Where a part settles after a gesture that changed it.
The targets are every spacing from offset, in the part's unit. Bearing
targets wrap around the circle. Once the part's glide ends, or right away
when it doesn't move, the part eases to the nearest target if it is within
tolerance of it, and otherwise stays where it is. A setting whose bit
isn't set takes the part's default, which GestureMomentum lists.
See mln_momentum_snap in the
C API reference.
Constructors
- MomentumSnap({double? spacing, double? offset, double? tolerance, double? durationMs})
-
const
Properties
- durationMs → double?
-
Zero settles without easing. Defaults to 300.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- offset → double?
-
Defaults to 0.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spacing → double?
-
Positive.
final
- tolerance → double?
-
Not negative.
final
Methods
-
copyWith(
{double? spacing, double? offset, double? tolerance, double? durationMs}) → MomentumSnap - A copy of this value with the given members replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited