-
Notifications
You must be signed in to change notification settings - Fork 535
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
[Android] Prepare to revert Flutter 3.0 PlatformView workaround #667
Comments
Uncomment the
Also, if But these bugs no longer exist with using |
I found it interesting that But |
@juicycleff @Ahmadre Flutter 3.3.0 is now live with the fix included. |
@timbotimbo this is great news, was looking at it myself. Will test done more |
Description
Flutter 3.0 broke the default android platformview (#584), rendering the unity widget in the wrong location.
According to flutter/flutter#103630 (comment), this is now fixed in Flutter beta releases.
If the original issue is fixed, we can remove the workaround in this plugin.
And if we prepare and test this now, it can be ready to go when theses fixes make it into a new Flutter release.
Current workaround
@juicycleff fixed this in
flutter_unity_widget 2022.1.1
by ignoringuseAndroidSurfaceView
and always usinginitExpensiveAndroidView
.This works for now, but the ExpensiveAndroidView introduces new bugs that did not happen with Flutter 2.x.
Flutter beta
The current Flutter beta releases (starting with
3.3.0-0.0.pre
) seem to fix the original issue, meaning we can enable theAndroidView
option again.Setup:
In these videos I open the 'Simple Unity Demo' and 'Native exposed API demo' screens because these show the original issue the best.
useAndroidSurfaceView: false
useAndroidSurfaceView: false
useAndroidSurfaceView: true
3.0.5.mp4
3.3.0-0.0.pre.mp4
3.3.0-0.0.pre.v2.mp4
Result
Flutter 3.3.0-0.0-pre seems to fix the issue, so we should enable
AndroidView
again when this makes it to a Flutter release version.In this way users get to choose which type of PlatformView to use, and might be able to avoid certain bugs,
It also shows that
useAndroidViewSurface: false
now respects the margin and rounded borders that are broken withuseAndroidViewSurface: true
[UPDATE] Testing
I tried some more devices to check android compatibility with 3.3.0-0.0.pre:
The text was updated successfully, but these errors were encountered: