A native plugin to update the app badge count on the app icon.
Inspired by flutter_app_badger & flutter_app_badge_control.
Android | iOS | |
---|---|---|
updateBadgeCount |
✅ | ✅ |
removeBadge |
✅ | ✅ |
On iOS, you will have to add the following to your Info.plist
file:
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
You will have to request for notification permissions (e.g. with permission_handler)
Permission.notification.isDenied.then((value) {
if (value) Permission.notification.request();
});
You can check the example app for a complete implementation.
As there's no official API to update the app badge count on Android. To ensure that at least the dot indicator is displayed on the launcher icon, a collapsed notification with the count is created.
Some launchers support the notification count display. The integration is done via the ShortcutBadgerX (forked from ShortcutBadger) library.
(1.1.23+) | (1.1.7+) | (1.1.10+) | (1.1.10+) |
(1.1.17+) | (1.1.18+) | ||
- Android: make the notification tap customizable