onAll method

dynamic onAll(
  1. EventCallback callbacks
)

onAll listens to all the events in the callbacks. It takes a EventCallback as an argument. The EventCallback is a map of event names and their respective callback functions.

Implementation

onAll(EventCallback callbacks) {
  callbacks.forEach((key, value) {
    _socket?.on(key, value);
  });
}