notification_badge_counter 1.0.1
notification_badge_counter: ^1.0.1 copied to clipboard
A Flutter plugin for setting app icon badge counts on Android and iOS. Supports manufacturer-specific badge APIs with an automatic notification-based fallback.
1.0.1 #
Bug fixes
- Android: notification channel is now eagerly initialized whenever
POST_NOTIFICATIONSpermission is confirmed — viacheckPermissions(),requestPermissions(), or the system dialog result. Previously the channel was only created on the firstsetCount()call, which meant that if permission was granted by another package, the channel could be uninitialized and the badge silently dropped.
1.0.0 #
Breaking changes
- Package renamed from
notification_badgetonotification_badge_counter. Update your import:import 'package:notification_badge_counter/notification_badge.dart';
Bug fixes
isSupported()on Android now correctly returnsfalsewhen the only available provider isUniversalBadgeProviderandfallbackToUniversaLAndroidBadgeris set tofalseviasetAndroidNotificationConfig.
0.0.1 #
- Initial release.
- Android badge support for Samsung, Xiaomi, Huawei, OPPO, Vivo, OnePlus, Sony, HTC, LG, and Nova Launcher via manufacturer-specific APIs.
- Universal notification-based fallback for Android devices with no manufacturer badge API (API 26+).
- iOS badge support via
UNUserNotificationCenter(iOS 16+) andapplicationIconBadgeNumber. - Runtime permission handling for Android 13+ (
POST_NOTIFICATIONS) and iOS. setAndroidNotificationConfigfor customising the fallback notification title, message, icon, and enabling/disabling the fallback.- Full API:
setCount,getBadgeCount,incrementCount,decrementCount,clearBadge,isSupported,checkPermissions,requestPermissions,getDeviceManufacturer.