firebaseInitApp function

dynamic firebaseInitApp(
  1. BuildContext context
)

Implementation

firebaseInitApp(BuildContext context) async {
  dprint("firebaseInitApp");
  var supported = await FlutterAppBadger.isAppBadgeSupported();
  dprint("FlutterAppBadger supported=$supported");
  FlutterAppBadger.removeBadge();

  FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage? message) {
    if (message != null && message.notification != null) {
      dprint("FCB message _notifyCallback=;_notifyCallback ${message.from}");
      if (message.data['chat'] != null){
        if (message.data['chat'] == "true") {
          // if (_chatCallback != null)
          //   _chatCallback!();
          return;
        }
      }
      if (_notifyCallback != null)
        _notifyCallback!(message);
      }
    }
  );
}