### getNotificationAppLaunchDetails Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/getNotificationAppLaunchDetails.html Returns info on if a notification created from this plugin had been used to launch the application. An example of how this could be used is to change the initial route of your application when it starts up. If the plugin isn't running on either Android, iOS or macOS then an instance of the `NotificationAppLaunchDetails` class is returned with `didNotificationLaunchApp` set to false. Note that this will return null for applications running on macOS versions older than 10.14. This is because there's currently no mechanism for plugins to receive information on lifecycle events. ```APIDOC ## getNotificationAppLaunchDetails ### Description Returns info on if a notification created from this plugin had been used to launch the application. This can be used to change the initial route of your application when it starts up. ### Method Signature `Future getNotificationAppLaunchDetails()` ### Return Value - `Future`: An object containing details about the app launch, or null if not applicable (e.g., older macOS versions). ### Notes - Returns `NotificationAppLaunchDetails` with `didNotificationLaunchApp` set to `false` for unsupported platforms (web, non-Android/iOS/macOS/Windows). - Returns `null` for macOS versions older than 10.14 due to platform limitations. ``` -------------------------------- ### hasPackageIdentity static method Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/MsixUtils/hasPackageIdentity.html Returns whether the current app was installed with an MSIX installer. This is crucial for enabling advanced Windows notification features. ```APIDOC ## hasPackageIdentity() ### Description Returns whether the current app was installed with an MSIX installer. Using an MSIX grants your application package identity, which allows it to use certain APIs. Specifically, using an MSIX installer allows your app to: * use FlutterLocalNotificationsWindows.getActiveNotifications * use FlutterLocalNotificationsWindows.cancel * use custom files for notification sounds * use network sources for notifications * use `ms-appx:///` URIs for resources These functions will simply do nothing or return empty data in apps without package identity. Additionally: * WindowsImage.getAssetUri will return a `file:///` or `ms-appx:///` URI, depending on whether the app is running in debug, release, or as an MSIX. * WindowsNotificationAudio.asset takes an audio file to use for apps with package identity, and a preset fallbacks for apps without. ### Method static bool hasPackageIdentity() ### Return Value - bool: `true` if the app has package identity, `false` otherwise. ``` -------------------------------- ### startForegroundService Method Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidFlutterLocalNotificationsPlugin/startForegroundService.html Starts an Android foreground service with the given notification. The `id` must not be 0. You need to add the `FOREGROUND_SERVICE` permission and the service definition to your `AndroidManifest.xml`. ```APIDOC ## startForegroundService ### Description Starts an Android foreground service with the given notification. ### Method Signature ```dart Future startForegroundService({ required int id, String? title, String? body, AndroidNotificationDetails? notificationDetails, String? payload, AndroidServiceStartType startType = AndroidServiceStartType.startSticky, Set? foregroundServiceTypes, }) ``` ### Parameters - **id** (int) - Required - The unique identifier for the notification. Must not be 0. - **title** (String?) - Optional - The title of the notification. - **body** (String?) - Optional - The body text of the notification. - **notificationDetails** (AndroidNotificationDetails?) - Optional - Platform-specific details for the Android notification. - **payload** (String?) - Optional - Additional data associated with the notification. - **startType** (AndroidServiceStartType) - Optional - Specifies how the service should be started. Defaults to `AndroidServiceStartType.startSticky`. - **foregroundServiceTypes** (Set?) - Optional - A set of foreground service types to apply. Must not be empty if provided. ### Notes - The `id` must not be 0. - You must add `` to your `AndroidManifest.xml`. - You must add the service definition to your `AndroidManifest.xml`: ```xml ``` - The `foregroundServiceType` parameter must be a subset of the `android:foregroundServiceType` defined in `AndroidManifest.xml`. - On devices older than `Build.VERSION_CODES.Q`, `foregroundServiceType` will be ignored. - The notification for the foreground service will not be dismissible and is automatically removed when using `stopForegroundService`. ``` -------------------------------- ### startForegroundService Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidFlutterLocalNotificationsPlugin-class.html Starts an Android foreground service and displays a notification to inform the user that the service is running. This is used for long-running background tasks. ```APIDOC ## startForegroundService({required int id, String? title, String? body, AndroidNotificationDetails? notificationDetails, String? payload, AndroidServiceStartType startType = AndroidServiceStartType.startSticky, Set? foregroundServiceTypes}) ### Description Starts an Android foreground service with the given notification. ### Parameters #### Path Parameters - **id** (int) - Required - The unique identifier for the notification and service. - **title** (String?) - Optional - The title of the notification. - **body** (String?) - Optional - The body text of the notification. - **notificationDetails** (AndroidNotificationDetails?) - Optional - Details for customizing the Android notification. - **payload** (String?) - Optional - Data payload associated with the notification. - **startType** (AndroidServiceStartType) - Optional - The type of start for the service (defaults to `startSticky`). - **foregroundServiceTypes** (Set?) - Optional - The types of foreground services being used. ### Returns - `Future`: A future that completes when the foreground service has started. ``` -------------------------------- ### Start Foreground Service Implementation Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidFlutterLocalNotificationsPlugin/startForegroundService.html This is the implementation of the startForegroundService method. It validates the notification ID and foreground service types before invoking the platform channel. ```dart Future startForegroundService({ required int id, String? title, String? body, AndroidNotificationDetails? notificationDetails, String? payload, AndroidServiceStartType startType = AndroidServiceStartType.startSticky, Set? foregroundServiceTypes, }) { validateId(id); if (id == 0) { throw ArgumentError.value( id, 'id', 'The id of a notification used for an Android foreground service must '\n 'not be 0!', ); } if (foregroundServiceTypes?.isEmpty ?? false) { throw ArgumentError.value( foregroundServiceTypes, 'foregroundServiceType', 'foregroundServiceType may be null but it must never be empty!', ); } return _channel.invokeMethod('startForegroundService', { 'notificationData': { 'id': id, 'title': title, 'body': body, 'payload': payload ?? '', 'platformSpecifics': notificationDetails?.toMap(), }, 'startType': startType.index, 'foregroundServiceTypes': foregroundServiceTypes ?.map((AndroidServiceForegroundType type) => type.value) .toList(), }); } ``` -------------------------------- ### WindowsInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WindowsInitializationSettings/WindowsInitializationSettings.html Creates a new settings object for initializing the flutter_local_notifications plugin on Windows. This constructor requires the application name, app user model ID, and a GUID, and optionally accepts an icon path. ```APIDOC ## WindowsInitializationSettings Constructor ### Description Creates a new settings object for initializing this plugin on Windows. ### Parameters #### Constructor Parameters - **appName** (String) - Required - The name of the application. - **appUserModelId** (String) - Required - The App User Model ID for the application. - **guid** (String) - Required - A GUID to uniquely identify the application. - **iconPath** (String?) - Optional - The path to the application's icon file. ``` -------------------------------- ### WebInitializationSettings() Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WebInitializationSettings-class.html Creates a new instance of WebInitializationSettings. ```APIDOC ## WebInitializationSettings() ### Description Creates a new instance of WebInitializationSettings. ### Constructor `WebInitializationSettings()` ``` -------------------------------- ### periodicallyShow Method Implementation Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidFlutterLocalNotificationsPlugin/periodicallyShow.html This is the implementation of the periodicallyShow method. It takes an ID, optional title and body, a repeat interval, and platform-specific notification details. The notification is scheduled to appear at the specified interval, starting from when the method is called. Additional setup in AndroidManifest.xml is required. ```dart @override Future periodicallyShow({ required int id, String? title, String? body, required RepeatInterval repeatInterval, AndroidNotificationDetails? notificationDetails, String? payload, AndroidScheduleMode scheduleMode = AndroidScheduleMode.exact, }) async { validateId(id); await _channel.invokeMethod('periodicallyShow', { 'id': id, 'title': title, 'body': body, 'calledAt': clock.now().millisecondsSinceEpoch, 'repeatInterval': repeatInterval.index, 'platformSpecifics': _buildPlatformSpecifics( notificationDetails, scheduleMode, ), 'payload': payload ?? '', }); } ``` -------------------------------- ### WindowsInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WindowsInitializationSettings/WindowsInitializationSettings.html Use this constructor to create a new settings object for initializing the flutter_local_notifications plugin on Windows. It requires the application name, app user model ID, and a GUID, with an optional icon path. ```dart const WindowsInitializationSettings({ required this.appName, required this.appUserModelId, required this.guid, this.iconPath, }); ``` -------------------------------- ### initialize({required WindowsInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse}) Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsWindows-class.html Initializes the plugin with specific settings for Windows. ```APIDOC ## initialize({required WindowsInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse}) ### Description Initializes the local notifications plugin for Windows. This method must be called before any other notification-related methods. ### Method Signature `Future initialize({required WindowsInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse})` ### Parameters #### Request Body - **settings** (WindowsInitializationSettings) - Required - Configuration settings specific to Windows. - **onDidReceiveNotificationResponse** (DidReceiveNotificationResponseCallback?) - Optional - A callback function that is invoked when a user interacts with a notification. ``` -------------------------------- ### periodicallyShow Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidFlutterLocalNotificationsPlugin/periodicallyShow.html Periodically show a notification using the specified interval. For example, specifying a hourly interval means the first time the notification will be an hour after the method has been called and then every hour after that. This will also require additional setup for the app, especially in the app's AndroidManifest.xml file. Please see check the readme for further details. ```APIDOC ## periodicallyShow ### Description Periodically show a notification using the specified interval. For example, specifying a hourly interval means the first time the notification will be an hour after the method has been called and then every hour after that. This will also require additional setup for the app, especially in the app's `AndroidManifest.xml` file. Please see check the readme for further details. ### Method Signature Future periodicallyShow({ required int id, String? title, String? body, required RepeatInterval repeatInterval, AndroidNotificationDetails? notificationDetails, String? payload, AndroidScheduleMode scheduleMode = AndroidScheduleMode.exact, }) ### Parameters - **id** (int) - Required - Unique identifier for the notification. - **title** (String?) - Optional - The title of the notification. - **body** (String?) - Optional - The body text of the notification. - **repeatInterval** (RepeatInterval) - Required - The interval at which the notification should repeat (e.g., hourly, daily). - **notificationDetails** (AndroidNotificationDetails?) - Optional - Platform-specific details for Android notifications. - **payload** (String?) - Optional - Data payload to be sent with the notification. - **scheduleMode** (AndroidScheduleMode) - Optional - The scheduling mode for Android notifications. Defaults to `AndroidScheduleMode.exact`. ``` -------------------------------- ### hasPackageIdentity Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/MsixUtils-class.html Returns a boolean indicating whether the current application was installed using an MSIX installer. This is crucial for differentiating between MSIX and non-MSIX installations. ```APIDOC ## Static Methods hasPackageIdentity() → bool Returns whether the current app was installed with an MSIX installer. ``` -------------------------------- ### initialize Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin-class.html Initializes the plugin. ```APIDOC ## initialize ### Description Initializes the plugin. ### Method Signature Future initialize({required InitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, DidReceiveBackgroundNotificationResponseCallback? onDidReceiveBackgroundNotificationResponse}) ``` -------------------------------- ### guid property Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WindowsInitializationSettings/guid.html The GUID that identifies the notification activation callback. ```APIDOC ## guid property ### Description The GUID that identifies the notification activation callback. ### Type String ### Modifiers final ### Implementation ```dart final String guid; ``` ``` -------------------------------- ### initialize() Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/IOSFlutterLocalNotificationsPlugin-class.html Initializes the plugin for iOS. Requires DarwinInitializationSettings. ```APIDOC initialize({required DarwinInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, DidReceiveBackgroundNotificationResponseCallback? onDidReceiveBackgroundNotificationResponse}) → Future Initializes the plugin for iOS. ``` -------------------------------- ### WindowsInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WindowsInitializationSettings-class.html Creates a new settings object for initializing this plugin on Windows. ```APIDOC ## WindowsInitializationSettings Constructor ### Description Creates a new settings object for initializing this plugin on Windows. ### Parameters - **appName** (String) - Required - The name of the app that should be shown in the notification toast. - **appUserModelId** (String) - Required - The unique app user model ID that identifies the app, in the form of CompanyName.ProductName.SubProduct.VersionInformation. - **guid** (String) - Required - The GUID that identifies the notification activation callback. - **iconPath** (String?) - Optional - The path to the icon of the notification. ``` -------------------------------- ### initialize Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxFlutterLocalNotificationsPlugin/initialize.html Initializes the plugin with Linux-specific settings. This method should not be called directly as it exists only to satisfy compile-time dependencies. ```APIDOC ## initialize ### Description Initializes the plugin with Linux-specific settings. This method should not be called directly as it exists only to satisfy compile-time dependencies. ### Method Signature Future initialize({ required LinuxInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, }) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **settings** (LinuxInitializationSettings) - Required - The platform-specific initialization settings for Linux. - **onDidReceiveNotificationResponse** (DidReceiveNotificationResponseCallback) - Optional - A callback that is invoked when a user interacts with a notification. ### Response #### Success Response (bool?) Returns `true` if initialization was successful, `false` otherwise. However, this method is a stub and will always return `null`. ### Implementation Notes This method contains an `assert(false)` and is intended to be a compile-time stub. It should never be called at runtime. ``` -------------------------------- ### Check for MSIX Package Identity Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/MsixUtils/hasPackageIdentity.html This static method returns whether the current app was installed with an MSIX installer. Apps with package identity can use specific Windows APIs and features. ```dart static bool hasPackageIdentity() => false; ``` -------------------------------- ### LinuxInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxInitializationSettings/LinuxInitializationSettings.html Use this constructor to create an instance of LinuxInitializationSettings. It requires a default action name and optionally accepts a default icon, default sound, and a boolean to suppress the default sound. ```dart const LinuxInitializationSettings({ required this.defaultActionName, this.defaultIcon, this.defaultSound, this.defaultSuppressSound = false, }); ``` -------------------------------- ### AndroidServiceStartType Enum Values Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidServiceStartType.html The AndroidServiceStartType enum provides constants that map to Android's Service start types. These constants are used to specify how a background service should be started and managed by the Android system. ```APIDOC ## Enum: AndroidServiceStartType ### Description The available start types for an Android service. ### Values * **startStickyCompatibility** → `const AndroidServiceStartType` Corresponds to `Service.START_STICKY_COMPATIBILITY`. * **startSticky** → `const AndroidServiceStartType` Corresponds to `Service.START_STICKY`. * **startNotSticky** → `const AndroidServiceStartType` Corresponds to `Service.START_NOT_STICKY`. * **startRedeliverIntent** → `const AndroidServiceStartType` Corresponds to `Service.START_REDELIVER_INTENT`. ``` -------------------------------- ### WebInitializationSettings() Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WebInitializationSettings/WebInitializationSettings.html Creates a new instance of WebInitializationSettings. This is used to configure platform-specific settings for notifications on the web. ```APIDOC ## WebInitializationSettings() ### Description Creates a new instance of `WebInitializationSettings`. ### Method `const WebInitializationSettings()` ### Parameters This constructor does not take any parameters. ### Example ```dart const webSettings = WebInitializationSettings(); ``` ``` -------------------------------- ### initialize Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsWindows/initialize.html Initializes the plugin with Windows-specific settings. This method must be called before any other notification-related methods. It returns a boolean indicating success. ```APIDOC ## initialize ### Description Initializes the plugin with Windows-specific settings. This method must be called before any other notification-related methods. It returns a boolean indicating success. ### Method Signature ```dart Future initialize({ required WindowsInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, }) ``` ### Parameters #### Path Parameters - **settings** (WindowsInitializationSettings) - Required - The settings required for initializing notifications on Windows. - **onDidReceiveNotificationResponse** (DidReceiveNotificationResponseCallback?) - Optional - A callback function that is invoked when a user interacts with a notification. ### Returns - **Future** - A future that resolves to `true` if the initialization was successful, `false` otherwise. ``` -------------------------------- ### Get Notification App Launch Details Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidFlutterLocalNotificationsPlugin/getNotificationAppLaunchDetails.html This method retrieves information about whether a notification was used to launch the application. It handles the communication with the platform channel to get the launch details and parses the response into a NotificationAppLaunchDetails object. ```dart @override Future getNotificationAppLaunchDetails() async { final Map? result = await _channel.invokeMethod( 'getNotificationAppLaunchDetails', ); final Map? notificationResponse = result != null && result.containsKey('notificationResponse') ? result['notificationResponse'] : null; if (result == null) { return null; } else { return NotificationAppLaunchDetails( result['notificationLaunchedApp'], notificationResponse: notificationResponse == null ? null : NotificationResponse( id: notificationResponse['notificationId'], actionId: notificationResponse['actionId'], input: notificationResponse['input'], notificationResponseType: NotificationResponseType .values[notificationResponse['notificationResponseType']], payload: notificationResponse.containsKey('payload') ? notificationResponse['payload'] : null, data: Map.from( notificationResponse['data'] ?? {}, ), ), ); } } ``` -------------------------------- ### ThemeLinuxSound Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/ThemeLinuxSound/ThemeLinuxSound.html Constructs an instance of ThemeLinuxSound. ```APIDOC ## ThemeLinuxSound Constructor ### Description Constructs an instance of ThemeLinuxSound. ### Signature ThemeLinuxSound(String name) ### Parameters #### Path Parameters - **name** (String) - Description of the name parameter. ``` -------------------------------- ### LinuxIconType get type Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxNotificationIcon/type.html Defines the type of icon used for Linux notifications. ```APIDOC ## LinuxNotificationIcon.type ### Description Defines the type of icon for a Linux notification. ### Property - **type** (LinuxIconType) - The type of the notification icon. ``` -------------------------------- ### AndroidInitializationSettings Methods Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidInitializationSettings-class.html Details the methods available for AndroidInitializationSettings. ```APIDOC ## Methods ### noSuchMethod(Invocation invocation) → dynamic Invoked when a nonexistent method or property is accessed. ### toString() → String A string representation of this object. ``` -------------------------------- ### Get Notification App Launch Details Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/getNotificationAppLaunchDetails.html This method checks the current platform and resolves the appropriate platform-specific implementation to get notification launch details. It returns `null` for unsupported platforms or if no notification launched the app. For web, Android, iOS, macOS, and Windows, it calls the respective platform implementations. For other platforms, it uses the general `FlutterLocalNotificationsPlatform.instance`. ```dart Future getNotificationAppLaunchDetails() async { if (kIsWeb) { return await resolvePlatformSpecificImplementation< WebFlutterLocalNotificationsPlugin >() ?.getNotificationAppLaunchDetails(); } else if (defaultTargetPlatform == TargetPlatform.android) { return await resolvePlatformSpecificImplementation< AndroidFlutterLocalNotificationsPlugin >() ?.getNotificationAppLaunchDetails(); } else if (defaultTargetPlatform == TargetPlatform.iOS) { return await resolvePlatformSpecificImplementation< IOSFlutterLocalNotificationsPlugin >() ?.getNotificationAppLaunchDetails(); } else if (defaultTargetPlatform == TargetPlatform.macOS) { return await resolvePlatformSpecificImplementation< MacOSFlutterLocalNotificationsPlugin >() ?.getNotificationAppLaunchDetails(); } else if (defaultTargetPlatform == TargetPlatform.windows) { return await resolvePlatformSpecificImplementation< FlutterLocalNotificationsWindows >() ?.getNotificationAppLaunchDetails(); } else { return await FlutterLocalNotificationsPlatform.instance .getNotificationAppLaunchDetails() ?? const NotificationAppLaunchDetails(false); } } ``` -------------------------------- ### Get Default Instance Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlatform/instance.html Access the default instance of FlutterLocalNotificationsPlatform to interact with the plugin's functionality. ```dart static FlutterLocalNotificationsPlatform get instance => _instance; ``` -------------------------------- ### initialize Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/initialize.html Initializes the plugin with platform-specific settings and callbacks. This method must be called before any other methods that schedule or display notifications. ```APIDOC ## initialize ### Description Initializes the plugin with platform-specific settings and callbacks for handling notification responses. ### Method Signature ```dart Future initialize({ required InitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, DidReceiveBackgroundNotificationResponseCallback? onDidReceiveBackgroundNotificationResponse, }) ``` ### Parameters * **settings** (InitializationSettings) - Required - Platform-specific settings for initializing the plugin. This should include configurations for Android, iOS, macOS, Linux, and Windows as appropriate for your target platforms. * **onDidReceiveNotificationResponse** (DidReceiveNotificationResponseCallback?) - Optional - A callback that is invoked when a user taps on a notification. This callback receives details about the notification response. * **onDidReceiveBackgroundNotificationResponse** (DidReceiveBackgroundNotificationResponseCallback?) - Optional - A callback that is invoked when a user taps on a notification in the background. This callback receives details about the notification response. ### Returns * A `Future` that completes with `true` if the initialization was successful, `false` otherwise, or `null` if the platform is not supported or the initialization logic did not explicitly return a boolean. ### Platform-Specific Initialization The `initialize` method internally handles platform-specific initialization logic. It checks the `defaultTargetPlatform` and calls the appropriate `initialize` method on the platform-specific plugin implementation (e.g., `AndroidFlutterLocalNotificationsPlugin`, `IOSFlutterLocalNotificationsPlugin`). **Important:** Ensure that the relevant platform settings within `InitializationSettings` are provided. For example, if targeting Android, `settings.android` must not be null. Failure to do so will result in an `ArgumentError`. ``` -------------------------------- ### AndroidIconSource get source Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterBitmapAssetAndroidIcon/source.html This property returns the source type of the Android icon, which is `AndroidIconSource.flutterBitmapAsset` for `FlutterBitmapAssetAndroidIcon`. ```APIDOC ## AndroidIconSource get source ### Description This property indicates the source type of the Android icon. For `FlutterBitmapAssetAndroidIcon`, this will always return `AndroidIconSource.flutterBitmapAsset`. ### Implementation ```dart @override AndroidIconSource get source => AndroidIconSource.flutterBitmapAsset; ``` ``` -------------------------------- ### initialize Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/MacOSFlutterLocalNotificationsPlugin/initialize.html Initializes the plugin. This method should be called once on application startup before using other plugin features. It can also handle requesting notification permissions. ```APIDOC ## initialize ### Description Initializes the plugin. Call this method on application before using the plugin further. This should only be done once. Initialisation may also request notification permissions where users will see a permissions prompt. This may be fine in cases where it's acceptable to do this when the application runs for the first time. However, if your application needs to do this at a later point in time, set the DarwinInitializationSettings.requestAlertPermission, DarwinInitializationSettings.requestBadgePermission and DarwinInitializationSettings.requestSoundPermission values to false. requestPermissions can then be called to request permissions when needed. The `onDidReceiveNotificationResponse` callback is fired when the user interacts with a notification that was displayed by the plugin and the application was running. To handle when a notification launched an application, use `getNotificationAppLaunchDetails`. ### Method Signature Future initialize({ required DarwinInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, }) ### Parameters #### Required Parameters - **settings** (DarwinInitializationSettings) - Settings for initializing on Darwin platforms. #### Optional Parameters - **onDidReceiveNotificationResponse** (DidReceiveNotificationResponseCallback?) - Callback for when a user interacts with a notification while the app is running. ### Returns - Future - A future boolean indicating if the initialization was successful. ``` -------------------------------- ### Get Sound URI Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/UriAndroidNotificationSound/sound.html This getter returns the URI for the notification sound. It is part of the implementation for the sound property. ```dart @override String get sound => _sound; ``` -------------------------------- ### NotificationAppLaunchDetails Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/NotificationAppLaunchDetails/NotificationAppLaunchDetails.html Constructs an instance of NotificationAppLaunchDetails. ```APIDOC ## NotificationAppLaunchDetails constructor ### Description Constructs an instance of NotificationAppLaunchDetails. ### Parameters #### Positional Parameters - **didNotificationLaunchApp** (bool) - Required - Indicates if the app was launched because of a notification. #### Named Parameters - **notificationResponse** (NotificationResponse?) - Optional - Details about the notification that caused the app launch, if available. ``` -------------------------------- ### FlutterLocalNotificationsPlugin Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/FlutterLocalNotificationsPlugin.html Use this factory constructor to get an instance of FlutterLocalNotificationsPlugin. This is the primary way to interact with the plugin. ```dart factory FlutterLocalNotificationsPlugin() => _instance; ``` -------------------------------- ### NotificationAppLaunchDetails Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/NotificationAppLaunchDetails-class.html Constructs an instance of NotificationAppLaunchDetails. ```APIDOC ## NotificationAppLaunchDetails(bool didNotificationLaunchApp, {NotificationResponse? notificationResponse}) ### Description Constructs an instance of NotificationAppLaunchDetails. ### Parameters - **didNotificationLaunchApp** (bool) - Required - Indicates if the app was launched via notification. - **notificationResponse** (NotificationResponse?) - Optional - Contains details of the notification that launched the app. ``` -------------------------------- ### FlutterLocalNotificationsPlatform() Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlatform/FlutterLocalNotificationsPlatform.html Constructs an instance of FlutterLocalNotificationsPlatform. This is the primary way to get an object to interact with the local notifications functionality. ```APIDOC ## FlutterLocalNotificationsPlatform() ### Description Constructs an instance of FlutterLocalNotificationsPlatform. ### Method Constructor ### Endpoint N/A (Dart class constructor) ### Parameters None ### Request Example ```dart final flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlatform(); ``` ### Response N/A (Constructor does not return a value in the typical sense, but initializes an object.) ### Implementation Details ```dart FlutterLocalNotificationsPlatform() : super(token: _token); ``` ``` -------------------------------- ### initialize() Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/MacOSFlutterLocalNotificationsPlugin-class.html Initializes the plugin with Darwin-specific settings and an optional callback for when a notification response is received. ```APIDOC ## initialize() ### Description Initializes the plugin. This method should be called before any other plugin methods. ### Parameters - **settings** (DarwinInitializationSettings) - Required - Settings for initializing Darwin notifications. - **onDidReceiveNotificationResponse** (DidReceiveNotificationResponseCallback?) - Optional - Callback that is invoked when a user has responded to a notification. ### Method ```dart Future initialize({required DarwinInitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse}) ``` ### Returns - Future: A future that resolves to true if initialization was successful, false otherwise, or null if an error occurred. ``` -------------------------------- ### Initialize Time Zone Database Source: https://pub.dev/documentation/flutter_local_notifications/latest/index.html Initialize the timezone database before using any timezone-related functionalities. This is a required setup step. ```dart tz.initializeTimeZones(); ``` -------------------------------- ### toString Method Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxServerCapabilities/toString.html Returns a string representation of the LinuxServerCapabilities object, including all its capabilities. ```APIDOC ## toString Method ### Description Returns a string representation of the LinuxServerCapabilities object, useful for debugging and logging. This method overrides the default toString behavior to provide detailed information about the server capabilities. ### Method Signature ```dart String toString() ``` ### Implementation Details The method returns a formatted string that includes the values of various capabilities such as `otherCapabilities`, `body`, `bodyHyperlinks`, `bodyImages`, `bodyMarkup`, `iconMulti`, `iconStatic`, `persistence`, `sound`, `actions`, and `actionIcons`. ### Example Usage ```dart final capabilities = LinuxServerCapabilities(...); print(capabilities.toString()); // Output: LinuxServerCapabilities(otherCapabilities: ..., body: ..., ...) ``` ``` -------------------------------- ### AndroidIconSource get source Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/ContentUriAndroidIcon/source.html This property returns the source type for Android icons, specifically indicating that it's from a content URI. ```APIDOC ## AndroidIconSource get source ### Description This property overrides the base class property to return the specific source type for Android icons, which is `AndroidIconSource.contentUri`. ### Method `get` ### Return Type `AndroidIconSource` ### Implementation ```dart @override AndroidIconSource get source => AndroidIconSource.contentUri; ``` ``` -------------------------------- ### ThemeLinuxSound Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/ThemeLinuxSound-class.html Constructs an instance of ThemeLinuxSound with a given name. ```APIDOC ## ThemeLinuxSound(String name) ### Description Constructs an instance of ThemeLinuxSound. ### Parameters #### Path Parameters - **name** (String) - Required - The name of the themeable sound. ``` -------------------------------- ### LinuxSoundType get type Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AssetsLinuxSound/type.html Defines the type of sound. This property is an override and returns the specific type of sound being used on Linux. ```APIDOC ## LinuxSoundType get type ### Description Defines the type of sound. ### Method Getter ### Endpoint N/A ### Parameters None ### Request Body None ### Response #### Success Response - **type** (LinuxSoundType) - The type of sound, e.g., `LinuxSoundType.assets`. ### Response Example ```dart LinuxSoundType.assets ``` ### Implementation ```dart @override LinuxSoundType get type => LinuxSoundType.assets; ``` ``` -------------------------------- ### WebInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WebInitializationSettings/WebInitializationSettings.html Creates a new instance of WebInitializationSettings. This is the default constructor and does not require any arguments. ```dart const WebInitializationSettings(); ``` -------------------------------- ### initialize Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/initialize.html Initializes the plugin. Call this method on application before using the plugin further. It returns a bool value to indicate if initialization succeeded. On iOS, this is dependent on if permissions have been granted to show notifications. When running in an environment that is neither Android nor iOS (e.g., when running tests), this will be a no-op and return true. Note that on iOS, initialization may also request notification permissions where users will see a permissions prompt. The `onDidReceiveNotificationResponse` callback is fired when the user selects a notification or notification action that should show the application/user interface. The `onDidReceiveBackgroundNotificationResponse` callback is invoked on a background isolate for notification actions that don't show the application/user interface. ```APIDOC Future initialize({ required InitializationSettings settings, DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, DidReceiveBackgroundNotificationResponseCallback? onDidReceiveBackgroundNotificationResponse, }) ``` -------------------------------- ### Get Android Notification Sound Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidNotificationSound/sound.html This shows how to access the sound property for Android notifications. It indicates the location of the sound file. ```dart String get sound; ``` -------------------------------- ### DrawableResourceAndroidIcon.data Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/DrawableResourceAndroidIcon/data.html This property returns the name of the drawable resource. For example, if the drawable resource is located at `res/drawable/app_icon.png`, the icon name should be `app_icon`. ```APIDOC ## data property ### Description The name of the drawable resource. For example if the drawable resource is located at `res/drawable/app_icon.png`, the icon should be `app_icon` ### Implementation ```dart @override String get data => _icon; ``` ``` -------------------------------- ### DarwinInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/DarwinInitializationSettings/DarwinInitializationSettings.html Constructs an instance of DarwinInitializationSettings with customizable options for requesting permissions and default notification presentation. ```APIDOC ## DarwinInitializationSettings() ### Description Constructs an instance of DarwinInitializationSettings. ### Parameters - **requestAlertPermission** (bool) - Optional - Defaults to `true`. Whether to request the permission to show an alert. - **requestSoundPermission** (bool) - Optional - Defaults to `true`. Whether to request the permission to play a sound. - **requestBadgePermission** (bool) - Optional - Defaults to `true`. Whether to request the permission to update the application's badge count. - **requestProvisionalPermission** (bool) - Optional - Defaults to `false`. Whether to request provisional authorization, allowing notifications to be delivered silently without explicit user permission. - **requestCriticalPermission** (bool) - Optional - Defaults to `false`. Whether to request critical alert authorization, which bypasses the Do Not Disturb setting. - **requestProvidesAppNotificationSettings** (bool) - Optional - Defaults to `false`. Whether to request authorization to provide app-specific settings for notifications. - **defaultPresentAlert** (bool) - Optional - Defaults to `true`. Whether to present notifications with an alert by default. - **defaultPresentSound** (bool) - Optional - Defaults to `true`. Whether to present notifications with a sound by default. - **defaultPresentBadge** (bool) - Optional - Defaults to `true`. Whether to present notifications with a badge by default. - **defaultPresentBanner** (bool) - Optional - Defaults to `true`. Whether to present notifications as banners by default. - **defaultPresentList** (bool) - Optional - Defaults to `true`. Whether to present notifications in the notification list by default. - **notificationCategories** (List) - Optional - Defaults to an empty list. A list of notification categories to be registered with the system. ``` -------------------------------- ### LinuxInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxInitializationSettings-class.html Constructs an instance of LinuxInitializationSettings with specified default notification properties. ```APIDOC ## Constructors LinuxInitializationSettings({required String defaultActionName, LinuxNotificationIcon? defaultIcon, LinuxNotificationSound? defaultSound, bool defaultSuppressSound = false}) Constructs an instance of LinuxInitializationSettings ``` -------------------------------- ### ThemeLinuxSound Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/ThemeLinuxSound/ThemeLinuxSound.html Constructs an instance of ThemeLinuxSound with a given name. This is the primary way to initialize this class. ```dart ThemeLinuxSound(this.name); ``` -------------------------------- ### getAssetUri Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/MsixUtils-class.html Gets an `ms-appx:///` URI from a Flutter asset path. This is useful for referencing assets within an MSIX packaged application. ```APIDOC ## Static Methods getAssetUri(String path) → Uri Gets an `ms-appx:///` URI from a Flutter asset. ``` -------------------------------- ### Get Asset URI Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/MsixUtils/getAssetUri.html Constructs a `ms-appx:///` URI for a Flutter asset. Use this when referencing assets within the MSIX package. ```dart static Uri getAssetUri(String path) => Uri.parse('ms-appx:///data/flutter_assets/$path'); ``` -------------------------------- ### LinuxInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxInitializationSettings/LinuxInitializationSettings.html Constructs an instance of LinuxInitializationSettings with default values for Linux notifications. ```APIDOC ## LinuxInitializationSettings constructor ### Description Constructs an instance of LinuxInitializationSettings. ### Parameters #### Named Parameters - **defaultActionName** (String) - Required - The default action name for notifications. - **defaultIcon** (LinuxNotificationIcon?) - Optional - The default icon for notifications. - **defaultSound** (LinuxNotificationSound?) - Optional - The default sound for notifications. - **defaultSuppressSound** (bool) - Optional - Whether to suppress the default sound. Defaults to `false`. ### Example ```dart const linuxSettings = LinuxInitializationSettings( defaultActionName: 'Open App', defaultIcon: LinuxNotificationIcon(icon: 'notification_icon'), ); ``` ``` -------------------------------- ### Get Active Notifications Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/getActiveNotifications.html This snippet shows how to retrieve a list of active notifications. Ensure the platform and packaging requirements are met for Windows. ```dart Future> getActiveNotifications() => FlutterLocalNotificationsPlatform.instance.getActiveNotifications(); ``` -------------------------------- ### initialize method Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WebFlutterLocalNotificationsPlugin/initialize.html Initializes the plugin. This method should be called before any other notification-related operations. ```APIDOC ## initialize ### Description Initializes the plugin. ### Method Signature Future initialize({ DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, }) ### Parameters #### Optional Parameters - **onDidReceiveNotificationResponse** (DidReceiveNotificationResponseCallback?) - A callback function that is invoked when a user interacts with a notification. ### Implementation ```dart Future initialize({ DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, }) async => null; ``` ``` -------------------------------- ### DrawableResourceAndroidBitmap data property Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/DrawableResourceAndroidBitmap/data.html This getter returns the name of the drawable resource. For example, if the drawable resource is located at `res/drawable/app_icon.png`, the bitmap should be `app_icon`. ```dart @override String get data => _bitmap; ``` -------------------------------- ### Migrate to IOSInitializationSettings from DarwinInitializationSettings Source: https://pub.dev/documentation/flutter_local_notifications/latest/index.html Demonstrates migrating from `DarwinInitializationSettings` to `IOSInitializationSettings` to enable iOS-specific features like CarPlay permissions. The `DarwinInitializationSettings` can still be used for macOS. ```dart // Before (still works) final DarwinInitializationSettings initializationSettingsDarwin = DarwinInitializationSettings(requestAlertPermission: true); // After (with iOS-specific features) final IOSInitializationSettings initializationSettingsIOS = IOSInitializationSettings( requestAlertPermission: true, requestCarPlayPermission: true, ); ``` -------------------------------- ### InitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/InitializationSettings-class.html Constructs an instance of InitializationSettings with optional platform-specific initialization settings. ```APIDOC ## InitializationSettings Constructor ### Description Constructs an instance of InitializationSettings. ### Parameters - **android** (AndroidInitializationSettings?) - Optional settings for Android. - **iOS** (DarwinInitializationSettings?) - Optional settings for iOS. - **macOS** (DarwinInitializationSettings?) - Optional settings for macOS. - **linux** (LinuxInitializationSettings?) - Optional settings for Linux. - **windows** (WindowsInitializationSettings?) - Optional settings for Windows. - **web** (WebInitializationSettings?) - Optional settings for Web. ``` -------------------------------- ### AssetsLinuxSound Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AssetsLinuxSound/AssetsLinuxSound.html Constructs an instance of AssetsLinuxSound with a specified relative path. ```APIDOC ## AssetsLinuxSound(String relativePath) ### Description Constructs an instance of AssetsLinuxSound. ### Parameters #### Path Parameters - **relativePath** (String) - Required - The relative path to the sound asset. ``` -------------------------------- ### Get Pending Notification Requests Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/pendingNotificationRequests.html Call this method to retrieve a list of all pending notification requests. This is useful for debugging or managing scheduled notifications. ```dart Future> pendingNotificationRequests() => FlutterLocalNotificationsPlatform.instance.pendingNotificationRequests(); ``` -------------------------------- ### WindowsImage.getAssetUri Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WindowsImage-class.html A static method to get a URI for a Flutter asset, which is compatible across different build types (debug, release EXE, release MSIX). ```APIDOC ## getAssetUri ### Description Returns a URI for a Flutter asset. ### Parameters * **assetName** (String) - Required - The name of the asset. ### Returns * **Uri** - The URI for the Flutter asset. ``` -------------------------------- ### NotificationAppLaunchDetails Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/NotificationAppLaunchDetails/NotificationAppLaunchDetails.html Constructs an instance of NotificationAppLaunchDetails. Use this to manually create details about app launch from a notification. ```dart const NotificationAppLaunchDetails( this.didNotificationLaunchApp, { this.notificationResponse, }); ``` -------------------------------- ### DarwinInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/DarwinInitializationSettings-class.html Constructs an instance of DarwinInitializationSettings to configure notification permissions and default presentation options for Darwin-based platforms. ```APIDOC ## DarwinInitializationSettings Constructor ### Description Constructs an instance of DarwinInitializationSettings. ### Parameters - **requestAlertPermission** (bool) - Optional - Request permission to display an alert. Defaults to true. - **requestSoundPermission** (bool) - Optional - Request permission to play a sound. Defaults to true. - **requestBadgePermission** (bool) - Optional - Request permission to badge app icon. Defaults to true. - **requestProvisionalPermission** (bool) - Optional - Request permission to send provisional notification for iOS 12+. Defaults to false. - **requestCriticalPermission** (bool) - Optional - Request permission to show critical notifications. Defaults to false. - **requestProvidesAppNotificationSettings** (bool) - Optional - Request permission to provide custom notification settings UI. Defaults to false. - **defaultPresentAlert** (bool) - Optional - Configures the default setting on if an alert should be displayed when a notification is triggered while app is in the foreground. Defaults to true. - **defaultPresentSound** (bool) - Optional - Configures the default setting on if a sound should be played when a notification is triggered while app is in the foreground. Defaults to true. - **defaultPresentBadge** (bool) - Optional - Configures the default setting on if a badge value should be applied when a notification is triggered while app is in the foreground. Defaults to true. - **defaultPresentBanner** (bool) - Optional - Configures the default setting on if the notification should be presented as a banner when a notification is triggered while app is in the foreground. Defaults to true. - **defaultPresentList** (bool) - Optional - Configures the default setting on if the notification should be in the notification centre when notification is triggered while app is in the foreground. Defaults to true. - **notificationCategories** (List) - Optional - Configure the notification categories (DarwinNotificationCategory) available. This allows for fine-tuning of preview display. Defaults to an empty list. ``` -------------------------------- ### Get Content Property Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxNotificationIcon/content.html This snippet shows how to access the content property of a LinuxNotificationIcon object. The interpretation of the returned object is specific to the platform's implementation. ```dart Object get content; ``` -------------------------------- ### getCapabilities Method Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/LinuxFlutterLocalNotificationsPlugin/getCapabilities.html This method is intended to return Linux server capabilities but is a stub and should not be called. It will throw an UnimplementedError if invoked. ```APIDOC ## getCapabilities ### Description This method is a stub and should not be called. It exists solely to satisfy compile-time dependencies and will throw an `UnimplementedError` if invoked. ### Method Signature `Future getCapabilities()` ### Implementation Notes The implementation includes an `assert(false)` and throws `UnimplementedError` to indicate it should not be used. ``` -------------------------------- ### Get Icon Content from ByteDataLinuxIcon Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/ByteDataLinuxIcon/content.html Override the content property to return the icon data. This is used to provide the icon's byte data for display. ```dart @override Object get content => iconData; ``` -------------------------------- ### IOSInitializationSettings Constructor Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/IOSInitializationSettings-class.html Constructs an instance of IOSInitializationSettings. This allows for configuration of various notification permissions and default presentation behaviors for iOS. ```APIDOC ## IOSInitializationSettings Constructor ### Description Constructs an instance of IOSInitializationSettings. ### Parameters - **requestAlertPermission** (bool) - Optional - Defaults to `true`. Request permission to display an alert. - **requestSoundPermission** (bool) - Optional - Defaults to `true`. Request permission to play a sound. - **requestBadgePermission** (bool) - Optional - Defaults to `true`. Request permission to badge app icon. - **requestProvisionalPermission** (bool) - Optional - Defaults to `false`. Request permission to send provisional notification for iOS 12+. - **requestCriticalPermission** (bool) - Optional - Defaults to `false`. Request permission to show critical notifications. - **requestProvidesAppNotificationSettings** (bool) - Optional - Defaults to `false`. Request permission to provide custom notification settings UI. - **requestCarPlayPermission** (bool) - Optional - Defaults to `false`. Request permission to show notifications on CarPlay. - **defaultPresentAlert** (bool) - Optional - Defaults to `true`. Configures the default setting on if an alert should be displayed when a notification is triggered while app is in the foreground. - **defaultPresentSound** (bool) - Optional - Defaults to `true`. Configures the default setting on if a sound should be played when a notification is triggered while app is in the foreground. - **defaultPresentBadge** (bool) - Optional - Defaults to `true`. Configures the default setting on if a badge value should be applied when a notification is triggered while app is in the foreground. - **defaultPresentBanner** (bool) - Optional - Defaults to `true`. Configures the default setting on if the notification should be presented as a banner when a notification is triggered while app is in the foreground. - **defaultPresentList** (bool) - Optional - Defaults to `true`. Configures the default setting on if the notification should be in the notification centre when notification is triggered while app is in the foreground. - **notificationCategories** (List) - Optional - Defaults to an empty list. Configure the notification categories (DarwinNotificationCategory) available. This allows for fine-tuning of preview display. ``` -------------------------------- ### Get Implementation-Defined Sound Content Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AssetsLinuxSound/content.html This code snippet shows how to override the content property to return the relative path for implementation-defined sound content on Linux. ```dart @override Object get content => relativePath; ``` -------------------------------- ### Get Pending Notification Requests Source: https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidFlutterLocalNotificationsPlugin/pendingNotificationRequests.html This method retrieves a list of all pending notification requests. It's important to note that this method is specific to the Android platform. ```dart @override Future> pendingNotificationRequests() async { final List>? pendingNotifications = await _channel .invokeListMethod('pendingNotificationRequests'); return pendingNotifications ?.map( (p) => PendingNotificationRequest( p['id'], p['title'], p['body'], p['payload'], ), ) .toList() ?? []; } ```