aboutsummaryrefslogtreecommitdiff
path: root/lib/services/common/channel.dart
diff options
context:
space:
mode:
authormirror <mirror@localhost>2026-11-22 08:41:00 +0900
committermirror <mirror@localhost>2026-11-22 08:41:00 +0900
commit449d8b74bd6d9dae98a07254cdfad677b920e7b0 (patch)
treec131c3528c4d517f56e19b854a7453fedb097d40 /lib/services/common/channel.dart
downloadaves-src-master.tar.gz
aves-src-master.zip
snapshot of aves v1.13.12 (secrets removed: android/app/google-services.json)HEADv1.13.12master
Diffstat (limited to 'lib/services/common/channel.dart')
-rw-r--r--lib/services/common/channel.dart29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/services/common/channel.dart b/lib/services/common/channel.dart
new file mode 100644
index 0000000..79985b0
--- /dev/null
+++ b/lib/services/common/channel.dart
@@ -0,0 +1,29 @@
+import 'package:flutter/foundation.dart';
+import 'package:flutter/services.dart';
+import 'package:streams_channel/streams_channel.dart';
+
+const bool debugAvesPlatformChannels = kDebugMode;
+
+class AvesMethodChannel extends MethodChannel {
+ const AvesMethodChannel(super.name);
+
+ @override
+ Future<T?> invokeMethod<T>(String method, [arguments]) {
+ if (debugAvesPlatformChannels) {
+ debugPrint('$runtimeType invokeMethod name=$name method=$method arguments=$arguments');
+ }
+ return super.invokeMethod(method, arguments);
+ }
+}
+
+class AvesStreamsChannel extends StreamsChannel {
+ AvesStreamsChannel(super.name);
+
+ @override
+ Stream receiveBroadcastStream([arguments]) {
+ if (debugAvesPlatformChannels) {
+ debugPrint('$runtimeType invokeMethod name=$name arguments=$arguments');
+ }
+ return super.receiveBroadcastStream(arguments);
+ }
+} \ No newline at end of file