clear method

void clear({
  1. String? channel,
})

Implementation

void clear({String? channel}){
  final targetChannel = channel ?? _GLOBAL_CHANNEL;
  final observers = _observers[targetChannel] ?? [];
  final observersInvoke = _observersInvoke[targetChannel] ?? Map();
  observers.clear();
  observersInvoke.clear();
  _observers[targetChannel] = observers;
  _observersInvoke[targetChannel] = observersInvoke;
}