Sprung.custom constructor
Sprung.custom({})
Provides a critically damped spring by default, with an easily overrideable damping, stiffness and mass value.
Implementation
Sprung.custom({
double damping = 20,
double stiffness = 180,
double mass = 1.0,
double velocity = 0.0,
}) : this._sim = SpringSimulation(
SpringDescription(
damping: damping,
mass: mass,
stiffness: stiffness,
),
0.0,
1.0,
velocity,
);