dispose method
Discards any resources used by the object.
After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
This method should only be called by the object's owner.
This method does not notify listeners, and clears the listener list once it is called. Consumers of this class must decide on whether to notify listeners or not immediately before disposal.
Implementation
@override
void dispose() {
_stop();
_ticker.dispose();
_dead = true;
// The web driver nulls plan/out/closed here, because there the painted
// shape lives on the DOM element and survives independently. The Flutter
// analogue of that element is _path — and _out is what [toPathD] reads to
// describe it. Dropping the buffers would leave the two disagreeing about
// the frozen frame, so they stay: a disposed controller keeps rendering
// whatever it last painted, and reports the same thing.
super.dispose();
}