motion property
The configured motion profile.
Implementation
MorphMotion get motion => _userMotion;
Swaps the profile; a live simulation retargets onto it with the current velocity carried over.
Implementation
set motion(MorphMotion next) {
assert(
next.debugContractViolation == null,
next.debugContractViolation ?? '',
);
if (_userMotion == next) {
return;
}
_userMotion = next;
// Live retarget: swapping the profile mid-flight moves the
// simulation onto the new Motion with the current velocity carried
// over - same as the disableAnimations setter.
if (isAnimating) {
_retarget(_target, velocity: _velocity);
}
}