Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
375 B
1
Indexable
Never

Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
    await Firebase.initializeApp();
    await DB.init();
    RemoteNotification? notification = message.notification;
    if(notification != null)
    {
        // Save 
        print(message.data);
    }
    
}


  FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);