BouncingSheetPhysics class
A SheetPhysics that allows the sheet to go beyond the offset bounds defined by SheetMetrics.minOffset and SheetMetrics.maxOffset.
See also:
- Physics and SnapGrid example, which shows how this physics works with a SheetSnapGrid.
- Tweak bouncing effect example, which shows how bounceExtent and resistance affect the bouncing behavior.
- Inheritance
-
- Object
- SheetPhysics
- BouncingSheetPhysics
- Mixed-in types
Constructors
- BouncingSheetPhysics({double bounceExtent = 120, double resistance = 6})
-
const
Properties
- bounceExtent → double
-
The maximum number of pixels that the sheet can be overdragged.
final
- dragStartDistanceMotionThreshold → double?
-
The minimum amount of pixel distance drags must move by to start motion
the first time or after each time the drag motion stopped.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- resistance → double
-
Factor that controls how easy/hard it is to overdrag the sheet.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spring → SpringDescription
-
no setteroverride
Methods
-
applyPhysicsToOffset(
double delta, SheetMetrics metrics) → double -
override
-
computeOverflow(
double delta, SheetMetrics metrics) → double -
override
-
createBallisticSimulation(
double velocity, SheetMetrics metrics, SheetSnapGrid snapGrid) → Simulation? -
override
-
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