fix(flutter_map): fix type inference and const constructor issues
This commit is contained in:
@@ -29,7 +29,7 @@ class RouteMapWidget extends StatelessWidget {
|
||||
}
|
||||
|
||||
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;
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user