diff --git a/permission_handler_windows/CHANGELOG.md b/permission_handler_windows/CHANGELOG.md index f951b347d..16c53c586 100644 --- a/permission_handler_windows/CHANGELOG.md +++ b/permission_handler_windows/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.2.3 + +* Fixes compilation with `clang-cl` (LLVM) by explicitly wrapping the request results map in a `flutter::EncodableValue` before passing it to `result->Success()`. +* Removes the unused `this` capture and the unused parameter names from the `Geolocator.PositionChanged` lambda, which triggered `-Wunused-lambda-capture` and `-Wunused-parameter`. +* Iterates the requested permissions with a `size_t` index, fixing the signed/unsigned comparison warning that `/W4 /WX` builds turn into an error. + ## 0.2.2 * Added support for the new Android 17 permission `ACCESS_LOCAL_NETWORK` diff --git a/permission_handler_windows/pubspec.yaml b/permission_handler_windows/pubspec.yaml index b01412999..7f9594c67 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.2 +version: 0.2.3 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..8c4860ba2 100644 --- a/permission_handler_windows/windows/permission_handler_windows_plugin.cpp +++ b/permission_handler_windows/windows/permission_handler_windows_plugin.cpp @@ -88,7 +88,7 @@ void PermissionHandlerWindowsPlugin::RegisterWithRegistrar( PermissionHandlerWindowsPlugin::PermissionHandlerWindowsPlugin(){ m_positionChangedRevoker = geolocator.PositionChanged(winrt::auto_revoke, - [this](Geolocator const& geolocator, PositionChangedEventArgs e) + [](Geolocator const&, PositionChangedEventArgs) { }); } @@ -134,12 +134,14 @@ void PermissionHandlerWindowsPlugin::HandleMethodCall( EncodableMap requestResults; - for (int i=0;iSuccess(requestResults); + // Explicitly wrap the map in an EncodableValue. MSVC accepts the implicit + // conversion, but clang-cl does not and fails to find a matching overload. + result->Success(EncodableValue(requestResults)); } else if (methodName.compare("shouldShowRequestPermissionRationale") == 0 || methodName.compare("openAppSettings")) { result->Success(EncodableValue(false));