Hammas Ali
Hammas Ali

Reputation: 604

Notification inside app using flutter firebase

Hey guys I need help I want to implement notifications inside the app using firebase not the any push notifications in notification tray, just like in app notifications here in the pic you can see, just like this alerts And this alert contain all the necessary notification from app

enter image description here

enter image description here

Upvotes: 1

Views: 1386

Answers (1)

chatphong.p
chatphong.p

Reputation: 59

When you initialize firebase it will let you specified what you want to do when the notification came. You just put that message (title body whatsoever)in your storage or db and display via that alert page.

FirebaseMessaging.onMessage.listen((RemoteMessage message) {
  print('Message data: ${message.data}');
  if (message.notification != null) {
    //your stuff
  }
});

Upvotes: 1

Related Questions