diff --git a/em2rp/lib/views/widgets/common/route_map_widget.dart b/em2rp/lib/views/widgets/common/route_map_widget.dart index ef888d5..ffda1f6 100644 --- a/em2rp/lib/views/widgets/common/route_map_widget.dart +++ b/em2rp/lib/views/widgets/common/route_map_widget.dart @@ -29,7 +29,7 @@ class RouteMapWidget extends StatelessWidget { } LatLngBounds? _computeBounds(List> allPoints) { - final flat = allPoints.expand((e) => e).toList(); + final flat = allPoints.expand((e) => e).cast().toList(); if (flat.isEmpty) return null; return LatLngBounds.fromPoints(flat); } @@ -93,7 +93,7 @@ class RouteMapWidget extends StatelessWidget { padding: const EdgeInsets.all(32), ) : CameraFit.bounds( - bounds: LatLngBounds.fromPoints(const [LatLng(46.2276, 2.2137)]), + bounds: LatLngBounds.fromPoints([LatLng(46.2276, 2.2137)]), padding: const EdgeInsets.all(32), ), interactionOptions: const InteractionOptions(