Skip to content

Commit

Permalink
[google_maps_flutter] Switch Android examples to TLHC (#7282)
Browse files Browse the repository at this point in the history
The Android example apps were still using HC mode, from when that was
the recommended option due to lost updates with TLHC. Now that the
README strongly recommends using TLHC rather than HC, we should reflect
that in our examples.

This is both a user-facing change, since it's what shows on pub.dev and
we want to set the right example there, and also changes our test
coverage. Ideally we would test both, and an issue will be filed to
explore that, but for as long as we are only testing one it should be
the recommended option.

This came up in the context of investigating
flutter/flutter#152691 where impeller on
google maps when using hybrid composition caused a crash, and I think
it's just an oversight that we hadn't changed this.

## Pre-launch Checklist

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[exempt from CHANGELOG changes]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog
[test-exempt]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests
  • Loading branch information
stuartmorgan authored Aug 1, 2024
1 parent 945f514 commit 1b9195b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.7.1

* Updates the example app to use TLHC mode, per current package guidance.

## 2.7.0

* Adds support for BitmapDescriptor classes `AssetMapBitmap` and `BytesMapBitmap`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ void main() {
final GoogleMapsFlutterPlatform mapsImplementation =
GoogleMapsFlutterPlatform.instance;
if (mapsImplementation is GoogleMapsFlutterAndroid) {
mapsImplementation.useAndroidViewSurface = true;
initializeMapRenderer();
}
runApp(const MaterialApp(home: MapsDemo()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
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.7.0
version: 2.7.1

environment:
sdk: ^3.4.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.12.2

* Updates the example app to use TLHC mode, per current package guidance.

## 2.12.1

* Updates lint checks to ignore NewerVersionAvailable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ class MapsDemo extends StatelessWidget {
}

void main() {
final GoogleMapsFlutterPlatform platform = GoogleMapsFlutterPlatform.instance;
// Default to Hybrid Composition for the example.
(platform as GoogleMapsFlutterAndroid).useAndroidViewSurface = true;
initializeMapRenderer();
runApp(const MaterialApp(home: MapsDemo()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_android
description: Android implementation of the google_maps_flutter plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.12.1
version: 2.12.2

environment:
sdk: ^3.4.0
Expand Down

0 comments on commit 1b9195b

Please sign in to comment.