albert-heijn-technology / platform_maps_flutter

A Flutter package to provide the native maps to Android/iOS
BSD 2-Clause "Simplified" License
78 stars 65 forks source link

"My Location"-button and compass are overlaid when an apple map is shown in full screen #42

Open yspreen opened 3 years ago

yspreen commented 3 years ago

Describe the bug The location button and the compass are overlapping.

To Reproduce

Open the map in full screen like so

    showGeneralDialog(
      context: context,
      pageBuilder: (context, _, __) {
        return PlatformMap(
          initialCameraPosition: CameraPosition(target: LatLng(0, 0)),
          myLocationEnabled: true,
          myLocationButtonEnabled: true,
        );
      },
    );

Expected behavior The location button should have an offset relative to the safe area, not to the screen. Just like the compass does.

Screenshots 81ACB5AD-73BF-47D0-B074-AA563755B175

Smartphone (please complete the following information):

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.0, on macOS 11.4 20F71 darwin-x64, locale en-US)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.60.1)
[✓] Connected device (2 available)
    ! Error: i is busy: Copying cache files from device. Xcode will continue when i is finished. (code -10)

! Doctor found issues in 2 categories.
yspreen commented 3 years ago

Workaround: padding: EdgeInsets.only(top: 64),

Moves the compass down while keeping the button pos.

yspreen commented 3 years ago

it does actually seem like full-screening the widget is a bad idea on both platforms. For android, the location button is on the right while the compass is on the left, but the full-screen version is obfuscated by the status bar: image