flutter_app_badger
flutter_app_badger copied to clipboard
Where to add this code if I want to update badge count when notification is received?
Hi, I want to update the badge count when a notification is received, including following cases
- App is terminated.
- App is in background.
- App is in foreground
@krishnakirana Me also want same functionality i tried this plugin and didn't work in all the device tell me if you find anything.
Isn't the badge something that's send from the backend? I'm using something like below for sending push notification with badge.
message := &messaging.Message{
Notification: &messaging.Notification{
Title: notification.Title,
Body: notification.Body,
},
Data: data,
Token: registrationToken,
APNS: &messaging.APNSConfig{
Payload: &messaging.APNSPayload{
Aps: &messaging.Aps{Badge: &badge},
},
},
}