Skip to content

Commit b61eea1

Browse files
authored
Roll pigeon dependency to unblock flutter framework deps roll (#4383)
Update pigeon dependency for url_launcher_windows. This is required to unblock flutter dependency update - see flutter/flutter#130032
1 parent 9bcf4bf commit b61eea1

File tree

5 files changed

+48
-46
lines changed

5 files changed

+48
-46
lines changed

packages/url_launcher/url_launcher_windows/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 3.0.7
22

3+
* Updates pigeon dependency for url_launcher_windows to "^10.1.2".
34
* Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.
45

56
## 3.0.6

packages/url_launcher/url_launcher_windows/lib/src/messages.g.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v5.0.1), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.2), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
// 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
7+
78
import 'dart:async';
89
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List;
910

packages/url_launcher/url_launcher_windows/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: url_launcher_windows
22
description: Windows implementation of the url_launcher plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_windows
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
5-
version: 3.0.6
5+
version: 3.0.7
66

77
environment:
88
sdk: ">=2.18.0 <4.0.0"
@@ -24,5 +24,5 @@ dependencies:
2424
dev_dependencies:
2525
flutter_test:
2626
sdk: flutter
27-
pigeon: ^5.0.1
27+
pigeon: ^10.1.2
2828
test: ^1.16.3
Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v5.0.1), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.2), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
#undef _HAS_EXCEPTIONS
@@ -18,6 +18,11 @@
1818
#include <string>
1919

2020
namespace url_launcher_windows {
21+
using flutter::BasicMessageChannel;
22+
using flutter::CustomEncodableValue;
23+
using flutter::EncodableList;
24+
using flutter::EncodableMap;
25+
using flutter::EncodableValue;
2126

2227
/// The codec used by UrlLauncherApi.
2328
const flutter::StandardMessageCodec& UrlLauncherApi::GetCodec() {
@@ -30,16 +35,15 @@ const flutter::StandardMessageCodec& UrlLauncherApi::GetCodec() {
3035
void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
3136
UrlLauncherApi* api) {
3237
{
33-
auto channel =
34-
std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
35-
binary_messenger, "dev.flutter.pigeon.UrlLauncherApi.canLaunchUrl",
36-
&GetCodec());
38+
auto channel = std::make_unique<BasicMessageChannel<>>(
39+
binary_messenger, "dev.flutter.pigeon.UrlLauncherApi.canLaunchUrl",
40+
&GetCodec());
3741
if (api != nullptr) {
3842
channel->SetMessageHandler(
39-
[api](const flutter::EncodableValue& message,
40-
const flutter::MessageReply<flutter::EncodableValue>& reply) {
43+
[api](const EncodableValue& message,
44+
const flutter::MessageReply<EncodableValue>& reply) {
4145
try {
42-
const auto& args = std::get<flutter::EncodableList>(message);
46+
const auto& args = std::get<EncodableList>(message);
4347
const auto& encodable_url_arg = args.at(0);
4448
if (encodable_url_arg.IsNull()) {
4549
reply(WrapError("url_arg unexpectedly null."));
@@ -51,10 +55,9 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
5155
reply(WrapError(output.error()));
5256
return;
5357
}
54-
flutter::EncodableList wrapped;
55-
wrapped.push_back(
56-
flutter::EncodableValue(std::move(output).TakeValue()));
57-
reply(flutter::EncodableValue(std::move(wrapped)));
58+
EncodableList wrapped;
59+
wrapped.push_back(EncodableValue(std::move(output).TakeValue()));
60+
reply(EncodableValue(std::move(wrapped)));
5861
} catch (const std::exception& exception) {
5962
reply(WrapError(exception.what()));
6063
}
@@ -64,16 +67,15 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
6467
}
6568
}
6669
{
67-
auto channel =
68-
std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
69-
binary_messenger, "dev.flutter.pigeon.UrlLauncherApi.launchUrl",
70-
&GetCodec());
70+
auto channel = std::make_unique<BasicMessageChannel<>>(
71+
binary_messenger, "dev.flutter.pigeon.UrlLauncherApi.launchUrl",
72+
&GetCodec());
7173
if (api != nullptr) {
7274
channel->SetMessageHandler(
73-
[api](const flutter::EncodableValue& message,
74-
const flutter::MessageReply<flutter::EncodableValue>& reply) {
75+
[api](const EncodableValue& message,
76+
const flutter::MessageReply<EncodableValue>& reply) {
7577
try {
76-
const auto& args = std::get<flutter::EncodableList>(message);
78+
const auto& args = std::get<EncodableList>(message);
7779
const auto& encodable_url_arg = args.at(0);
7880
if (encodable_url_arg.IsNull()) {
7981
reply(WrapError("url_arg unexpectedly null."));
@@ -85,9 +87,9 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
8587
reply(WrapError(output.value()));
8688
return;
8789
}
88-
flutter::EncodableList wrapped;
89-
wrapped.push_back(flutter::EncodableValue());
90-
reply(flutter::EncodableValue(std::move(wrapped)));
90+
EncodableList wrapped;
91+
wrapped.push_back(EncodableValue());
92+
reply(EncodableValue(std::move(wrapped)));
9193
} catch (const std::exception& exception) {
9294
reply(WrapError(exception.what()));
9395
}
@@ -98,16 +100,16 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
98100
}
99101
}
100102

101-
flutter::EncodableValue UrlLauncherApi::WrapError(
102-
std::string_view error_message) {
103-
return flutter::EncodableValue(flutter::EncodableList{
104-
flutter::EncodableValue(std::string(error_message)),
105-
flutter::EncodableValue("Error"), flutter::EncodableValue()});
103+
EncodableValue UrlLauncherApi::WrapError(std::string_view error_message) {
104+
return EncodableValue(
105+
EncodableList{EncodableValue(std::string(error_message)),
106+
EncodableValue("Error"), EncodableValue()});
106107
}
107-
flutter::EncodableValue UrlLauncherApi::WrapError(const FlutterError& error) {
108-
return flutter::EncodableValue(flutter::EncodableList{
109-
flutter::EncodableValue(error.message()),
110-
flutter::EncodableValue(error.code()), error.details()});
108+
109+
EncodableValue UrlLauncherApi::WrapError(const FlutterError& error) {
110+
return EncodableValue(EncodableList{EncodableValue(error.code()),
111+
EncodableValue(error.message()),
112+
error.details()});
111113
}
112114

113115
} // namespace url_launcher_windows

packages/url_launcher/url_launcher_windows/windows/messages.g.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v5.0.1), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.2), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

7-
#ifndef PIGEON_H_
8-
#define PIGEON_H_
7+
#ifndef PIGEON_MESSAGES_G_H_
8+
#define PIGEON_MESSAGES_G_H_
99
#include <flutter/basic_message_channel.h>
1010
#include <flutter/binary_messenger.h>
1111
#include <flutter/encodable_value.h>
@@ -41,10 +41,10 @@ class FlutterError {
4141
template <class T>
4242
class ErrorOr {
4343
public:
44-
ErrorOr(const T& rhs) { new (&v_) T(rhs); }
45-
ErrorOr(const T&& rhs) { v_ = std::move(rhs); }
46-
ErrorOr(const FlutterError& rhs) { new (&v_) FlutterError(rhs); }
47-
ErrorOr(const FlutterError&& rhs) { v_ = std::move(rhs); }
44+
ErrorOr(const T& rhs) : v_(rhs) {}
45+
ErrorOr(const T&& rhs) : v_(std::move(rhs)) {}
46+
ErrorOr(const FlutterError& rhs) : v_(rhs) {}
47+
ErrorOr(const FlutterError&& rhs) : v_(std::move(rhs)) {}
4848

4949
bool has_error() const { return std::holds_alternative<FlutterError>(v_); }
5050
const T& value() const { return std::get<T>(v_); };
@@ -64,7 +64,7 @@ class UrlLauncherApi {
6464
public:
6565
UrlLauncherApi(const UrlLauncherApi&) = delete;
6666
UrlLauncherApi& operator=(const UrlLauncherApi&) = delete;
67-
virtual ~UrlLauncherApi(){};
67+
virtual ~UrlLauncherApi() {}
6868
virtual ErrorOr<bool> CanLaunchUrl(const std::string& url) = 0;
6969
virtual std::optional<FlutterError> LaunchUrl(const std::string& url) = 0;
7070

@@ -80,7 +80,5 @@ class UrlLauncherApi {
8080
protected:
8181
UrlLauncherApi() = default;
8282
};
83-
8483
} // namespace url_launcher_windows
85-
86-
#endif // PIGEON_H_
84+
#endif // PIGEON_MESSAGES_G_H_

0 commit comments

Comments
 (0)