-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[google_maps_flutter_platform_interface] Add cameraControl enable/disable & position on web #9897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[google_maps_flutter_platform_interface] Add cameraControl enable/disable & position on web #9897
Conversation
There was a problem hiding this comment.
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 enabling, disabling, and positioning the camera control button for the web version of Google Maps. This is achieved by adding webCameraControlEnabled and webCameraControlPosition to the MapConfiguration class, along with a new WebCameraControlPosition enum. The changes are consistently integrated throughout the MapConfiguration class, including updates to equality checks, hash code generation, and diffing logic. Corresponding tests have been added to verify the new functionality, and the package version and changelog have been updated. I have found one minor documentation error that should be corrected.
...lutter/google_maps_flutter_platform_interface/lib/src/types/web_camera_control_position.dart
Outdated
Show resolved
Hide resolved
…rface/lib/src/types/web_camera_control_position.dart Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| /// This setting controls how the API handles camera control button on the map |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Needs a period at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
| // found in the LICENSE file. | ||
|
|
||
| /// This setting controls how the API handles camera control button on the map | ||
| /// See https://developers.google.com/maps/documentation/javascript/reference/control#ControlPosition for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Blank line above this; per Effective Dart style, there should be a blank line after the first sentence in a doc comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
| // found in the LICENSE file. | ||
|
|
||
| /// This setting controls how the API handles camera control button on the map | ||
| /// See https://developers.google.com/maps/documentation/javascript/reference/control#ControlPosition for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please add a line break after the URL so this line isn't so long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
...lutter/google_maps_flutter_platform_interface/lib/src/types/web_camera_control_position.dart
Show resolved
Hide resolved
...lutter/google_maps_flutter_platform_interface/lib/src/types/web_camera_control_position.dart
Show resolved
Hide resolved
...lutter/google_maps_flutter_platform_interface/lib/src/types/web_camera_control_position.dart
Show resolved
Hide resolved
| inlineStartBlockStart, | ||
|
|
||
| /// Elements are positioned on the left, above bottom-left elements, | ||
| /// and flow upwards. Consider using INLINE_START_BLOCK_END instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line break and blank line after the period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This applies to all the comments below as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
...e_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart
Show resolved
Hide resolved
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
harryterkelsen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Hey @harryterkelsen @stuartmorgan-g, I'm unable to merge this pull request, and I have a question about the next step. I'm following the documentation for "Changing federated plugins" and am at step 4, which says: "Once it has been reviewed, landed, and published, update the initial PR..." Who is responsible for landing and publishing the changes? Thanks |
|
The Flutter team (generally the last reviewer) lands changes, and a bot publishes them. |
thanks @stuartmorgan-g! Once the new version is published, I'll update the other pull request to reflect the changes. |
…enable/disable & position on web (flutter/packages#9897)
flutter/packages@141d8e3...a3f09e5 2025-08-28 stuartmorgan@google.com [google_sign_in] Implement hosted domain on Android (flutter/packages#9871) 2025-08-28 monteiroamelo@gmail.com [google_maps_flutter_platform_interface] Add cameraControl enable/disable & position on web (flutter/packages#9897) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#174706) flutter/packages@141d8e3...a3f09e5 2025-08-28 stuartmorgan@google.com [google_sign_in] Implement hosted domain on Android (flutter/packages#9871) 2025-08-28 monteiroamelo@gmail.com [google_maps_flutter_platform_interface] Add cameraControl enable/disable & position on web (flutter/packages#9897) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#174706) flutter/packages@141d8e3...a3f09e5 2025-08-28 stuartmorgan@google.com [google_sign_in] Implement hosted domain on Android (flutter/packages#9871) 2025-08-28 monteiroamelo@gmail.com [google_maps_flutter_platform_interface] Add cameraControl enable/disable & position on web (flutter/packages#9897) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#174706) flutter/packages@141d8e3...a3f09e5 2025-08-28 stuartmorgan@google.com [google_sign_in] Implement hosted domain on Android (flutter/packages#9871) 2025-08-28 monteiroamelo@gmail.com [google_maps_flutter_platform_interface] Add cameraControl enable/disable & position on web (flutter/packages#9897) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Platform interface portion of #9089.
Part of flutter/flutter#167137
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).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-assistbot 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
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 ↩3