# flutter_local_notifications_windows 3.1.1

Windows implementation of the flutter_local_notifications plugin




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add flutter_local_notifications_windows
```
Published: 2026-06-14T07:30:41.042135Z
Expected archive SHA-256: 6f43bdd03b171b7a90f22647506fea33e2bb12294b7c7c7a3d690e960a382945

Available in cache; verification: upstream_checksum
## Direct dependencies
- ffi: ^2.1.2
- flutter: map[sdk:flutter]
- flutter_local_notifications_platform_interface: ^12.0.0
- meta: ^1.11.0
- timezone: ^0.11.0
- xml: >=6.5.0 <8.0.0

## Package README (untrusted upstream documentation)
# flutter_local_notifications_windows

The Windows implementation of `package:flutter_local_notifications` as an FFI package that can be run in plain Dart or as a Flutter plugin. See [the docs on FFI](https://dart.dev/interop/c-interop).

## Limitations

- Windows does not support repeating notifications, so [`periodicallyShow`](https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/periodicallyShow.html) and [`periodicallyShowWithDuration`](https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/periodicallyShowWithDuration.html) will throw `UnsupportedError`s.
- Windows only allows apps with package identity to retrieve previously shown notifications. This means that on an app that was not packaged as an [MSIX](https://learn.microsoft.com/en-us/windows/msix/overview) installer, [`cancel`](https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/cancel.html) does nothing and [getActiveNotifications](https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/getActiveNotifications.html) will return an empty list. To package your app as an MSIX, see [`package:msix`](https://pub.dev/packages/msix) and the `msix` section in [the example's `pubspec.yaml`](https://github.com/MaikuB/flutter_local_notifications/blob/master/flutter_local_notifications/example/pubspec.yaml).

## Project structure

This template uses the following structure:

- `src`: Contains the native source code, and a CmakeFile.txt file for building
  that source code into a dynamic library. Within this folder, there are three C++ files:
  - `ffi_api.h`/`ffi_api.cpp`: A C-compatible header file with the API that will be used by Dart, and the C++ implementation of that API
  - `plugin.hpp`/`plugin.cpp`: A C++ class holding handles to the [C++/WinRT](https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/) SDK, along with some Windows-heavy logic. `ffi_api.cpp` implements its features using this class.
  - `utils.hpp`/`utils.cpp` handle copying and allocating data from C structs to  WinRT classes and vice-versa. Since FFI is done over C-based APIs, C++ types like strings, maps, and vectors need to be translated.

- `lib`: Contains the Dart code that defines the API of the plugin, and which
  calls into the native code using `dart:ffi`.
  - The `details` folder holds all the Windows-specific notification configurations such as `WindowsAction`, `WindowsImage`, etc.
  - The `ffi` folder holds the generated bindings (see below) and other FFI utilities.
  - The `plugin` folder implements `package:flutter_local_notifications_platform_interface` in two ways: a stub for platforms that don't support FFI, and an FFI-based implementation.

- The `windows` folder contains the build files for building and bundling the native code library with the platform application.

## Building and bundling native code

The code in `src` can be built with CMake. A `build.bat` file is included, which has the following code:

```batch
@echo off
cd build
cmake ../windows
cmake --build .
cd ..
copy build\shared\Debug\flutter_local_notifications_windows.dll .
```

This generates a DLL from the native code and copies it to the current directory. This is useful for testing locally without Flutter. When using Flutter, this step is unnecessary as Flutter will build and bundle the assets for you.

## Binding to native code

To use the native code, bindings in Dart are needed.
To avoid writing these by hand, they are generated from the header file
`src/ffi_api.h` by `package:ffigen`.
Regenerate the bindings by running `dart run ffigen --config ffigen.yaml`.

## Changelog
## [3.1.1]

* Suppress warning around usage of experimental coroutines. This is to fix issue [#2777](https://github.com/MaikuB/flutter_local_notifications/issues/2777)

## [3.1.0]

* Updated `periodicallyShow()` to accept `payload` and `notificationDetails` as optional parameters
* Bumped `xml` dependency so that supported range is `>=6.5.0 <8.0.0`
* Bumped dependency on `flutter_local_notifications_platform_interface`

## [3.0.0]

* **Breaking change** bumped minimum Flutter SDK requirement to 3.38.1 and Dart SDK requirement to 3.10.0
* Bumped `timezone` dependency

## [2.0.1]

* Non-functional change: addressed the [`use_null_aware_elements`](https://dart.dev/tools/diagnostics/use_null_aware_elements) linter issue
  
## [2.0.0]

* **Breaking change** bumped minimum Flutter SDK requirement to 3.32.0 and Dart SDK requirement to 3.8.0
* **Breaking changes** the positional parameters in the following methods have now been converted to named parameters
  * `initialize()`
  * `show()`
  * `showRawXml()`
  * `periodicallyShow()`
  * `periodicallyShowWithDuration()`
  * `cancel()`
  * `zonedSchedule()`
  * `zonedScheduleRawXml()`
* **Breaking changes** to align with the main the plugin, the following parameters have been renamed
  * the `details` parameter in the `show()` and `zonedSchedule()` methods has been renamed to `notificationDetails`
  * the `onNotificationReceived` in the `initialize()` method has been renamed to `onDidReceiveNotificationResponse`
* **Breaking change** removed the `details` parameter from the `zonedScheduleRawXml()` method as it was not actually used. Thanks to the PR from [Levi Lesches](https://github.com/Levi-Lesches)
* Bumped `ffigen` and regenerated bindings. Credits to [Levi Lesches](https://github.com/Levi-Lesches) who originally looked at this before the plugin had its minimum Flutter version bumped
* Added `flutter_lints` to apply linter rules

## [1.0.3]

* Fixed issue where non-ASCII characters for the notification [application name](https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/WindowsInitializationSettings/appName.html) weren't being displayed properly. Thanks to the PR from [yoyoIU](https://github.com/yoyo930021)

## [1.0.2]

* Fixed issue [#2648](https://github.com/MaikuB/flutter_local_notifications/issues/2648) where non-ASCII characters in the notification payload were not being handled properly. Thanks to the PR from [yoyoIU](https://github.com/yoyo930021)

## [1.0.1]

* Fixed issue [#2651](https://github.com/MaikuB/flutter_local_notifications/issues/2651) where unresolved symbols occurred with changes in introduced in newer Windows SDKs. Thanks to the PR from [Sebastien](https://github.com/Sebastien-VZN)

## [1.0.0]

* Initial release for Windows. Thanks to PR [Levi Lesches](https://github.com/Levi-Lesches) that continued the work done initially done by [Kenneth](https://github.com/kennethnym) and [lightrabbit](https://github.com/lightrabbit)






 
