stop method

dynamic stop({
  1. bool cancel = false,
})

Stops the effect emission, optionally cancelling all active particles.

Implementation

stop({bool cancel = false}) {
  if (_state == EffectState.killed) return;
  _updateState(EffectState.stopped);
  if (cancel) {
    _activeParticles.clear();
  }
}