dispose method
This function must be call before the instance is created an usually have close streams or dispose clients.
Implementation
@override
@mustCallSuper
Future<void> dispose() {
final disposables = _diagnostics.map((diagnostic) => diagnostic.dispose());
return Future.wait(disposables);
}