Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9cb7faf
Adds support for color scheme
martyfuhry Nov 19, 2025
838a768
adds color scheme to exportrs
martyfuhry Nov 19, 2025
e8c04e6
Renames to match naming convention
martyfuhry Nov 19, 2025
5854d68
Bumps version and updates changelog
martyfuhry Nov 19, 2025
f79f5c4
Merge branch 'main' into feat/web-colorscheme
martyfuhry Nov 19, 2025
ca8153c
updates the pubspec.yaml files to have path-based dependency overrides
martyfuhry Nov 20, 2025
c75420c
Updates pubspec.yaml of other touched plugins
martyfuhry Nov 20, 2025
5d53e49
adds CHANGELOG entries to affected federated packages. Reverts mistak…
martyfuhry Nov 20, 2025
24a65c4
Sets default color scheme to follow system and adds simple unit tests
martyfuhry Nov 20, 2025
ba0aa0c
Updates comment
martyfuhry Nov 20, 2025
47ff935
Fixes unit test and adds comments to clarify setting color scheme at …
martyfuhry Nov 20, 2025
d513046
format tests
martyfuhry Nov 20, 2025
5a03b72
Ran the update-release-info tool to fix changelogs
martyfuhry Nov 20, 2025
ddf41d3
Merge branch 'main' into feat/web-colorscheme
martyfuhry Nov 20, 2025
edc8972
fixes version change and changelog for platform interface
martyfuhry Nov 20, 2025
4344c6f
Reverts all changes for to google_maps_flutter_android and _ios
martyfuhry Dec 3, 2025
01e3dc8
Makes colorscheme nullable, removes default setting, fixes comments i…
martyfuhry Dec 3, 2025
4730f74
Fixes minor version bump in pubspec and changelogs
martyfuhry Dec 3, 2025
3fde10c
Resolves conflicts
martyfuhry Dec 3, 2025
89e5820
Fixes comments and adds unit tests.
martyfuhry Dec 3, 2025
2cc8021
Fixes comments. Adds fallthrough handling for color scheme enum mapping
martyfuhry Dec 3, 2025
51e97d1
fixes default color scheme null
martyfuhry Dec 4, 2025
17b73a0
fixes google_maps version
martyfuhry Dec 4, 2025
1b9b4a4
fixing versioning
martyfuhry Dec 4, 2025
42aecea
reverts remaining accidental clobbered changes from main rebase in io…
martyfuhry Dec 4, 2025
69f7b2b
Fixes the version mismatch in the changelog and pubspec
martyfuhry Dec 4, 2025
2b01288
Merge branch 'main' into maps-web-color-scheme
stuartmorgan-g Mar 18, 2026
711e0e0
Revert all but _web
stuartmorgan-g Mar 18, 2026
583036f
Update pubspecs
stuartmorgan-g Mar 18, 2026
5b55561
Address my review comment
stuartmorgan-g Mar 18, 2026
5ec5bf9
Adjust CHANGELOG wording
stuartmorgan-g Mar 18, 2026
23fdbed
Remove unnecessary implementation comment
stuartmorgan-g Mar 18, 2026
174b6a9
Merge branch 'main' into maps-web-color-scheme-web
stuartmorgan-g Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.2

* Adds `colorScheme` support for controlling cloud-based map brightness.

## 0.6.1

* Batches clustered marker add/remove operations to avoid redundant re-rendering.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ gmaps.MapOptions _configurationAndStyleToGmapsOptions(

options.mapId = configuration.mapId;

final gmaps.ColorScheme? jsColorScheme = _gmapTypeColorSchemeForPluginColor(
configuration.colorScheme,
);
if (jsColorScheme != null) {
options.colorScheme = jsColorScheme;
}
Comment on lines +134 to +139
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The colorScheme property should only be applied when a mapId is present, as this feature is for cloud-based maps on the web. Please wrap this logic in a check for configuration.mapId.

Suggested change
final gmaps.ColorScheme? jsColorScheme = _gmapTypeColorSchemeForPluginColor(
configuration.colorScheme,
);
if (jsColorScheme != null) {
options.colorScheme = jsColorScheme;
}
if (configuration.mapId != null) {
final gmaps.ColorScheme? jsColorScheme = _gmapTypeColorSchemeForPluginColor(
configuration.colorScheme,
);
if (jsColorScheme != null) {
options.colorScheme = jsColorScheme;
}
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything in the docs that actually requires a mapId.


return options;
}

Expand All @@ -155,6 +162,28 @@ gmaps.MapTypeId _gmapTypeIDForPluginType(MapType type) {
return gmaps.MapTypeId.ROADMAP;
}

gmaps.ColorScheme? _gmapTypeColorSchemeForPluginColor(MapColorScheme? scheme) {
if (scheme == null) {
return null;
}

switch (scheme) {
case MapColorScheme.dark:
return gmaps.ColorScheme.DARK;
case MapColorScheme.light:
return gmaps.ColorScheme.LIGHT;
case MapColorScheme.followSystem:
return gmaps.ColorScheme.FOLLOW_SYSTEM;
}
// The enum comes from a different package, which could get a new value at
// any time, so provide a fallback that ensures this won't break when used
// with a version that contains new values. This is deliberately outside
// the switch rather than a `default` so that the linter will flag the
// switch as needing an update.
// ignore: dead_code
return null;
}

gmaps.MapOptions _applyInitialPosition(
CameraPosition initialPosition,
gmaps.MapOptions options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_web
description: Web platform implementation of google_maps_flutter
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 0.6.1
version: 0.6.2

environment:
sdk: ^3.9.0
Expand All @@ -23,7 +23,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
google_maps: ^8.1.0
google_maps_flutter_platform_interface: ^2.14.0
google_maps_flutter_platform_interface: ^2.15.0
sanitize_html: ^2.0.0
stream_transform: ^2.0.0
web: ^1.0.0
Expand Down
Loading