Skip to content

[google_maps_flutter] Add support for mapType, fullscreen, and Street View controls on web#11955

Open
puneetkukreja98 wants to merge 3 commits into
flutter:mainfrom
puneetkukreja98:fix-104111
Open

[google_maps_flutter] Add support for mapType, fullscreen, and Street View controls on web#11955
puneetkukreja98 wants to merge 3 commits into
flutter:mainfrom
puneetkukreja98:fix-104111

Conversation

@puneetkukreja98

@puneetkukreja98 puneetkukreja98 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for mapTypeControlEnabled, fullscreenControlEnabled, and streetViewControlEnabled on Flutter web.

Previously, these options were not exposed through the GoogleMap widget and were internally defaulted to false in MapConfiguration.

This change propagates these parameters through google_maps_flutter, google_maps_flutter_platform_interface, and google_maps_flutter_web, allowing developers to explicitly enable or disable these controls.

To preserve backward compatibility, the existing behavior is maintained by defaulting these options to false when they are not provided by the user.

I created a sample app and tested the changes using dependency_overrides. Attaching a video for reference.

google_maps_flutter_rec.mov

Fixes flutter/flutter#104111.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for mapTypeControlEnabled, fullscreenControlEnabled, and streetViewControlEnabled on the web platform across the google_maps_flutter, google_maps_flutter_platform_interface, and google_maps_flutter_web packages, along with corresponding unit and integration tests. Feedback from the reviewer highlights the need to update the dependency constraints for google_maps_flutter_platform_interface in the pubspec files of both google_maps_flutter and google_maps_flutter_web to prevent potential compilation failures.

repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.17.1
version: 2.17.2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Since this PR introduces new public parameters (mapTypeControlEnabled, fullscreenControlEnabled, streetViewControlEnabled) to the GoogleMap widget, this is a backward-compatible feature addition. According to Semantic Versioning, this requires a minor version bump (to 2.18.0) rather than a patch bump (to 2.17.2). Additionally, because google_maps_flutter now uses the new fields of MapConfiguration introduced in google_maps_flutter_platform_interface, you must update the dependency on google_maps_flutter_platform_interface in this pubspec.yaml to require the new version (e.g., ^2.16.0). Otherwise, compilation will fail if an older version of the platform interface is resolved.

version: 2.18.0

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.2+3
version: 0.6.3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Because google_maps_flutter_web now uses the new fields of MapConfiguration in convert.dart, you must update its dependency on google_maps_flutter_platform_interface in this pubspec.yaml to require the new version (e.g., ^2.16.0). Otherwise, compilation will fail if an older version of the platform interface is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[google_maps_flutter_web] Add missing MapOptions parameters

1 participant