setBadgeCount method

  1. @override
Future<bool> setBadgeCount(
  1. int count
)
override

Set the badge count

Implementation

@override
Future<bool> setBadgeCount(int count) async {
  try {
    final result = await methodChannel.invokeMethod<bool>('setBadgeCount', {'count': count});
    return result ?? false;
  } on PlatformException catch (e) {
    debugPrint('Error setting badge count: ${e.message}');
    return false;
  }
}