dispose method
Cancels the periodic timer and flushes any remaining buffered events.
Should be called when the transport is no longer needed.
Implementation
Future<void> dispose() async {
_timer?.cancel();
_timer = null;
await flush();
}
Cancels the periodic timer and flushes any remaining buffered events.
Should be called when the transport is no longer needed.
Future<void> dispose() async {
_timer?.cancel();
_timer = null;
await flush();
}