onClose method Null safety

void onClose(
  1. Function callback
)

Implementation

void onClose(Function callback) {
  on(ChannelEvents.close.eventName(), (reason, {ref}) => callback());
}