Skip to content

[google_map_flutter] Add style to widget - platform impls #6205

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

Merged

Conversation

stuartmorgan-g
Copy link
Contributor

Platform implementations portion of #6192

Adds handling of MapConfiguration.style and implements new getStyleError method.

Part of flutter/flutter#66207

Pre-launch Checklist

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Web bits lgtm!

// behavior of other platforms where there's no mechanism to return errors
// from configuration updates.
try {
_lastStyles = _mapStyles(update.style);
Copy link
Member

Choose a reason for hiding this comment

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

Do we want a test that asserts that _lastStyles remain unchanged when update.style is wrong? (not sure if we want that to be a feature or is a side-effect of this particular implementation)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That does seem worth testing. I couldn't see a way to add it without adding another kind of ugly test hook, so I did that; let me know if you have a better option. (Long term we may want to wrap that opaque maps object instead of having to add these hooks at this layer.)

Copy link
Member

Choose a reason for hiding this comment

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

The new hook is fine. There seems to exist a way to fetch styles from the gmaps.GMap object through its MVCObject interface:

map.get('styles')

(get DartDocs)

But I'm not sure if whatever that returns is directly comparable with what we pass in!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We shouldn't need to compare with what we pass in, just the before/after, but I'm getting null from that getter. Maybe this is related to needing to pump things differently in the maps integration tests?

For now I'm just going to land this since it's a pattern we already have, and we can revisit the structure of these tests later if necessary.

@stuartmorgan-g
Copy link
Contributor Author

(Landing without reviews from the others since it's identical to the version already approved in the main PR.)

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 28, 2024
@auto-submit auto-submit bot merged commit 3214a67 into flutter:main Feb 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 29, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 29, 2024
flutter/packages@353086c...6d02f03

2024-02-28 [email protected] Manual roll Flutter from c30f998 to d00bfe8 (32 revisions) (flutter/packages#6222)
2024-02-28 [email protected] [google_maps_flutter] Add `style` to widget (flutter/packages#6192)
2024-02-28 [email protected] Add library annotations for js interop (flutter/packages#6216)
2024-02-28 [email protected] [google_map_flutter] Add style to widget - platform impls (flutter/packages#6205)
2024-02-28 [email protected] [google_maps_flutter_web] Migrate to package:web (flutter/packages#5254)
2024-02-28 [email protected] [pigeon] Remove heap allocation in generated C++ code (flutter/packages#6196)
2024-02-27 [email protected] [pigeon] Allows kotlin generator to skip error class generation (flutter/packages#6183)
2024-02-27 [email protected] [camerax] Implements `setExposureMode` (flutter/packages#6110)
2024-02-27 [email protected] Roll Flutter from b77560e to c30f998 (12 revisions) (flutter/packages#6211)
2024-02-26 [email protected] Add `InkResponse`, `Material` and fix `Opacity` (flutter/packages#6199)
2024-02-26 [email protected] [url_launcher] Add explicit imports of UIKit (flutter/packages#6208)
2024-02-26 [email protected] [pigeon] Fix tool hangs on verbose sub-processes (flutter/packages#6198)
2024-02-26 [email protected] [tool] Ignore GeneratedPluginRegistrant.swift for `format` (flutter/packages#6195)
2024-02-26 [email protected] Roll Flutter from 1e8dd1e to b77560e (8 revisions) (flutter/packages#6207)

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 [email protected],[email protected] 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
LouiseHsu pushed a commit to LouiseHsu/packages that referenced this pull request Mar 7, 2024
Platform implementations portion of flutter#6192

Adds handling of `MapConfiguration.style` and implements new `getStyleError` method.

Part of flutter/flutter#66207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants