Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[google_maps_flutter] Update Android view selection #6319

Merged
merged 3 commits into from
Aug 29, 2022

Conversation

stuartmorgan-g
Copy link
Contributor

Fixes the useAndroidViewSurface flag for Flutter 3.0+. Because of the
way TLHC rolled out, useAndroidViewSurface was no longer doing
anything meaningful, since either way TLHC would actually be used.

This updates that flag to use initExpensiveAndroidView to force HC, so
that the switch does something again.

This provides a way to work around the maps TLHC issue tracked in
flutter/flutter#103686

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

Fixes the `useAndroidViewSurface` flag for Flutter 3.0+. Because of the
way TLHC rolled out, `useAndroidViewSurface` was no longer doing
anything meaningful, since either way TLHC would actually be used.

This updates that flag to use `initExpensiveAndroidView` to force HC, so
that the switch does something again.

This provides a way to work around the maps TLHC issue tracked in
flutter/flutter#103686
@flutter-dashboard

This comment was marked as resolved.

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM with a nit and a question


* Fixes violations of new analysis option use_named_constants.
* Fixes avoid_redundant_argument_values lint warnings and minor typos.
* Updates `useAndroidViewSurface` to require Hybrid Composition, making the
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Should this include that the minimum Flutter version was raised to 3.0.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can't hurt certainly! Done.


environment:
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.8.0"
flutter: ">=3.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, would this also cause the downgrade analyze test to fail for google_maps_flutter package. It would make the minimum Flutter version it could use 3.0.0 on Android, but could still use 2.8.0 for iOS.

https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml#L9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, the resolver just won't pick this version if you're on an older version of Flutter. Updating the minimum version of the implementation package required by the app-facing package is what would require us to update the app-facing min version.

This is a small perk of federation; for now people can get updates to anything but the Android implementation even on old versions.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 29, 2022
@auto-submit auto-submit bot merged commit 630a200 into flutter:main Aug 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 29, 2022
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: google_maps_flutter platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants