dispose method

  1. @override
void dispose()
override

Disposes of the Ticker or related animation instances.

Calling this function resolves errors and memory leaks that may occur when the widget has been disposed but the effect-related instances remain.

Implementation

@override
void dispose() {
  onDispose?.call();

  if (isInitialized) {
    _spreadAnimation.dispose();
    _spreadCurved.dispose();
    _fadeAnimation.dispose();
    _fadeCurved.dispose();
  }
}