on method Null safety

void on(
  1. String event,
  2. void callback(
    1. dynamic payload,
    2. {String? ref}
    )
)

Implementation

void on(
  String event,
  void Function(dynamic payload, {String? ref}) callback,
) {
  _bindings.add(Binding(event, callback));
}