Created
May 29, 2021 18:36
-
-
Save husen-hn/995324ae820523051d1afd48b01d43a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async { | |
if (message.data['message'] == 'Calling message') { | |
showCallNotification( | |
3, message.data['chatroomid'], message.data['userName']); | |
} | |
await Firebase.initializeApp(); | |
} | |
void main() async { | |
WidgetsFlutterBinding.ensureInitialized(); | |
await firebase_core.Firebase.initializeApp(); | |
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); | |
runApp(MyApp()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment