Skip to content

Commit 58478a5

Browse files
authored
[google_maps_flutter] Fix prefer_const_literals_to_create_immutables (flutter#5811)
1 parent 99aa799 commit 58478a5

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Adds `const` constructor parameters in example tests.
4+
15
## 0.3.3
26

37
* Removes custom `analysis_options.yaml` (and fixes code to comply with newest rules).

packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart

+8-8
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ void main() {
145145
expect(() {
146146
controller.updateCircles(
147147
CircleUpdates.from(
148-
<Circle>{},
149-
<Circle>{},
148+
const <Circle>{},
149+
const <Circle>{},
150150
),
151151
);
152152
}, throwsAssertionError);
@@ -159,8 +159,8 @@ void main() {
159159
expect(() {
160160
controller.updatePolygons(
161161
PolygonUpdates.from(
162-
<Polygon>{},
163-
<Polygon>{},
162+
const <Polygon>{},
163+
const <Polygon>{},
164164
),
165165
);
166166
}, throwsAssertionError);
@@ -173,8 +173,8 @@ void main() {
173173
expect(() {
174174
controller.updatePolylines(
175175
PolylineUpdates.from(
176-
<Polyline>{},
177-
<Polyline>{},
176+
const <Polyline>{},
177+
const <Polyline>{},
178178
),
179179
);
180180
}, throwsAssertionError);
@@ -187,8 +187,8 @@ void main() {
187187
expect(() {
188188
controller.updateMarkers(
189189
MarkerUpdates.from(
190-
<Marker>{},
191-
<Marker>{},
190+
const <Marker>{},
191+
const <Marker>{},
192192
),
193193
);
194194
}, throwsAssertionError);

packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart

+8-8
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ void main() {
233233
// Geometry
234234
testWidgets('updateMarkers', (WidgetTester tester) async {
235235
final MarkerUpdates expectedUpdates = MarkerUpdates.from(
236-
<Marker>{},
237-
<Marker>{},
236+
const <Marker>{},
237+
const <Marker>{},
238238
);
239239

240240
await plugin.updateMarkers(expectedUpdates, mapId: mapId);
@@ -243,8 +243,8 @@ void main() {
243243
});
244244
testWidgets('updatePolygons', (WidgetTester tester) async {
245245
final PolygonUpdates expectedUpdates = PolygonUpdates.from(
246-
<Polygon>{},
247-
<Polygon>{},
246+
const <Polygon>{},
247+
const <Polygon>{},
248248
);
249249

250250
await plugin.updatePolygons(expectedUpdates, mapId: mapId);
@@ -253,8 +253,8 @@ void main() {
253253
});
254254
testWidgets('updatePolylines', (WidgetTester tester) async {
255255
final PolylineUpdates expectedUpdates = PolylineUpdates.from(
256-
<Polyline>{},
257-
<Polyline>{},
256+
const <Polyline>{},
257+
const <Polyline>{},
258258
);
259259

260260
await plugin.updatePolylines(expectedUpdates, mapId: mapId);
@@ -263,8 +263,8 @@ void main() {
263263
});
264264
testWidgets('updateCircles', (WidgetTester tester) async {
265265
final CircleUpdates expectedUpdates = CircleUpdates.from(
266-
<Circle>{},
267-
<Circle>{},
266+
const <Circle>{},
267+
const <Circle>{},
268268
);
269269

270270
await plugin.updateCircles(expectedUpdates, mapId: mapId);

0 commit comments

Comments
 (0)