You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[google_maps_flutter_web] Gracefully bypass HeatmapLayer when unsupported by Maps JS SDK
Google Maps JS API version 3.65 deprecated and completely removed the
HeatmapLayer constructor. To resolve the resulting runtime crashes on the
web platform, this change implements a dynamic, strongly-typed feature-detection
helper (isHeatmapSupported()) inside dom_window_extension.dart using standard
nullable JS interop extensions.
The HeatmapsController is shielded to return early and log a deduplicated warning
message on the console via debugPrint at most once per controller lifecycle, making
heatmap operations safe no-ops in 3.65+ environments.
The web integration tests (shape_test.dart and shapes_test.dart) are updated to import
dom_window_extension.dart directly and dynamically skip the heatmap controller test
groups when the class is not supported by the browser environment.
Copy file name to clipboardExpand all lines: packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
## NEXT
2
2
3
+
* Gracefully bypasses `HeatmapLayer` instantiation and operations when unsupported by the loaded Google Maps JavaScript API (version 3.65+), preventing runtime web crashes.
3
4
* Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.
0 commit comments