setBadgeLabel method

Future<void> setBadgeLabel([
  1. String? label
])

Set/unset label on taskbar(dock) app icon

Note that it's required to request access at your AppDelegate.swift like this: UNUserNotificationCenter.current().requestAuthorization(options: .alert, .badge)

@platforms macos

Implementation

Future<void> setBadgeLabel([String? label]) async {
  final Map<String, dynamic> arguments = {
    'label': label ?? '',
  };
  await _channel.invokeMethod('setBadgeLabel', arguments);
}