[local_auth] Update Windows Pigeon version (#4388)
Updates to the latest version of Pigeon.
This is largely a no-op, the generated output changes are formatting tweaks and picking up one bugfix to the error code/message ordering. The goal here is just to be using a newer version of Pigeon to minimize future dependency issues along the lines of https://github.com/flutter/packages/pull/4383
diff --git a/packages/local_auth/local_auth_windows/CHANGELOG.md b/packages/local_auth/local_auth_windows/CHANGELOG.md
index ed9de2a..4c6238a 100644
--- a/packages/local_auth/local_auth_windows/CHANGELOG.md
+++ b/packages/local_auth/local_auth_windows/CHANGELOG.md
@@ -1,5 +1,6 @@
-## NEXT
+## 1.0.9
+* Updates to Pigeon 10.0.
* Fixes stale ignore: prefer_const_constructors.
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
diff --git a/packages/local_auth/local_auth_windows/lib/src/messages.g.dart b/packages/local_auth/local_auth_windows/lib/src/messages.g.dart
index 312d1c0..f303a08 100644
--- a/packages/local_auth/local_auth_windows/lib/src/messages.g.dart
+++ b/packages/local_auth/local_auth_windows/lib/src/messages.g.dart
@@ -1,9 +1,10 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Autogenerated from Pigeon (v5.0.1), do not edit directly.
+// Autogenerated from Pigeon (v10.1.2), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
+
import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List;
diff --git a/packages/local_auth/local_auth_windows/pubspec.yaml b/packages/local_auth/local_auth_windows/pubspec.yaml
index c40d11f..610fa77 100644
--- a/packages/local_auth/local_auth_windows/pubspec.yaml
+++ b/packages/local_auth/local_auth_windows/pubspec.yaml
@@ -2,7 +2,7 @@
description: Windows implementation of the local_auth plugin.
repository: https://github.com/flutter/packages/tree/main/packages/local_auth/local_auth_windows
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22
-version: 1.0.8
+version: 1.0.9
environment:
sdk: ">=3.0.0 <4.0.0"
@@ -24,4 +24,4 @@
dev_dependencies:
flutter_test:
sdk: flutter
- pigeon: ^5.0.1
+ pigeon: ^10.1.2
diff --git a/packages/local_auth/local_auth_windows/windows/messages.g.cpp b/packages/local_auth/local_auth_windows/windows/messages.g.cpp
index e44b17c..6b77190 100644
--- a/packages/local_auth/local_auth_windows/windows/messages.g.cpp
+++ b/packages/local_auth/local_auth_windows/windows/messages.g.cpp
@@ -1,7 +1,7 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Autogenerated from Pigeon (v5.0.1), do not edit directly.
+// Autogenerated from Pigeon (v10.1.2), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#undef _HAS_EXCEPTIONS
@@ -18,6 +18,12 @@
#include <string>
namespace local_auth_windows {
+using flutter::BasicMessageChannel;
+using flutter::CustomEncodableValue;
+using flutter::EncodableList;
+using flutter::EncodableMap;
+using flutter::EncodableValue;
+
/// The codec used by LocalAuthApi.
const flutter::StandardMessageCodec& LocalAuthApi::GetCodec() {
return flutter::StandardMessageCodec::GetInstance(
@@ -29,24 +35,23 @@
void LocalAuthApi::SetUp(flutter::BinaryMessenger* binary_messenger,
LocalAuthApi* api) {
{
- auto channel =
- std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
- binary_messenger,
- "dev.flutter.pigeon.LocalAuthApi.isDeviceSupported", &GetCodec());
+ auto channel = std::make_unique<BasicMessageChannel<>>(
+ binary_messenger, "dev.flutter.pigeon.LocalAuthApi.isDeviceSupported",
+ &GetCodec());
if (api != nullptr) {
channel->SetMessageHandler(
- [api](const flutter::EncodableValue& message,
- const flutter::MessageReply<flutter::EncodableValue>& reply) {
+ [api](const EncodableValue& message,
+ const flutter::MessageReply<EncodableValue>& reply) {
try {
api->IsDeviceSupported([reply](ErrorOr<bool>&& output) {
if (output.has_error()) {
reply(WrapError(output.error()));
return;
}
- flutter::EncodableList wrapped;
+ EncodableList wrapped;
wrapped.push_back(
- flutter::EncodableValue(std::move(output).TakeValue()));
- reply(flutter::EncodableValue(std::move(wrapped)));
+ EncodableValue(std::move(output).TakeValue()));
+ reply(EncodableValue(std::move(wrapped)));
});
} catch (const std::exception& exception) {
reply(WrapError(exception.what()));
@@ -57,16 +62,15 @@
}
}
{
- auto channel =
- std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
- binary_messenger, "dev.flutter.pigeon.LocalAuthApi.authenticate",
- &GetCodec());
+ auto channel = std::make_unique<BasicMessageChannel<>>(
+ binary_messenger, "dev.flutter.pigeon.LocalAuthApi.authenticate",
+ &GetCodec());
if (api != nullptr) {
channel->SetMessageHandler(
- [api](const flutter::EncodableValue& message,
- const flutter::MessageReply<flutter::EncodableValue>& reply) {
+ [api](const EncodableValue& message,
+ const flutter::MessageReply<EncodableValue>& reply) {
try {
- const auto& args = std::get<flutter::EncodableList>(message);
+ const auto& args = std::get<EncodableList>(message);
const auto& encodable_localized_reason_arg = args.at(0);
if (encodable_localized_reason_arg.IsNull()) {
reply(WrapError("localized_reason_arg unexpectedly null."));
@@ -80,10 +84,10 @@
reply(WrapError(output.error()));
return;
}
- flutter::EncodableList wrapped;
+ EncodableList wrapped;
wrapped.push_back(
- flutter::EncodableValue(std::move(output).TakeValue()));
- reply(flutter::EncodableValue(std::move(wrapped)));
+ EncodableValue(std::move(output).TakeValue()));
+ reply(EncodableValue(std::move(wrapped)));
});
} catch (const std::exception& exception) {
reply(WrapError(exception.what()));
@@ -95,16 +99,16 @@
}
}
-flutter::EncodableValue LocalAuthApi::WrapError(
- std::string_view error_message) {
- return flutter::EncodableValue(flutter::EncodableList{
- flutter::EncodableValue(std::string(error_message)),
- flutter::EncodableValue("Error"), flutter::EncodableValue()});
+EncodableValue LocalAuthApi::WrapError(std::string_view error_message) {
+ return EncodableValue(
+ EncodableList{EncodableValue(std::string(error_message)),
+ EncodableValue("Error"), EncodableValue()});
}
-flutter::EncodableValue LocalAuthApi::WrapError(const FlutterError& error) {
- return flutter::EncodableValue(flutter::EncodableList{
- flutter::EncodableValue(error.message()),
- flutter::EncodableValue(error.code()), error.details()});
+
+EncodableValue LocalAuthApi::WrapError(const FlutterError& error) {
+ return EncodableValue(EncodableList{EncodableValue(error.code()),
+ EncodableValue(error.message()),
+ error.details()});
}
} // namespace local_auth_windows
diff --git a/packages/local_auth/local_auth_windows/windows/messages.g.h b/packages/local_auth/local_auth_windows/windows/messages.g.h
index 2ceff77..60a8095 100644
--- a/packages/local_auth/local_auth_windows/windows/messages.g.h
+++ b/packages/local_auth/local_auth_windows/windows/messages.g.h
@@ -1,11 +1,11 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Autogenerated from Pigeon (v5.0.1), do not edit directly.
+// Autogenerated from Pigeon (v10.1.2), do not edit directly.
// See also: https://pub.dev/packages/pigeon
-#ifndef PIGEON_LOCAL_AUTH_WINDOWS_H_
-#define PIGEON_LOCAL_AUTH_WINDOWS_H_
+#ifndef PIGEON_MESSAGES_G_H_
+#define PIGEON_MESSAGES_G_H_
#include <flutter/basic_message_channel.h>
#include <flutter/binary_messenger.h>
#include <flutter/encodable_value.h>
@@ -41,10 +41,10 @@
template <class T>
class ErrorOr {
public:
- ErrorOr(const T& rhs) { new (&v_) T(rhs); }
- ErrorOr(const T&& rhs) { v_ = std::move(rhs); }
- ErrorOr(const FlutterError& rhs) { new (&v_) FlutterError(rhs); }
- ErrorOr(const FlutterError&& rhs) { v_ = std::move(rhs); }
+ ErrorOr(const T& rhs) : v_(rhs) {}
+ ErrorOr(const T&& rhs) : v_(std::move(rhs)) {}
+ ErrorOr(const FlutterError& rhs) : v_(rhs) {}
+ ErrorOr(const FlutterError&& rhs) : v_(std::move(rhs)) {}
bool has_error() const { return std::holds_alternative<FlutterError>(v_); }
const T& value() const { return std::get<T>(v_); };
@@ -64,7 +64,7 @@
public:
LocalAuthApi(const LocalAuthApi&) = delete;
LocalAuthApi& operator=(const LocalAuthApi&) = delete;
- virtual ~LocalAuthApi(){};
+ virtual ~LocalAuthApi() {}
// Returns true if this device supports authentication.
virtual void IsDeviceSupported(
std::function<void(ErrorOr<bool> reply)> result) = 0;
@@ -90,4 +90,4 @@
LocalAuthApi() = default;
};
} // namespace local_auth_windows
-#endif // PIGEON_LOCAL_AUTH_WINDOWS_H_
+#endif // PIGEON_MESSAGES_G_H_