close method
Drains admitted callbacks and then releases every pooled connection.
Implementation
@override
Future<void> close() {
if (Zone.current[_callbackZone] != null) {
return Future.error(
StateError('Cannot close the driver in its callback.'),
);
}
if (_closeFuture case final future?) return future;
_closing = true;
return _closeFuture = _close();
}