Skip to content

Commit e59c1a3

Browse files
[url_launcher] Update Pigeon version for Linux
Updates to the latest version of Pigeon, picking up the change to make the declarations of some classes public rather than in the implementation file. Fixes flutter/flutter#153083
1 parent 9c294ef commit e59c1a3

File tree

6 files changed

+73
-44
lines changed

6 files changed

+73
-44
lines changed

packages/url_launcher/url_launcher_linux/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.2.1
2+
3+
* Updates Pigeon to resolve a compilation failure with some versions of glib.
4+
15
## 3.2.0
26

37
* Updates platform channels to use Pigeon.
Lines changed: 51 additions & 34 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 (v21.1.0), do not edit directly.
4+
// Autogenerated from Pigeon (v22.6.1), 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, no_leading_underscores_for_local_identifiers
77

@@ -20,6 +20,23 @@ PlatformException _createConnectionError(String channelName) {
2020

2121
class _PigeonCodec extends StandardMessageCodec {
2222
const _PigeonCodec();
23+
@override
24+
void writeValue(WriteBuffer buffer, Object? value) {
25+
if (value is int) {
26+
buffer.putUint8(4);
27+
buffer.putInt64(value);
28+
} else {
29+
super.writeValue(buffer, value);
30+
}
31+
}
32+
33+
@override
34+
Object? readValueOfType(int type, ReadBuffer buffer) {
35+
switch (type) {
36+
default:
37+
return super.readValueOfType(type, buffer);
38+
}
39+
}
2340
}
2441

2542
class UrlLauncherApi {
@@ -28,67 +45,67 @@ class UrlLauncherApi {
2845
/// BinaryMessenger will be used which routes to the host platform.
2946
UrlLauncherApi(
3047
{BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
31-
: __pigeon_binaryMessenger = binaryMessenger,
32-
__pigeon_messageChannelSuffix =
48+
: pigeonVar_binaryMessenger = binaryMessenger,
49+
pigeonVar_messageChannelSuffix =
3350
messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
34-
final BinaryMessenger? __pigeon_binaryMessenger;
51+
final BinaryMessenger? pigeonVar_binaryMessenger;
3552

3653
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
3754

38-
final String __pigeon_messageChannelSuffix;
55+
final String pigeonVar_messageChannelSuffix;
3956

4057
/// Returns true if the URL can definitely be launched.
4158
Future<bool> canLaunchUrl(String url) async {
42-
final String __pigeon_channelName =
43-
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.canLaunchUrl$__pigeon_messageChannelSuffix';
44-
final BasicMessageChannel<Object?> __pigeon_channel =
59+
final String pigeonVar_channelName =
60+
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.canLaunchUrl$pigeonVar_messageChannelSuffix';
61+
final BasicMessageChannel<Object?> pigeonVar_channel =
4562
BasicMessageChannel<Object?>(
46-
__pigeon_channelName,
63+
pigeonVar_channelName,
4764
pigeonChannelCodec,
48-
binaryMessenger: __pigeon_binaryMessenger,
65+
binaryMessenger: pigeonVar_binaryMessenger,
4966
);
50-
final List<Object?>? __pigeon_replyList =
51-
await __pigeon_channel.send(<Object?>[url]) as List<Object?>?;
52-
if (__pigeon_replyList == null) {
53-
throw _createConnectionError(__pigeon_channelName);
54-
} else if (__pigeon_replyList.length > 1) {
67+
final List<Object?>? pigeonVar_replyList =
68+
await pigeonVar_channel.send(<Object?>[url]) as List<Object?>?;
69+
if (pigeonVar_replyList == null) {
70+
throw _createConnectionError(pigeonVar_channelName);
71+
} else if (pigeonVar_replyList.length > 1) {
5572
throw PlatformException(
56-
code: __pigeon_replyList[0]! as String,
57-
message: __pigeon_replyList[1] as String?,
58-
details: __pigeon_replyList[2],
73+
code: pigeonVar_replyList[0]! as String,
74+
message: pigeonVar_replyList[1] as String?,
75+
details: pigeonVar_replyList[2],
5976
);
60-
} else if (__pigeon_replyList[0] == null) {
77+
} else if (pigeonVar_replyList[0] == null) {
6178
throw PlatformException(
6279
code: 'null-error',
6380
message: 'Host platform returned null value for non-null return value.',
6481
);
6582
} else {
66-
return (__pigeon_replyList[0] as bool?)!;
83+
return (pigeonVar_replyList[0] as bool?)!;
6784
}
6885
}
6986

7087
/// Opens the URL externally, returning an error string on failure.
7188
Future<String?> launchUrl(String url) async {
72-
final String __pigeon_channelName =
73-
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.launchUrl$__pigeon_messageChannelSuffix';
74-
final BasicMessageChannel<Object?> __pigeon_channel =
89+
final String pigeonVar_channelName =
90+
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.launchUrl$pigeonVar_messageChannelSuffix';
91+
final BasicMessageChannel<Object?> pigeonVar_channel =
7592
BasicMessageChannel<Object?>(
76-
__pigeon_channelName,
93+
pigeonVar_channelName,
7794
pigeonChannelCodec,
78-
binaryMessenger: __pigeon_binaryMessenger,
95+
binaryMessenger: pigeonVar_binaryMessenger,
7996
);
80-
final List<Object?>? __pigeon_replyList =
81-
await __pigeon_channel.send(<Object?>[url]) as List<Object?>?;
82-
if (__pigeon_replyList == null) {
83-
throw _createConnectionError(__pigeon_channelName);
84-
} else if (__pigeon_replyList.length > 1) {
97+
final List<Object?>? pigeonVar_replyList =
98+
await pigeonVar_channel.send(<Object?>[url]) as List<Object?>?;
99+
if (pigeonVar_replyList == null) {
100+
throw _createConnectionError(pigeonVar_channelName);
101+
} else if (pigeonVar_replyList.length > 1) {
85102
throw PlatformException(
86-
code: __pigeon_replyList[0]! as String,
87-
message: __pigeon_replyList[1] as String?,
88-
details: __pigeon_replyList[2],
103+
code: pigeonVar_replyList[0]! as String,
104+
message: pigeonVar_replyList[1] as String?,
105+
details: pigeonVar_replyList[2],
89106
);
90107
} else {
91-
return (__pigeon_replyList[0] as String?);
108+
return (pigeonVar_replyList[0] as String?);
92109
}
93110
}
94111
}

packages/url_launcher/url_launcher_linux/linux/messages.g.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +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 (v21.1.0), do not edit directly.
4+
// Autogenerated from Pigeon (v22.6.1), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
#include "messages.g.h"
88

9-
G_DECLARE_FINAL_TYPE(FulMessageCodec, ful_message_codec, FUL, MESSAGE_CODEC,
10-
FlStandardMessageCodec)
11-
129
struct _FulMessageCodec {
1310
FlStandardMessageCodec parent_instance;
1411
};
@@ -159,9 +156,6 @@ ful_url_launcher_api_launch_url_response_new_error(const gchar* code,
159156
return self;
160157
}
161158

162-
G_DECLARE_FINAL_TYPE(FulUrlLauncherApi, ful_url_launcher_api, FUL,
163-
URL_LAUNCHER_API, GObject)
164-
165159
struct _FulUrlLauncherApi {
166160
GObject parent_instance;
167161

packages/url_launcher/url_launcher_linux/linux/messages.g.h

Lines changed: 7 additions & 1 deletion
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 (v21.1.0), do not edit directly.
4+
// Autogenerated from Pigeon (v22.6.1), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
#ifndef PIGEON_MESSAGES_G_H_
@@ -11,6 +11,12 @@
1111

1212
G_BEGIN_DECLS
1313

14+
G_DECLARE_FINAL_TYPE(FulMessageCodec, ful_message_codec, FUL, MESSAGE_CODEC,
15+
FlStandardMessageCodec)
16+
17+
G_DECLARE_FINAL_TYPE(FulUrlLauncherApi, ful_url_launcher_api, FUL,
18+
URL_LAUNCHER_API, GObject)
19+
1420
G_DECLARE_FINAL_TYPE(FulUrlLauncherApiCanLaunchUrlResponse,
1521
ful_url_launcher_api_can_launch_url_response, FUL,
1622
URL_LAUNCHER_API_CAN_LAUNCH_URL_RESPONSE, GObject)

packages/url_launcher/url_launcher_linux/pubspec.yaml

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

77
environment:
88
sdk: ^3.3.0
@@ -24,7 +24,7 @@ dependencies:
2424
dev_dependencies:
2525
flutter_test:
2626
sdk: flutter
27-
pigeon: ^21.1.0
27+
pigeon: ^22.6.1
2828
test: ^1.16.3
2929

3030
topics:

packages/url_launcher/url_launcher_linux/test/url_launcher_linux_test.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,12 @@ class _FakeUrlLauncherApi implements UrlLauncherApi {
164164
argument = url;
165165
return error;
166166
}
167+
168+
@override
169+
// ignore: non_constant_identifier_names
170+
BinaryMessenger? get pigeonVar_binaryMessenger => null;
171+
172+
@override
173+
// ignore: non_constant_identifier_names
174+
String get pigeonVar_messageChannelSuffix => '';
167175
}

0 commit comments

Comments
 (0)