cancel method Null safety
cancel all dispatching actions
Implementation
void cancel() {
if (dispatchers.isEmpty) return;
final prevState = cubit.update(dispatchers: []);
for (final dispatcher in prevState.dispatchers) {
dispatcher.cancel();
dispatcher.dispose();
}
_noDispatcherEmitter.emit(null);
}