reset method

  1. @override
void reset()
override

Restore the effect to its original state as it was when the effect was just created.

A common use case for this method is to have an effect which is permanently attached to its target (i.e. with removeOnFinish == false), and then periodically resetting this effect each time you need to apply it to the target.

Implementation

@override
void reset() {
  super.reset();
  // We can't accumulate rounding errors between resets because we don't know
  // if the opacity has been affected by anything else in between.
  _roundingError = 0.0;
}