decrementGlobalBadgeCounter method
Decrements the global badge counter by 1.
This method decrements the app's global badge counter by one. If the badge counter is already zero, this method has no effect. The updated badge counter value is returned as a Future that resolves to an int.
To decrement the badge counter by a different value, the developer can get the current value of the counter with the getGlobalBadgeCounter method, add the desired amount, and then set the new value with the setGlobalBadgeCounter method.
This method returns a Future that resolves to an int value representing the new value of the badge counter after it has been decremented.
Implementation
@override
Future<int> decrementGlobalBadgeCounter() async {
final int badgeCount =
await methodChannel.invokeMethod(CHANNEL_METHOD_DECREMENT_BADGE_COUNT);
return badgeCount;
}