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. diff --git a/permission_handler/pubspec.yaml b/permission_handler/pubspec.yaml index 3e0861cd9..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 @@ -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: 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). 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: diff --git a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp index 4b4d6d184..9e21c5f1e 100644 --- a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp +++ b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp @@ -139,7 +139,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));