initialize static method

Future<void> initialize({
  1. required String appName,
})

Initialize desktop notifications Must be called before showing any notifications on desktop platforms

Implementation

static Future<void> initialize({required String appName}) async {
  if (!_isDesktopPlatform()) {
    if (kDebugMode) {
      print(
        'NotificationMasterDesktop: Not a desktop platform, skipping initialization',
      );
    }
    return;
  }

  try {
    // Note: Requires local_notifier package to be added to pubspec.yaml
    // await localNotifier.setup(
    //   appName: appName,
    //   shortcutPolicy: ShortcutPolicy.requireCreate,
    // );
    _isInitialized = true;
    if (kDebugMode) {
      print('NotificationMasterDesktop: Initialized successfully');
    }
  } catch (e) {
    if (kDebugMode) {
      print('NotificationMasterDesktop: Initialization failed: $e');
    }
  }
}