upgrade flutter

This commit is contained in:
Fabian Freund
2026-05-24 14:59:09 +02:00
parent 46a3b250c2
commit f3d1fb604d
47 changed files with 2882 additions and 4111 deletions
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.3.2), do not edit directly.
// Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -193,7 +193,7 @@ class FlutterError (
val code: String,
override val message: String? = null,
val details: Any? = null
) : Throwable()
) : RuntimeException()
enum class SingboxProxyProfileType(val raw: Int) {
SOCKS(0),
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.3.2), do not edit directly.
// Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
@@ -10,9 +10,9 @@ import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
Object? _extractReplyValueOrThrow(
List<Object?>? replyList,
String channelName, {
required bool isNullValid,
List<Object?>? replyList,
String channelName, {
required bool isNullValid,
}) {
if (replyList == null) {
throw PlatformException(
@@ -34,11 +34,8 @@ Object? _extractReplyValueOrThrow(
return replyList.firstOrNull;
}
List<Object?> wrapResponse({
Object? result,
PlatformException? error,
bool empty = false,
}) {
List<Object?> wrapResponse({Object? result, PlatformException? error, bool empty = false}) {
if (empty) {
return <Object?>[];
}
@@ -47,7 +44,6 @@ List<Object?> wrapResponse({
}
return <Object?>[error.code, error.message, error.details];
}
bool _deepEquals(Object? a, Object? b) {
if (identical(a, b)) {
return true;
@@ -60,9 +56,8 @@ bool _deepEquals(Object? a, Object? b) {
}
if (a is List && b is List) {
return a.length == b.length &&
a.indexed.every(
((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]),
);
a.indexed
.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
}
if (a is Map && b is Map) {
if (a.length != b.length) {
@@ -111,6 +106,7 @@ int _deepHash(Object? value) {
return value.hashCode;
}
enum SingboxProxyProfileType {
socks,
http,
@@ -129,7 +125,13 @@ enum SingboxProxyProfileType {
customOutbound,
}
enum SingboxProxyRuntimeStatus { stopped, starting, running, stopping, error }
enum SingboxProxyRuntimeStatus {
stopped,
starting,
running,
stopping,
error,
}
class SingboxProxyProfile {
SingboxProxyProfile({
@@ -155,12 +157,17 @@ class SingboxProxyProfile {
String? secretJson;
List<Object?> _toList() {
return <Object?>[id, name, type, configJson, secretJson];
return <Object?>[
id,
name,
type,
configJson,
secretJson,
];
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyProfile decode(Object result) {
result as List<Object?>;
@@ -182,11 +189,7 @@ class SingboxProxyProfile {
if (identical(this, other)) {
return true;
}
return _deepEquals(id, other.id) &&
_deepEquals(name, other.name) &&
_deepEquals(type, other.type) &&
_deepEquals(configJson, other.configJson) &&
_deepEquals(secretJson, other.secretJson);
return _deepEquals(id, other.id) && _deepEquals(name, other.name) && _deepEquals(type, other.type) && _deepEquals(configJson, other.configJson) && _deepEquals(secretJson, other.secretJson);
}
@override
@@ -231,8 +234,7 @@ class SingboxProxyRuntimeOptions {
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyRuntimeOptions decode(Object result) {
result as List<Object?>;
@@ -247,17 +249,13 @@ class SingboxProxyRuntimeOptions {
@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
bool operator ==(Object other) {
if (other is! SingboxProxyRuntimeOptions ||
other.runtimeType != runtimeType) {
if (other is! SingboxProxyRuntimeOptions || other.runtimeType != runtimeType) {
return false;
}
if (identical(this, other)) {
return true;
}
return _deepEquals(preferredBasePort, other.preferredBasePort) &&
_deepEquals(blockUnmatchedTraffic, other.blockUnmatchedTraffic) &&
_deepEquals(dnsConfig, other.dnsConfig) &&
_deepEquals(bootstrapDohUrl, other.bootstrapDohUrl);
return _deepEquals(preferredBasePort, other.preferredBasePort) && _deepEquals(blockUnmatchedTraffic, other.blockUnmatchedTraffic) && _deepEquals(dnsConfig, other.dnsConfig) && _deepEquals(bootstrapDohUrl, other.bootstrapDohUrl);
}
@override
@@ -323,8 +321,7 @@ class SingboxProxyDnsServerConfig {
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyDnsServerConfig decode(Object result) {
result as List<Object?>;
@@ -342,20 +339,13 @@ class SingboxProxyDnsServerConfig {
@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
bool operator ==(Object other) {
if (other is! SingboxProxyDnsServerConfig ||
other.runtimeType != runtimeType) {
if (other is! SingboxProxyDnsServerConfig || other.runtimeType != runtimeType) {
return false;
}
if (identical(this, other)) {
return true;
}
return _deepEquals(tag, other.tag) &&
_deepEquals(address, other.address) &&
_deepEquals(detourTag, other.detourTag) &&
_deepEquals(matchDomainSuffixes, other.matchDomainSuffixes) &&
_deepEquals(matchGeosites, other.matchGeosites) &&
_deepEquals(matchOutbounds, other.matchOutbounds) &&
_deepEquals(matchInbounds, other.matchInbounds);
return _deepEquals(tag, other.tag) && _deepEquals(address, other.address) && _deepEquals(detourTag, other.detourTag) && _deepEquals(matchDomainSuffixes, other.matchDomainSuffixes) && _deepEquals(matchGeosites, other.matchGeosites) && _deepEquals(matchOutbounds, other.matchOutbounds) && _deepEquals(matchInbounds, other.matchInbounds);
}
@override
@@ -380,18 +370,20 @@ class SingboxProxyDnsConfig {
String domainStrategy;
List<Object?> _toList() {
return <Object?>[servers, finalServerTag, domainStrategy];
return <Object?>[
servers,
finalServerTag,
domainStrategy,
];
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyDnsConfig decode(Object result) {
result as List<Object?>;
return SingboxProxyDnsConfig(
servers: (result[0]! as List<Object?>)
.cast<SingboxProxyDnsServerConfig>(),
servers: (result[0]! as List<Object?>).cast<SingboxProxyDnsServerConfig>(),
finalServerTag: result[1] as String?,
domainStrategy: result[2]! as String,
);
@@ -406,9 +398,7 @@ class SingboxProxyDnsConfig {
if (identical(this, other)) {
return true;
}
return _deepEquals(servers, other.servers) &&
_deepEquals(finalServerTag, other.finalServerTag) &&
_deepEquals(domainStrategy, other.domainStrategy);
return _deepEquals(servers, other.servers) && _deepEquals(finalServerTag, other.finalServerTag) && _deepEquals(domainStrategy, other.domainStrategy);
}
@override
@@ -436,12 +426,17 @@ class SingboxProxyRuntimeEndpoint {
String password;
List<Object?> _toList() {
return <Object?>[profileId, host, port, username, password];
return <Object?>[
profileId,
host,
port,
username,
password,
];
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyRuntimeEndpoint decode(Object result) {
result as List<Object?>;
@@ -457,18 +452,13 @@ class SingboxProxyRuntimeEndpoint {
@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
bool operator ==(Object other) {
if (other is! SingboxProxyRuntimeEndpoint ||
other.runtimeType != runtimeType) {
if (other is! SingboxProxyRuntimeEndpoint || other.runtimeType != runtimeType) {
return false;
}
if (identical(this, other)) {
return true;
}
return _deepEquals(profileId, other.profileId) &&
_deepEquals(host, other.host) &&
_deepEquals(port, other.port) &&
_deepEquals(username, other.username) &&
_deepEquals(password, other.password);
return _deepEquals(profileId, other.profileId) && _deepEquals(host, other.host) && _deepEquals(port, other.port) && _deepEquals(username, other.username) && _deepEquals(password, other.password);
}
@override
@@ -490,19 +480,21 @@ class SingboxProxyRuntimeState {
String? message;
List<Object?> _toList() {
return <Object?>[status, endpoints, message];
return <Object?>[
status,
endpoints,
message,
];
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyRuntimeState decode(Object result) {
result as List<Object?>;
return SingboxProxyRuntimeState(
status: result[0]! as SingboxProxyRuntimeStatus,
endpoints: (result[1]! as List<Object?>)
.cast<SingboxProxyRuntimeEndpoint>(),
endpoints: (result[1]! as List<Object?>).cast<SingboxProxyRuntimeEndpoint>(),
message: result[2] as String?,
);
}
@@ -510,16 +502,13 @@ class SingboxProxyRuntimeState {
@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
bool operator ==(Object other) {
if (other is! SingboxProxyRuntimeState ||
other.runtimeType != runtimeType) {
if (other is! SingboxProxyRuntimeState || other.runtimeType != runtimeType) {
return false;
}
if (identical(this, other)) {
return true;
}
return _deepEquals(status, other.status) &&
_deepEquals(endpoints, other.endpoints) &&
_deepEquals(message, other.message);
return _deepEquals(status, other.status) && _deepEquals(endpoints, other.endpoints) && _deepEquals(message, other.message);
}
@override
@@ -528,41 +517,43 @@ class SingboxProxyRuntimeState {
}
class SingboxProxyConfigResult {
SingboxProxyConfigResult({required this.configJson, required this.endpoints});
SingboxProxyConfigResult({
required this.configJson,
required this.endpoints,
});
String configJson;
List<SingboxProxyRuntimeEndpoint> endpoints;
List<Object?> _toList() {
return <Object?>[configJson, endpoints];
return <Object?>[
configJson,
endpoints,
];
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyConfigResult decode(Object result) {
result as List<Object?>;
return SingboxProxyConfigResult(
configJson: result[0]! as String,
endpoints: (result[1]! as List<Object?>)
.cast<SingboxProxyRuntimeEndpoint>(),
endpoints: (result[1]! as List<Object?>).cast<SingboxProxyRuntimeEndpoint>(),
);
}
@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
bool operator ==(Object other) {
if (other is! SingboxProxyConfigResult ||
other.runtimeType != runtimeType) {
if (other is! SingboxProxyConfigResult || other.runtimeType != runtimeType) {
return false;
}
if (identical(this, other)) {
return true;
}
return _deepEquals(configJson, other.configJson) &&
_deepEquals(endpoints, other.endpoints);
return _deepEquals(configJson, other.configJson) && _deepEquals(endpoints, other.endpoints);
}
@override
@@ -587,12 +578,16 @@ class SingboxProxyLogMessage {
String? profileId;
List<Object?> _toList() {
return <Object?>[level, message, timestamp, profileId];
return <Object?>[
level,
message,
timestamp,
profileId,
];
}
Object encode() {
return _toList();
}
return _toList(); }
static SingboxProxyLogMessage decode(Object result) {
result as List<Object?>;
@@ -613,10 +608,7 @@ class SingboxProxyLogMessage {
if (identical(this, other)) {
return true;
}
return _deepEquals(level, other.level) &&
_deepEquals(message, other.message) &&
_deepEquals(timestamp, other.timestamp) &&
_deepEquals(profileId, other.profileId);
return _deepEquals(level, other.level) && _deepEquals(message, other.message) && _deepEquals(timestamp, other.timestamp) && _deepEquals(profileId, other.profileId);
}
@override
@@ -624,6 +616,7 @@ class SingboxProxyLogMessage {
int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
}
class _PigeonCodec extends StandardMessageCodec {
const _PigeonCodec();
@override
@@ -631,34 +624,34 @@ class _PigeonCodec extends StandardMessageCodec {
if (value is int) {
buffer.putUint8(4);
buffer.putInt64(value);
} else if (value is SingboxProxyProfileType) {
} else if (value is SingboxProxyProfileType) {
buffer.putUint8(129);
writeValue(buffer, value.index);
} else if (value is SingboxProxyRuntimeStatus) {
} else if (value is SingboxProxyRuntimeStatus) {
buffer.putUint8(130);
writeValue(buffer, value.index);
} else if (value is SingboxProxyProfile) {
} else if (value is SingboxProxyProfile) {
buffer.putUint8(131);
writeValue(buffer, value.encode());
} else if (value is SingboxProxyRuntimeOptions) {
} else if (value is SingboxProxyRuntimeOptions) {
buffer.putUint8(132);
writeValue(buffer, value.encode());
} else if (value is SingboxProxyDnsServerConfig) {
} else if (value is SingboxProxyDnsServerConfig) {
buffer.putUint8(133);
writeValue(buffer, value.encode());
} else if (value is SingboxProxyDnsConfig) {
} else if (value is SingboxProxyDnsConfig) {
buffer.putUint8(134);
writeValue(buffer, value.encode());
} else if (value is SingboxProxyRuntimeEndpoint) {
} else if (value is SingboxProxyRuntimeEndpoint) {
buffer.putUint8(135);
writeValue(buffer, value.encode());
} else if (value is SingboxProxyRuntimeState) {
} else if (value is SingboxProxyRuntimeState) {
buffer.putUint8(136);
writeValue(buffer, value.encode());
} else if (value is SingboxProxyConfigResult) {
} else if (value is SingboxProxyConfigResult) {
buffer.putUint8(137);
writeValue(buffer, value.encode());
} else if (value is SingboxProxyLogMessage) {
} else if (value is SingboxProxyLogMessage) {
buffer.putUint8(138);
writeValue(buffer, value.encode());
} else {
@@ -701,13 +694,9 @@ class SingboxProxyApi {
/// Constructor for [SingboxProxyApi]. The [binaryMessenger] named argument is
/// available for dependency injection. If it is left null, the default
/// BinaryMessenger will be used which routes to the host platform.
SingboxProxyApi({
BinaryMessenger? binaryMessenger,
String messageChannelSuffix = '',
}) : pigeonVar_binaryMessenger = binaryMessenger,
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty
? '.$messageChannelSuffix'
: '';
SingboxProxyApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
: pigeonVar_binaryMessenger = binaryMessenger,
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
final BinaryMessenger? pigeonVar_binaryMessenger;
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
@@ -715,97 +704,82 @@ class SingboxProxyApi {
final String pigeonVar_messageChannelSuffix;
Future<String?> validateProfile(SingboxProxyProfile profile) async {
final pigeonVar_channelName =
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.validateProfile$pigeonVar_messageChannelSuffix';
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.validateProfile$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[profile],
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[profile]);
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: true,
);
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: true,
)
;
return pigeonVar_replyValue as String?;
}
Future<SingboxProxyConfigResult> buildConfig(
List<SingboxProxyProfile> profiles,
SingboxProxyRuntimeOptions options,
) async {
final pigeonVar_channelName =
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.buildConfig$pigeonVar_messageChannelSuffix';
Future<SingboxProxyConfigResult> buildConfig(List<SingboxProxyProfile> profiles, SingboxProxyRuntimeOptions options) async {
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.buildConfig$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[profiles, options],
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[profiles, options]);
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: false,
);
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: false,
)
;
return pigeonVar_replyValue! as SingboxProxyConfigResult;
}
Future<SingboxProxyRuntimeState> start(
List<SingboxProxyProfile> profiles,
SingboxProxyRuntimeOptions options,
) async {
final pigeonVar_channelName =
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.start$pigeonVar_messageChannelSuffix';
Future<SingboxProxyRuntimeState> start(List<SingboxProxyProfile> profiles, SingboxProxyRuntimeOptions options) async {
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.start$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[profiles, options],
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[profiles, options]);
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: false,
);
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: false,
)
;
return pigeonVar_replyValue! as SingboxProxyRuntimeState;
}
Future<void> stop(List<String> profileIds) async {
final pigeonVar_channelName =
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.stop$pigeonVar_messageChannelSuffix';
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.stop$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[profileIds],
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[profileIds]);
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
_extractReplyValueOrThrow(
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: true,
);
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: true,
)
;
}
Future<void> stopAll() async {
final pigeonVar_channelName =
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.stopAll$pigeonVar_messageChannelSuffix';
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.stopAll$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
@@ -815,15 +789,15 @@ class SingboxProxyApi {
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
_extractReplyValueOrThrow(
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: true,
);
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: true,
)
;
}
Future<SingboxProxyRuntimeState> getState() async {
final pigeonVar_channelName =
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.getState$pigeonVar_messageChannelSuffix';
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyApi.getState$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
@@ -833,10 +807,11 @@ class SingboxProxyApi {
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: false,
);
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: false,
)
;
return pigeonVar_replyValue! as SingboxProxyRuntimeState;
}
}
@@ -848,62 +823,46 @@ abstract class SingboxProxyEventsApi {
void onLogMessage(SingboxProxyLogMessage message);
static void setUp(
SingboxProxyEventsApi? api, {
BinaryMessenger? binaryMessenger,
String messageChannelSuffix = '',
}) {
messageChannelSuffix = messageChannelSuffix.isNotEmpty
? '.$messageChannelSuffix'
: '';
static void setUp(SingboxProxyEventsApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) {
messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
{
final pigeonVar_channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyEventsApi.onStateChanged$messageChannelSuffix',
pigeonChannelCodec,
binaryMessenger: binaryMessenger,
);
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyEventsApi.onStateChanged$messageChannelSuffix', pigeonChannelCodec,
binaryMessenger: binaryMessenger);
if (api == null) {
pigeonVar_channel.setMessageHandler(null);
} else {
pigeonVar_channel.setMessageHandler((Object? message) async {
final List<Object?> args = message! as List<Object?>;
final SingboxProxyRuntimeState arg_state =
args[0]! as SingboxProxyRuntimeState;
final SingboxProxyRuntimeState arg_state = args[0]! as SingboxProxyRuntimeState;
try {
api.onStateChanged(arg_state);
return wrapResponse(empty: true);
} on PlatformException catch (e) {
return wrapResponse(error: e);
} catch (e) {
return wrapResponse(
error: PlatformException(code: 'error', message: e.toString()),
);
} catch (e) {
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
}
});
}
}
{
final pigeonVar_channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyEventsApi.onLogMessage$messageChannelSuffix',
pigeonChannelCodec,
binaryMessenger: binaryMessenger,
);
'dev.flutter.pigeon.flutter_singbox_proxy.SingboxProxyEventsApi.onLogMessage$messageChannelSuffix', pigeonChannelCodec,
binaryMessenger: binaryMessenger);
if (api == null) {
pigeonVar_channel.setMessageHandler(null);
} else {
pigeonVar_channel.setMessageHandler((Object? message) async {
final List<Object?> args = message! as List<Object?>;
final SingboxProxyLogMessage arg_message =
args[0]! as SingboxProxyLogMessage;
final SingboxProxyLogMessage arg_message = args[0]! as SingboxProxyLogMessage;
try {
api.onLogMessage(arg_message);
return wrapResponse(empty: true);
} on PlatformException catch (e) {
return wrapResponse(error: e);
} catch (e) {
return wrapResponse(
error: PlatformException(code: 'error', message: e.toString()),
);
} catch (e) {
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
}
});
}
+1 -1
View File
@@ -16,7 +16,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
lint: ^2.8.0
pigeon: ^26.3.2
pigeon: ^26.3.4
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec