incrementGlobalBadgeCounter method

  1. @override
Future<int> incrementGlobalBadgeCounter()
override

Increments the badge counter by 1 and returns the new value. If there is no current value for the badge counter, it will be set to 1. This method is the most performant way to increment the badge counter by a single unit.

To increment 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 incremented.

Implementation

@override
Future<int> incrementGlobalBadgeCounter() {
  return AwesomeNotificationsPlatform.instance.incrementGlobalBadgeCounter();
}