fix(flutter_map): fix type inference and const constructor issues

This commit is contained in:
ElPoyo
2026-06-05 15:17:29 +02:00
parent 30d90a05fd
commit cb94badafe
@@ -29,7 +29,7 @@ class RouteMapWidget extends StatelessWidget {
} }
LatLngBounds? _computeBounds(List<List<LatLng>> allPoints) { LatLngBounds? _computeBounds(List<List<LatLng>> allPoints) {
final flat = allPoints.expand((e) => e).toList(); final flat = allPoints.expand((e) => e).cast<LatLng>().toList();
if (flat.isEmpty) return null; if (flat.isEmpty) return null;
return LatLngBounds.fromPoints(flat); return LatLngBounds.fromPoints(flat);
} }
@@ -93,7 +93,7 @@ class RouteMapWidget extends StatelessWidget {
padding: const EdgeInsets.all(32), padding: const EdgeInsets.all(32),
) )
: CameraFit.bounds( : CameraFit.bounds(
bounds: LatLngBounds.fromPoints(const [LatLng(46.2276, 2.2137)]), bounds: LatLngBounds.fromPoints([LatLng(46.2276, 2.2137)]),
padding: const EdgeInsets.all(32), padding: const EdgeInsets.all(32),
), ),
interactionOptions: const InteractionOptions( interactionOptions: const InteractionOptions(