Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2971026328 opened this issue Oct 9, 2023 · 5 comments
Open

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

2971026328 opened this issue Oct 9, 2023 · 5 comments

Comments

@2971026328
Copy link

在组件里面的按钮用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):

@qiuxiang
Copy link
Owner

qiuxiang commented Oct 9, 2023

调这个方法

AndroidWindow.resize(600, 400)
@2971026328
Copy link
Author

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

@2971026328
Copy link
Author

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

@qiuxiang
Copy link
Owner

qiuxiang commented Oct 9, 2023

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

@2971026328
Copy link
Author

了解,谢谢大佬科普

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants