dispose method
Shuts the service down. When this service created its own server (the default), the underlying client is disposed too.
Implementation
Future<void> dispose() async {
_versions.clear();
if (_ownsClient) {
await _client.shutdown().catchError((_) {});
_client.exit();
await _client.dispose();
}
}