start method
Begin squishing the dough. Sets isActive to true. Informs all status listeners that the status has changed to DoughStatus.started.
- If no
origin
is provided, the oldorigin
will be used instead. - If no
target
is provided, the oldtarget
will be used instead.
A squish can't already be active when calling this function.
Implementation
void start({
Offset? origin,
Offset? target,
}) {
assert(!isActive);
_isActive = true;
_origin = origin ?? _origin;
_target = target ?? _target;
_status = DoughStatus.started;
notifyListeners();
_notifyStatusListeners(_status);
}