dispose method
Call this method to signal to SchedulerBinding that a request for a DartPerformanceMode is no longer needed.
This method must only be called once per object.
Implementation
void dispose() {
assert(_cleanup != null);
// TODO(polina-c): stop duplicating code across disposables
// https://github.com/flutter/flutter/issues/137435
if (kFlutterMemoryAllocationsEnabled) {
FlutterMemoryAllocations.instance.dispatchObjectDisposed(object: this);
}
_cleanup!();
_cleanup = null;
}