disposeAsync method
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Implementation
@override
Future<void> disposeAsync() async {
// Dispose the service provider asynchronously if it implements
// AsyncDisposable
if (_services is AsyncDisposable) {
await (_services as AsyncDisposable).disposeAsync();
} else if (_services is Disposable) {
(_services as Disposable).dispose();
}
}