receiver method

dynamic receiver(
  1. String method,
  2. dynamic arguments
)

A method for receiving the notification.

This method is used to receive the notification.

Implementation

dynamic receiver(String method, dynamic arguments) {
  if (!docking || subscribers.isEmpty || !subscribers.containsKey(method)) {
    return;
  }
  Function.apply(subscribers[method]!, [arguments]);
}