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