Skip to content

Commit 8d53c8e

Browse files
[google_maps_flutter] Document tile cache flicker (flutter#12315)
Updates `GoogleMapController.clearTileCache` documentation to explain that some platform implementations may remove current tiles before replacements are available, which can cause the tile overlay to flicker. The wording remains implementation-neutral so it also applies to third-party platform implementations. Fixes flutter/flutter#189678. ## Pre-Review Checklist Test exemption: This PR changes only API documentation and the required release metadata; it does not change runtime behavior. Validation: - `dart format --output=none --set-exit-if-changed packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart` - `dart run script/tool/bin/flutter_plugin_tools.dart analyze --packages=google_maps_flutter/google_maps_flutter --exact-match-only` - `dart run script/tool/bin/flutter_plugin_tools.dart dart-test --packages=google_maps_flutter/google_maps_flutter --exact-match-only` - `dart run script/tool/bin/flutter_plugin_tools.dart validate --packages=google_maps_flutter/google_maps_flutter --exact-match-only --base-branch=upstream/main` - `dart run script/tool/bin/flutter_plugin_tools.dart publish-check --packages=google_maps_flutter/google_maps_flutter --exact-match-only` **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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. [^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.
1 parent c2b58e1 commit 8d53c8e

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.18.1
2+
3+
* Clarifies that clearing a tile cache may cause flickering on some platforms.
4+
15
## 2.18.0
26

37
* Adds support for mapTypeControlEnabled, fullscreenControlEnabled, and streetViewControlEnabled on web.

‎packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,11 @@ class GoogleMapController {
220220
/// Clears the tile cache so that all tiles will be requested again from the
221221
/// [TileProvider].
222222
///
223-
/// The current tiles from this tile overlay will also be
224-
/// cleared from the map after calling this method. The API maintains a small
225-
/// in-memory cache of tiles. If you want to cache tiles for longer, you
226-
/// should implement an on-disk cache.
223+
/// Depending on the platform implementation, the current tiles may be
224+
/// cleared from the map before replacement tiles are available, causing the
225+
/// tile overlay to flicker. The API maintains a small in-memory cache of
226+
/// tiles. If you want to cache tiles for longer, you should implement an
227+
/// on-disk cache.
227228
Future<void> clearTileCache(TileOverlayId tileOverlayId) async {
228229
_checkWidgetMountedOrThrow();
229230
return GoogleMapsFlutterPlatform.instance.clearTileCache(tileOverlayId, mapId: mapId);

‎packages/google_maps_flutter/google_maps_flutter/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: google_maps_flutter
22
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
33
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
5-
version: 2.18.0
5+
version: 2.18.1
66

77
environment:
88
sdk: ^3.10.0

0 commit comments

Comments
 (0)