Problem
The colorScheme parameter was added to the GoogleMap widget in google_maps_flutter 2.16.0 (PR flutter/packages#11280), but it only works on web. The Android and iOS platform plugins silently ignore it.
This is a follow-up to #176445 and #184064 (the latter was closed after I drafted an implementation; this issue tracks the actual PR).
Native SDK support
Both mobile SDKs already support this:
- Android:
GoogleMap.setMapColorScheme(MapColorScheme.DARK) — available in play-services-maps:20.0.0+
- iOS:
GMSMapView.overrideUserInterfaceStyle = .dark — the documented color-scheme API per the Google Maps SDK for iOS
Expected behavior
Setting colorScheme: MapColorScheme.dark on a GoogleMap widget with a cloud-based mapId should apply the dark color scheme on Android and iOS, matching the web behavior.
Current behavior
The colorScheme parameter is accepted by the widget but has no effect on Android or iOS. The map always renders in the default (light) scheme.
Proposed implementation
PR open at flutter/packages#11736.
Problem
The
colorSchemeparameter was added to theGoogleMapwidget ingoogle_maps_flutter2.16.0 (PR flutter/packages#11280), but it only works on web. The Android and iOS platform plugins silently ignore it.This is a follow-up to #176445 and #184064 (the latter was closed after I drafted an implementation; this issue tracks the actual PR).
Native SDK support
Both mobile SDKs already support this:
GoogleMap.setMapColorScheme(MapColorScheme.DARK)— available inplay-services-maps:20.0.0+GMSMapView.overrideUserInterfaceStyle = .dark— the documented color-scheme API per the Google Maps SDK for iOSExpected behavior
Setting
colorScheme: MapColorScheme.darkon aGoogleMapwidget with a cloud-basedmapIdshould apply the dark color scheme on Android and iOS, matching the web behavior.Current behavior
The
colorSchemeparameter is accepted by the widget but has no effect on Android or iOS. The map always renders in the default (light) scheme.Proposed implementation
PR open at flutter/packages#11736.