Repository navigation
google_maps_flutter setMapStyle before GoogleMap widget is rendered #66207
Description
Activity
- addedp: mapsGoogle Maps pluginGoogle Maps pluginc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutter
on Sep 21, 2020 - addedP2Important issues not at the top of the work listImportant issues not at the top of the work list
on May 23, 2021 It's possible to do with the js api, not sure about the android one.
In the source of google_maps_flutter, the parameters passed to google map widget are put into a map and given to the underlying system api. If the underlying platform supports settings styles directly in map options it's an easy fix.
Idk if all underlying platforms support it though
This is also happening when no map style is being used but if the GoogleMap is on a page which is being pushed by a
Navigator.pushin combination with aMaterialPageRoute@pedromassango you added p4 to this issue but this one #67631 is p5
The p5 one would fix this issue as well, and it is not clear whether that other issue would be a bigger change, it might even be less, although it would be breaking. It also comes with the benefit of fixing a few other issue. So imo that prioritization should be reconsidered.
@pedromassango you added p4 to this issue but this one #67631 is p5
This is a bug, that one is a feature proposal
- addedP1High-priority issues at the top of the work listHigh-priority issues at the top of the work listand removedP2Important issues not at the top of the work listImportant issues not at the top of the work list
on Oct 3, 2022 Making a P3 to match Google bug b/249358651
@stuartmorgan - Any update on this issue? Requesting response on behalf of 1P customer
25 remaining items
- added a commit that references this issue
on Feb 28, 2024 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
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Mar 13, 2024 - added a commit that references this issue
on May 23, 2025 - added 2 commits that reference this issue
on May 24, 2025
Internal: b/249358651
Use case
It's currently possible to set a custom map style once the GoogleMap widget is rendered.
This results in a "flash" which is especially disturbing when using a dark map style.
Demonstrated in this video on an iPhone 11 Pro simulator.
The behavior:
Proposal
To avoid step 1: a possibility to set a custom background color (now it's the color white).
To avoid step 2: a possibility to set the map style before the googleMap widget is rendered and not on onMapCreated.