PhysicsProperties class
Configuration for physics behavior in physics-based UI elements.
- Annotations
Constructors
- PhysicsProperties({double gravity = 9.8, double friction = 0.5, double restitution = 0.8, double mass = 1.0})
-
const
Properties
- friction → double
-
Friction coefficient (default: 0.5)
final
- gravity → double
-
Gravity acceleration (default: 9.8)
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mass → double
-
Mass of the object (default: 1.0)
final
- restitution → double
-
Restitution (elasticity/bounciness) (default: 0.8)
Note: This maps to 'elasticity' if available, otherwise handled by mass/friction interplay.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{double? gravity, double? friction, double? restitution, double? mass}) → PhysicsProperties - Creates a copy of this PhysicsProperties with the given fields 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.
override