1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-11 07:18:15 +00:00

Clean up dependencies across packages (#2585)

Drop dep on pkg:collection, use new bits in Dart 3.0
Fixed very old dep in navigation_and_routing – bug was fixed long ago
This commit is contained in:
Kevin Moore
2025-02-12 21:14:20 -06:00
committed by GitHub
parent 4cdd42ca05
commit 9fef1332f3
14 changed files with 7 additions and 50 deletions

View File

@@ -5,7 +5,6 @@
import 'dart:async';
import 'dart:math';
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
@@ -279,9 +278,8 @@ class _PlaceMapState extends State<PlaceMap> {
// At this point, we know the places have been updated from the list
// view. We need to reconfigure the map to respect the updates.
for (final place in newConfiguration.places) {
final oldPlace = _configuration!.places.firstWhereOrNull(
(p) => p.id == place.id,
);
final oldPlace =
_configuration!.places.where((p) => p.id == place.id).firstOrNull;
if (oldPlace == null || oldPlace != place) {
// New place or updated place.
_updateExistingPlaceMarker(place: place);