close method
Terminates all active connections. If a client remains unclosed, the Dart process may not terminate.
Implementation
Future<void> close() async {
if (_actionInvokedSubscription != null) {
await _actionInvokedSubscription?.cancel();
_actionInvokedSubscription = null;
}
if (_notificationClosedSubscription != null) {
await _notificationClosedSubscription?.cancel();
_notificationClosedSubscription = null;
}
if (_closeBus) {
await _bus.close();
}
}