init method

  1. @visibleForTesting
Future init({
  1. MethodChannel? methodChannel,
})

Implementation

@visibleForTesting
Future init({MethodChannel? methodChannel}) async {
  if (platform.isAndroid) {
    androidNotification ??= AndroidNotification(
      channel: methodChannel ?? _channel,
      onNotificationTap: onNotificationTapCallback,
    );

    return androidNotification!.init();
  } else if (platform.isIOS) {
    iosNotification ??= IOSNotification(
      channel: methodChannel ?? _channel,
      onNotificationTap: onNotificationTapCallback,
      onPermissionDecline: onPermissionDecline,
    );

    return iosNotification!.init();
  }
}