Skip to content

Commit

Permalink
Merge branch 'main' into fix/camera-rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonathanqz authored Nov 12, 2024
2 parents 1152f7c + 4a7b385 commit f6c9214
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 125 deletions.
4 changes: 4 additions & 0 deletions packages/url_launcher/url_launcher_linux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.2.1

* Updates Pigeon to resolve a compilation failure with some versions of glib.

## 3.2.0

* Updates platform channels to use Pigeon.
Expand Down
85 changes: 51 additions & 34 deletions packages/url_launcher/url_launcher_linux/lib/src/messages.g.dart
Original file line number Diff line number Diff line change
@@ -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 (v21.1.0), do not edit directly.
// Autogenerated from Pigeon (v22.6.1), 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, no_leading_underscores_for_local_identifiers

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

class _PigeonCodec extends StandardMessageCodec {
const _PigeonCodec();
@override
void writeValue(WriteBuffer buffer, Object? value) {
if (value is int) {
buffer.putUint8(4);
buffer.putInt64(value);
} else {
super.writeValue(buffer, value);
}
}

@override
Object? readValueOfType(int type, ReadBuffer buffer) {
switch (type) {
default:
return super.readValueOfType(type, buffer);
}
}
}

class UrlLauncherApi {
Expand All @@ -28,67 +45,67 @@ class UrlLauncherApi {
/// BinaryMessenger will be used which routes to the host platform.
UrlLauncherApi(
{BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
: __pigeon_binaryMessenger = binaryMessenger,
__pigeon_messageChannelSuffix =
: pigeonVar_binaryMessenger = binaryMessenger,
pigeonVar_messageChannelSuffix =
messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
final BinaryMessenger? __pigeon_binaryMessenger;
final BinaryMessenger? pigeonVar_binaryMessenger;

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

final String __pigeon_messageChannelSuffix;
final String pigeonVar_messageChannelSuffix;

/// Returns true if the URL can definitely be launched.
Future<bool> canLaunchUrl(String url) async {
final String __pigeon_channelName =
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.canLaunchUrl$__pigeon_messageChannelSuffix';
final BasicMessageChannel<Object?> __pigeon_channel =
final String pigeonVar_channelName =
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.canLaunchUrl$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel =
BasicMessageChannel<Object?>(
__pigeon_channelName,
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: __pigeon_binaryMessenger,
binaryMessenger: pigeonVar_binaryMessenger,
);
final List<Object?>? __pigeon_replyList =
await __pigeon_channel.send(<Object?>[url]) as List<Object?>?;
if (__pigeon_replyList == null) {
throw _createConnectionError(__pigeon_channelName);
} else if (__pigeon_replyList.length > 1) {
final List<Object?>? pigeonVar_replyList =
await pigeonVar_channel.send(<Object?>[url]) as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: __pigeon_replyList[0]! as String,
message: __pigeon_replyList[1] as String?,
details: __pigeon_replyList[2],
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else if (__pigeon_replyList[0] == null) {
} else if (pigeonVar_replyList[0] == null) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (__pigeon_replyList[0] as bool?)!;
return (pigeonVar_replyList[0] as bool?)!;
}
}

/// Opens the URL externally, returning an error string on failure.
Future<String?> launchUrl(String url) async {
final String __pigeon_channelName =
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.launchUrl$__pigeon_messageChannelSuffix';
final BasicMessageChannel<Object?> __pigeon_channel =
final String pigeonVar_channelName =
'dev.flutter.pigeon.url_launcher_linux.UrlLauncherApi.launchUrl$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel =
BasicMessageChannel<Object?>(
__pigeon_channelName,
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: __pigeon_binaryMessenger,
binaryMessenger: pigeonVar_binaryMessenger,
);
final List<Object?>? __pigeon_replyList =
await __pigeon_channel.send(<Object?>[url]) as List<Object?>?;
if (__pigeon_replyList == null) {
throw _createConnectionError(__pigeon_channelName);
} else if (__pigeon_replyList.length > 1) {
final List<Object?>? pigeonVar_replyList =
await pigeonVar_channel.send(<Object?>[url]) as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: __pigeon_replyList[0]! as String,
message: __pigeon_replyList[1] as String?,
details: __pigeon_replyList[2],
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return (__pigeon_replyList[0] as String?);
return (pigeonVar_replyList[0] as String?);
}
}
}
8 changes: 1 addition & 7 deletions packages/url_launcher/url_launcher_linux/linux/messages.g.cc
Original file line number Diff line number Diff line change
@@ -1,14 +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 (v21.1.0), do not edit directly.
// Autogenerated from Pigeon (v22.6.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon

#include "messages.g.h"

G_DECLARE_FINAL_TYPE(FulMessageCodec, ful_message_codec, FUL, MESSAGE_CODEC,
FlStandardMessageCodec)

struct _FulMessageCodec {
FlStandardMessageCodec parent_instance;
};
Expand Down Expand Up @@ -159,9 +156,6 @@ ful_url_launcher_api_launch_url_response_new_error(const gchar* code,
return self;
}

G_DECLARE_FINAL_TYPE(FulUrlLauncherApi, ful_url_launcher_api, FUL,
URL_LAUNCHER_API, GObject)

struct _FulUrlLauncherApi {
GObject parent_instance;

Expand Down
8 changes: 7 additions & 1 deletion packages/url_launcher/url_launcher_linux/linux/messages.g.h
Original file line number Diff line number Diff line change
@@ -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 (v21.1.0), do not edit directly.
// Autogenerated from Pigeon (v22.6.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon

#ifndef PIGEON_MESSAGES_G_H_
Expand All @@ -11,6 +11,12 @@

G_BEGIN_DECLS

G_DECLARE_FINAL_TYPE(FulMessageCodec, ful_message_codec, FUL, MESSAGE_CODEC,
FlStandardMessageCodec)

G_DECLARE_FINAL_TYPE(FulUrlLauncherApi, ful_url_launcher_api, FUL,
URL_LAUNCHER_API, GObject)

G_DECLARE_FINAL_TYPE(FulUrlLauncherApiCanLaunchUrlResponse,
ful_url_launcher_api_can_launch_url_response, FUL,
URL_LAUNCHER_API_CAN_LAUNCH_URL_RESPONSE, GObject)
Expand Down
4 changes: 2 additions & 2 deletions packages/url_launcher/url_launcher_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: url_launcher_linux
description: Linux implementation of the url_launcher plugin.
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_linux
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
version: 3.2.0
version: 3.2.1

environment:
sdk: ^3.3.0
Expand All @@ -24,7 +24,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
pigeon: ^21.1.0
pigeon: ^22.6.1
test: ^1.16.3

topics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,12 @@ class _FakeUrlLauncherApi implements UrlLauncherApi {
argument = url;
return error;
}

@override
// ignore: non_constant_identifier_names
BinaryMessenger? get pigeonVar_binaryMessenger => null;

@override
// ignore: non_constant_identifier_names
String get pigeonVar_messageChannelSuffix => '';
}
8 changes: 2 additions & 6 deletions script/tool/lib/src/dart_test_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ class DartTestCommand extends PackageLoopingCommand {
platform = 'chrome';
}

// All the web tests assume the canvaskit renderer currently.
final String? webRenderer = (platform == 'chrome') ? 'canvaskit' : null;
bool passed;
if (package.requiresFlutter()) {
passed = await _runFlutterTests(package,
platform: platform, webRenderer: webRenderer);
passed = await _runFlutterTests(package, platform: platform);
} else {
passed = await _runDartTests(package, platform: platform);
}
Expand All @@ -122,7 +119,7 @@ class DartTestCommand extends PackageLoopingCommand {

/// Runs the Dart tests for a Flutter package, returning true on success.
Future<bool> _runFlutterTests(RepositoryPackage package,
{String? platform, String? webRenderer}) async {
{String? platform}) async {
final String experiment = getStringArg(kEnableExperiment);

final int exitCode = await processRunner.runAndStream(
Expand All @@ -134,7 +131,6 @@ class DartTestCommand extends PackageLoopingCommand {
// Flutter defaults to VM mode (under a different name) and explicitly
// setting it is deprecated, so pass nothing in that case.
if (platform != null && platform != 'vm') '--platform=$platform',
if (webRenderer != null) '--web-renderer=$webRenderer',
],
workingDir: package.directory,
);
Expand Down
8 changes: 1 addition & 7 deletions script/tool/lib/src/drive_examples_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,7 @@ class DriveExamplesCommand extends PackageLoopingCommand {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
if (useWasm)
'--wasm'
// TODO(dit): Clean this up, https://github.com/flutter/flutter/issues/151869
else if (platform.environment['CHANNEL']?.toLowerCase() == 'master')
'--web-renderer=canvaskit'
else
'--web-renderer=html',
if (useWasm) '--wasm',
if (platform.environment.containsKey('CHROME_EXECUTABLE'))
'--chrome-binary=${platform.environment['CHROME_EXECUTABLE']}',
],
Expand Down
5 changes: 0 additions & 5 deletions script/tool/test/dart_test_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
package.path),
]),
Expand Down Expand Up @@ -360,7 +359,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down Expand Up @@ -390,7 +388,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down Expand Up @@ -420,7 +417,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down Expand Up @@ -495,7 +491,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down
Loading

0 comments on commit f6c9214

Please sign in to comment.