onError method Null safety

void onError(
  1. dynamic callback(
    1. String?
    )
)

Implementation

void onError(Function(String?) callback) {
  on(
    ChannelEvents.error.eventName(),
    (reason, {ref}) => callback(reason as String?),
  );
}