Skip to content

Map totally distorted with Flutter 3.x.x #1041

@felix-mittermeier

Description

@felix-mittermeier

Flutter 3.0.0 was released this night and unfortunately it broke MapBox on Android.

To reproduce: build the example app with the 3.0.0 version, run it and open for example "Place symbol"
Result:

As you can see the map is not in its usual constraint bounds, has a different side ratio, is also moved up and therefore drawn under the status bar. Probably it is just added at x: 0, y: 0 and is therefore in the top left corner.

As you can read in the article introducing the new flutter version here: https://medium.com/flutter/whats-new-in-flutter-3-8c74a5bc32d0 it looks like something regarding the Android platform view has been changed:

Bildschirmfoto 2022-05-12 um 15 22 17

Unfortunately I was not able to find more information regarding this change or how this can be fixed.

More information:

  • Only Android is affected - iOS and Web are completely fine
  • My test device was a Google Pixel 3 XL running with Android 12
  • The issue occurs for both options for useHybridComposition (-> true and false give the same result)
  • The click event are still registered where the map would be if it was not moved up -> pinch-to-zoom is really wanky now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions