unregister static method

Future<void> unregister(
  1. String eventName,
  2. Function? callback
)

Implementation

static Future<void> unregister(String eventName, Function? callback) async {
  if (callbacks.containsKey(eventName)) {
    var existed = callbacks[eventName];
    existed?.remove(callback);
    callbacks.remove(eventName);
    callbacks.putIfAbsent(eventName, () => existed);
  }
  _libraryEventSubscription.resume();
}