fix(flutter_map): update imports and constructors for flutter_map 8 and latlong2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:latlong2/latlong2.dart';
|
||||
|
||||
List<LatLng> safeDecodePolyline(String encoded) {
|
||||
if (encoded.isEmpty) return [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:latlong2/latlong2.dart';
|
||||
import 'package:em2rp/models/route_result_model.dart';
|
||||
import '../../../utils/polyline_utils.dart';
|
||||
|
||||
@@ -92,8 +92,10 @@ class RouteMapWidget extends StatelessWidget {
|
||||
bounds: bounds,
|
||||
padding: const EdgeInsets.all(32),
|
||||
)
|
||||
: const CameraFit.coordinates(
|
||||
coordinates: [LatLng(46.2276, 2.2137)], padding: EdgeInsets.all(32)),
|
||||
: CameraFit.bounds(
|
||||
bounds: LatLngBounds.fromPoints(const [LatLng(46.2276, 2.2137)]),
|
||||
padding: const EdgeInsets.all(32),
|
||||
),
|
||||
interactionOptions: const InteractionOptions(
|
||||
flags: InteractiveFlag.all,
|
||||
),
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ dependencies:
|
||||
flutter_dotenv: ^6.0.0
|
||||
|
||||
# Map
|
||||
flutter_map: ^7.0.2
|
||||
flutter_map: ^8.3.0
|
||||
latlong2: ^0.9.1
|
||||
|
||||
# Sharing & Launch
|
||||
|
||||
Reference in New Issue
Block a user