From 15bde3618367af02392aa5d365eb4b72043ad0ef Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 23 May 2022 15:41:47 -0700 Subject: [PATCH] [google_maps_flutter] Fix prefer_const_literals_to_create_immutables (#5811) --- .../google_maps_flutter_web/CHANGELOG.md | 4 ++++ .../google_maps_controller_test.dart | 16 ++++++++-------- .../google_maps_plugin_test.dart | 16 ++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 8bd3d40babbc..95dfaede8d92 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,3 +1,7 @@ +## NEXT + +* Adds `const` constructor parameters in example tests. + ## 0.3.3 * Removes custom `analysis_options.yaml` (and fixes code to comply with newest rules). diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 17fdd81df645..ef9136afa961 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -145,8 +145,8 @@ void main() { expect(() { controller.updateCircles( CircleUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); @@ -159,8 +159,8 @@ void main() { expect(() { controller.updatePolygons( PolygonUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); @@ -173,8 +173,8 @@ void main() { expect(() { controller.updatePolylines( PolylineUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); @@ -187,8 +187,8 @@ void main() { expect(() { controller.updateMarkers( MarkerUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart index f0fd5a232e00..f28a6041da2a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart @@ -233,8 +233,8 @@ void main() { // Geometry testWidgets('updateMarkers', (WidgetTester tester) async { final MarkerUpdates expectedUpdates = MarkerUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updateMarkers(expectedUpdates, mapId: mapId); @@ -243,8 +243,8 @@ void main() { }); testWidgets('updatePolygons', (WidgetTester tester) async { final PolygonUpdates expectedUpdates = PolygonUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updatePolygons(expectedUpdates, mapId: mapId); @@ -253,8 +253,8 @@ void main() { }); testWidgets('updatePolylines', (WidgetTester tester) async { final PolylineUpdates expectedUpdates = PolylineUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updatePolylines(expectedUpdates, mapId: mapId); @@ -263,8 +263,8 @@ void main() { }); testWidgets('updateCircles', (WidgetTester tester) async { final CircleUpdates expectedUpdates = CircleUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updateCircles(expectedUpdates, mapId: mapId);