setOnBadgeClickListener static method

Future setOnBadgeClickListener(
  1. void onData(
    1. dynamic event
    )?
)

Implementation

static Future setOnBadgeClickListener(void onData(dynamic event)?) async {
  if(onData != null) {
    if(onBadgeClickSubscription != null) {
      onBadgeClickSubscription!.cancel();
      onBadgeClickSubscription = null;
    }
    onBadgeClickSubscription = _onBadgeClickEventChannel.receiveBroadcastStream().listen(onData);
  }
  else {
    if(onBadgeClickSubscription != null) {
      onBadgeClickSubscription!.cancel();
      onBadgeClickSubscription = null;
    }
  }
}