onStart method

  1. @override
void onStart()
override

This method is called once when the effect is about to start, but before the first call to apply(). The notion of "about to start" is defined by the controller: this method is called when controller.started property first becomes true.

If the effect is reset, its onStart() method will be called again when the effect is about to start.

Implementation

@override
void onStart() {
  _scaleDelta = Vector2(
    target.scale.x * (_scaleFactor.x - 1),
    target.scale.y * (_scaleFactor.y - 1),
  );
}