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
Google maps plugin on Android fails to center initial location when surface size is changed. #106750
Google maps plugin on Android fails to center initial location when surface size is changed. #106750
Comments
The issue is that virtual display changes size based on the current physcial screen size: https://github.com/flutter/engine/blob/main/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java#L47-L74, so GoogleMap uses the new virtual display size. On the other hand, the GoogleMap flutter widget doesn't know virtual display has resized. We can do 1 of the following:
I'd go with 1. |
I think reverting the code that resizes for now is fine. But we should still file a bug for this. In general, we should avoid letting Dart code cause native crashes - it ends up breaking hot reload workflows and results in poor DX and UX. |
I agree with doing the first solution. Assuming we will continue to log the error and file a bug. |
Fixed with flutter/plugins#6097 |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Running the following test fails when using Flutter master: https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/example/integration_test/google_maps_test.dart#L428
The test runs successfully when the following line is removed https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/example/integration_test/google_maps_test.dart#L428
Logs
The text was updated successfully, but these errors were encountered: