From 6d8b2d8ba2132913f0548cec1cd9d538e37f14bf Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 15:20:06 +0100 Subject: [PATCH 1/8] Fix warnings and improve compatibility in plugin Removed unused [this] capture in lambda to fix warnings and wrapped the result map in EncodableValue for compatibility. --- .../windows/permission_handler_windows_plugin.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp index 4b4d6d184..e41d1d25a 100644 --- a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp +++ b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp @@ -87,8 +87,9 @@ void PermissionHandlerWindowsPlugin::RegisterWithRegistrar( } PermissionHandlerWindowsPlugin::PermissionHandlerWindowsPlugin(){ + // FIX: Removed [this] capture as it was unused and caused warnings in clang-cl m_positionChangedRevoker = geolocator.PositionChanged(winrt::auto_revoke, - [this](Geolocator const& geolocator, PositionChangedEventArgs e) + [](Geolocator const& geolocator, PositionChangedEventArgs e) { }); } @@ -139,7 +140,10 @@ void PermissionHandlerWindowsPlugin::HandleMethodCall( requestResults.insert({EncodableValue(permissions[i]), EncodableValue((int)permissionStatus)}); } - result->Success(requestResults); + // FIX: Explicitly wrap the map in EncodableValue for clang-cl compatibility. + // This is also valid for MSVC. + result->Success(EncodableValue(requestResults)); + } else if (methodName.compare("shouldShowRequestPermissionRationale") == 0 || methodName.compare("openAppSettings")) { result->Success(EncodableValue(false)); From 7044dc0f97c644b51409662cba10051900b88dca Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 15:45:23 +0100 Subject: [PATCH 2/8] Bump version to 0.2.2 in pubspec.yaml --- permission_handler_windows/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/permission_handler_windows/pubspec.yaml b/permission_handler_windows/pubspec.yaml index f5553e0d6..3495a07b7 100644 --- a/permission_handler_windows/pubspec.yaml +++ b/permission_handler_windows/pubspec.yaml @@ -1,6 +1,6 @@ name: permission_handler_windows description: Permission plugin for Flutter. This plugin provides the Windows API to request and check permissions. -version: 0.2.1 +version: 0.2.2 homepage: https://github.com/baseflow/flutter-permission-handler flutter: From cd5d8bf949239fb3cbef8698fba89b649e81b98a Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 15:45:37 +0100 Subject: [PATCH 3/8] Update permission_handler_windows version to 0.2.2 --- permission_handler/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/permission_handler/pubspec.yaml b/permission_handler/pubspec.yaml index 3e0861cd9..d36f20a31 100644 --- a/permission_handler/pubspec.yaml +++ b/permission_handler/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: permission_handler_android: ^13.0.0 permission_handler_apple: ^9.4.6 permission_handler_html: ^0.1.1 - permission_handler_windows: ^0.2.1 + permission_handler_windows: ^0.2.2 permission_handler_platform_interface: ^4.3.0 dev_dependencies: From 830c449efd436dd1daed6fa2dc337e0c71ac265b Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 15:47:17 +0100 Subject: [PATCH 4/8] Update CHANGELOG for version 0.2.2 Added clang-cl support and updated type conversion for request results. --- permission_handler_windows/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/permission_handler_windows/CHANGELOG.md b/permission_handler_windows/CHANGELOG.md index 91c2f5049..c39055bb8 100644 --- a/permission_handler_windows/CHANGELOG.md +++ b/permission_handler_windows/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.2 + +* clang-cl support +* Explicit Type Conversion: Wrapped `requestResults` in `flutter::EncodableValue(...)` before passing it to `result->Success() + ## 0.2.1 * Updates the dependency on `permission_handler_platform_interface` to version 4.1.0 (SiriKit support is only available for iOS and macOS). From b771bdb0c9553b3f1b8e7714418fda8279a56aca Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 15:47:45 +0100 Subject: [PATCH 5/8] Bump version to 12.0.2 --- permission_handler/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/permission_handler/pubspec.yaml b/permission_handler/pubspec.yaml index d36f20a31..622c8b62a 100644 --- a/permission_handler/pubspec.yaml +++ b/permission_handler/pubspec.yaml @@ -2,7 +2,7 @@ name: permission_handler description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. repository: https://github.com/baseflow/flutter-permission-handler issue_tracker: https://github.com/Baseflow/flutter-permission-handler/issues -version: 12.0.1 +version: 12.0.2 environment: sdk: ^3.5.0 From 006d364534df1f77dac469e01cec327f85a5cf77 Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 15:48:33 +0100 Subject: [PATCH 6/8] Update Windows permission handler for clang-cl Updated the Windows permission handler for clang-cl compatibility. --- permission_handler/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/permission_handler/CHANGELOG.md b/permission_handler/CHANGELOG.md index 576f07f1b..77b608e12 100644 --- a/permission_handler/CHANGELOG.md +++ b/permission_handler/CHANGELOG.md @@ -1,3 +1,7 @@ +## 12.0.2 + +- Updated windows permission handler to be compatible with clang-cl + ## 12.0.1 - Updates the correspondence between permission groups and the key values of Info.plist in the README.md. From 39d2c2795b29a78fe841b91e604636f1476ac2df Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 16:00:51 +0100 Subject: [PATCH 7/8] Update permission_handler_windows_plugin.cpp --- .../windows/permission_handler_windows_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp index e41d1d25a..6cd461baa 100644 --- a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp +++ b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp @@ -87,9 +87,9 @@ void PermissionHandlerWindowsPlugin::RegisterWithRegistrar( } PermissionHandlerWindowsPlugin::PermissionHandlerWindowsPlugin(){ - // FIX: Removed [this] capture as it was unused and caused warnings in clang-cl + m_positionChangedRevoker = geolocator.PositionChanged(winrt::auto_revoke, - [](Geolocator const& geolocator, PositionChangedEventArgs e) + [this](Geolocator const& geolocator, PositionChangedEventArgs e) { }); } From aa452d965d6c6aee9fa0e382c1fab37fbb37a959 Mon Sep 17 00:00:00 2001 From: Jonas Heinle Date: Fri, 13 Feb 2026 16:01:33 +0100 Subject: [PATCH 8/8] Update permission_handler_windows_plugin.cpp --- .../windows/permission_handler_windows_plugin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp index 6cd461baa..9e21c5f1e 100644 --- a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp +++ b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp @@ -87,7 +87,6 @@ void PermissionHandlerWindowsPlugin::RegisterWithRegistrar( } PermissionHandlerWindowsPlugin::PermissionHandlerWindowsPlugin(){ - m_positionChangedRevoker = geolocator.PositionChanged(winrt::auto_revoke, [this](Geolocator const& geolocator, PositionChangedEventArgs e) {