dispose method
void
dispose()
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
void dispose() {
assert(onDispose != null, "Should be notifying disposed to the touch ripple controller.");
onDispose?.call();
}