diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index 7183bed62b7..163cb160043 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 2.14.1 +* Replaces internal use of deprecated methods. * Updates minimum supported SDK version to Flutter 3.32/Dart 3.8. ## 2.14.0 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/serialization.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/serialization.dart index 66d5d24c6e4..5c3cf395141 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/serialization.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/serialization.dart @@ -130,7 +130,9 @@ Object serializeHeatmapGradient(HeatmapGradient gradient) { _addIfNonNull( json, _heatmapGradientColorsKey, - gradient.colors.map((HeatmapGradientColor e) => e.color.value).toList(), + gradient.colors + .map((HeatmapGradientColor e) => e.color.toARGB32()) + .toList(), ); _addIfNonNull( json, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index ef40f0ef751..8ad4752685f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -1107,8 +1107,9 @@ class PinConfig extends BitmapDescriptor { Object toJson() => [ type, { - if (backgroundColor != null) 'backgroundColor': backgroundColor?.value, - if (borderColor != null) 'borderColor': borderColor?.value, + if (backgroundColor != null) + 'backgroundColor': backgroundColor?.toARGB32(), + if (borderColor != null) 'borderColor': borderColor?.toARGB32(), if (glyph != null) 'glyph': glyph?.toJson(), }, ]; @@ -1131,7 +1132,7 @@ class CircleGlyph extends AdvancedMarkerGlyph { @override Object toJson() => [ 'circleGlyph', - {'color': color.value}, + {'color': color.toARGB32()}, ]; } @@ -1175,7 +1176,7 @@ class TextGlyph extends AdvancedMarkerGlyph { 'textGlyph', { 'text': text, - if (textColor != null) 'textColor': textColor!.value, + if (textColor != null) 'textColor': textColor!.toARGB32(), }, ]; } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/circle.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/circle.dart index c81e2184cbf..3dc0161d953 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/circle.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/circle.dart @@ -121,10 +121,10 @@ class Circle implements MapsObject { addIfPresent('circleId', circleId.value); addIfPresent('consumeTapEvents', consumeTapEvents); - addIfPresent('fillColor', fillColor.value); + addIfPresent('fillColor', fillColor.toARGB32()); addIfPresent('center', center.toJson()); addIfPresent('radius', radius); - addIfPresent('strokeColor', strokeColor.value); + addIfPresent('strokeColor', strokeColor.toARGB32()); addIfPresent('strokeWidth', strokeWidth); addIfPresent('visible', visible); addIfPresent('zIndex', zIndex); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/heatmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/heatmap.dart index 950711868ea..1eb10292aa8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/heatmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/heatmap.dart @@ -293,7 +293,7 @@ class HeatmapGradient { addIfPresent( 'colors', - colors.map((HeatmapGradientColor e) => e.color.value).toList(), + colors.map((HeatmapGradientColor e) => e.color.toARGB32()).toList(), ); addIfPresent( 'startPoints', diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polygon.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polygon.dart index 1cf820f0849..fed4a2c9e48 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polygon.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polygon.dart @@ -141,9 +141,9 @@ class Polygon implements MapsObject { addIfPresent('polygonId', polygonId.value); addIfPresent('consumeTapEvents', consumeTapEvents); - addIfPresent('fillColor', fillColor.value); + addIfPresent('fillColor', fillColor.toARGB32()); addIfPresent('geodesic', geodesic); - addIfPresent('strokeColor', strokeColor.value); + addIfPresent('strokeColor', strokeColor.toARGB32()); addIfPresent('strokeWidth', strokeWidth); addIfPresent('visible', visible); addIfPresent('zIndex', zIndex); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polyline.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polyline.dart index 6dcee15fd63..085ed9e34be 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polyline.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/polyline.dart @@ -171,7 +171,7 @@ class Polyline implements MapsObject { addIfPresent('polylineId', polylineId.value); addIfPresent('consumeTapEvents', consumeTapEvents); - addIfPresent('color', color.value); + addIfPresent('color', color.toARGB32()); addIfPresent('endCap', endCap.toJson()); addIfPresent('geodesic', geodesic); addIfPresent('jointType', jointType.value); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml index 9f98762bd09..9aa5ed82840 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_maps_f issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.14.0 +version: 2.14.1 environment: sdk: ^3.8.0 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart index 13ccb726840..16aa10d28ee 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart @@ -784,8 +784,8 @@ void main() { expect(pinConfig.toJson(), [ PinConfig.type, { - 'backgroundColor': Colors.green.value, - 'borderColor': Colors.blue.value, + 'backgroundColor': Colors.green.toARGB32(), + 'borderColor': Colors.blue.toARGB32(), }, ]); }); @@ -802,11 +802,14 @@ void main() { expect(pinConfig.toJson(), [ PinConfig.type, { - 'backgroundColor': Colors.green.value, - 'borderColor': Colors.blue.value, + 'backgroundColor': Colors.green.toARGB32(), + 'borderColor': Colors.blue.toARGB32(), 'glyph': [ 'textGlyph', - {'text': 'Hello', 'textColor': Colors.red.value}, + { + 'text': 'Hello', + 'textColor': Colors.red.toARGB32(), + }, ], }, ]); @@ -831,8 +834,8 @@ void main() { 'bitmap': ['fromAsset', 'red_square.png'], }, ], - 'backgroundColor': Colors.black.value, - 'borderColor': Colors.red.value, + 'backgroundColor': Colors.black.toARGB32(), + 'borderColor': Colors.red.toARGB32(), }, ]); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/heatmap_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/heatmap_test.dart index 44f3a135b4f..93329adbdf3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/heatmap_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/heatmap_test.dart @@ -303,7 +303,7 @@ void main() { expect(gradient.toJson(), { 'colors': colors - .map((HeatmapGradientColor e) => e.color.value) + .map((HeatmapGradientColor e) => e.color.toARGB32()) .toList(), 'startPoints': colors .map((HeatmapGradientColor e) => e.startPoint)