start method

void start({
  1. Offset? origin,
  2. Offset? target,
})

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 old origin will be used instead.
  • If no target is provided, the old target 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);
}