From 6e1af16b03988b3af8ca04d9caa3cdb29fadb4bc Mon Sep 17 00:00:00 2001 From: happycastle <41810556+happycastle114@users.noreply.github.com> Date: Sun, 10 Nov 2024 21:30:34 +0900 Subject: [PATCH] Add: Token --- lib/main.dart | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 40b3bd9..0d17339 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -55,25 +55,24 @@ void main() async { FirebaseMessaging.onBackgroundMessage(handleMessage); - await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( - alert: false, - badge: false, - sound: false, - ); - - await Token().init(); - - await FirebaseMessaging.instance.requestPermission( - alert: true, - announcement: false, - badge: true, - carPlay: false, - criticalAlert: false, - provisional: true, - sound: true, - ); - - await RemoteConfigController().init(); + await Future.wait([ + FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( + alert: false, + badge: false, + sound: false, + ), + Token().init(), + FirebaseMessaging.instance.requestPermission( + alert: true, + announcement: false, + badge: true, + carPlay: false, + criticalAlert: false, + provisional: true, + sound: true, + ), + RemoteConfigController().init() + ]); runApp(MyHome()); }