flutter-android-window icon indicating copy to clipboard operation
flutter-android-window copied to clipboard

如何在悬浮窗内修改悬浮窗大小

Open 2971026328 opened this issue 2 years ago • 5 comments

在组件里面的按钮用android_window.resize(600, 400)报错如下 E/flutter (13282): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter (13282): #0 MainApi.post (package:android_window/pigeon.g.dart:107:7) E/flutter (13282): E/flutter (13282): #1 post (package:android_window/main.dart:59:20) E/flutter (13282):

2971026328 avatar Oct 09 '23 03:10 2971026328

调这个方法

AndroidWindow.resize(600, 400)

qiuxiang avatar Oct 09 '23 08:10 qiuxiang

好的谢谢,我尝试一下非常感谢

2971026328 avatar Oct 09 '23 08:10 2971026328

成功了,研究了一下午,都用上Isolate通信没解决哈哈,感谢大佬

2971026328 avatar Oct 09 '23 08:10 2971026328

仅通过 dart 是没法通信的,因为两个 flutter 分别运行在不同的 engine 里

qiuxiang avatar Oct 09 '23 10:10 qiuxiang

了解,谢谢大佬科普

2971026328 avatar Oct 09 '23 14:10 2971026328