cancel method
Cancels the current stream subscription.
Implementation
Future<void> cancel() async {
await _subscription?.cancel();
_subscription = null;
if (_state.value != StreamState.closed) {
_state.value = StreamState.idle;
}
}
Cancels the current stream subscription.
Future<void> cancel() async {
await _subscription?.cancel();
_subscription = null;
if (_state.value != StreamState.closed) {
_state.value = StreamState.idle;
}
}