Skip to content

Commit 64e3a8e

Browse files
authored
Upgrade 'latlong2' & 'http' dependencies (#1530)
1 parent 3e946d9 commit 64e3a8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+176
-165
lines changed

example/lib/pages/animated_map_controller.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class AnimatedMapControllerPageState extends State<AnimatedMapControllerPage>
2020
static const _inProgressId = 'AnimatedMapController#MoveInProgress';
2121
static const _finishedId = 'AnimatedMapController#MoveFinished';
2222

23-
static final london = LatLng(51.5, -0.09);
24-
static final paris = LatLng(48.8566, 2.3522);
25-
static final dublin = LatLng(53.3498, -6.2603);
23+
static const london = LatLng(51.5, -0.09);
24+
static const paris = LatLng(48.8566, 2.3522);
25+
static const dublin = LatLng(53.3498, -6.2603);
2626

2727
late final MapController mapController;
2828

@@ -191,7 +191,7 @@ class AnimatedMapControllerPageState extends State<AnimatedMapControllerPage>
191191
child: FlutterMap(
192192
mapController: mapController,
193193
options: MapOptions(
194-
center: LatLng(51.5, -0.09),
194+
center: const LatLng(51.5, -0.09),
195195
zoom: 5,
196196
maxZoom: 10,
197197
minZoom: 3),

example/lib/pages/circle.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CirclePage extends StatelessWidget {
1212
Widget build(BuildContext context) {
1313
final circleMarkers = <CircleMarker>[
1414
CircleMarker(
15-
point: LatLng(51.5, -0.09),
15+
point: const LatLng(51.5, -0.09),
1616
color: Colors.blue.withOpacity(0.7),
1717
borderStrokeWidth: 2,
1818
useRadiusInMeter: true,
@@ -34,7 +34,7 @@ class CirclePage extends StatelessWidget {
3434
Flexible(
3535
child: FlutterMap(
3636
options: MapOptions(
37-
center: LatLng(51.5, -0.09),
37+
center: const LatLng(51.5, -0.09),
3838
zoom: 11,
3939
),
4040
children: [

example/lib/pages/epsg3413_crs.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class _EPSG3413PageState extends State<EPSG3413Page> {
6666
// These circles should have the same pixel radius on the map
6767
final circles = [
6868
CircleMarker(
69-
point: LatLng(90, 0),
69+
point: const LatLng(90, 0),
7070
radius: 20000,
7171
useRadiusInMeter: true,
7272
color: Colors.yellow,
@@ -83,9 +83,9 @@ class _EPSG3413PageState extends State<EPSG3413Page> {
8383

8484
// Add latitude line at 80 degrees
8585
final distancePoleToLat80 =
86-
const Distance().distance(LatLng(90, 0), LatLng(80, 0));
86+
const Distance().distance(const LatLng(90, 0), const LatLng(80, 0));
8787
circles.add(CircleMarker(
88-
point: LatLng(90, 0),
88+
point: const LatLng(90, 0),
8989
radius: distancePoleToLat80,
9090
useRadiusInMeter: true,
9191
color: Colors.transparent,
@@ -130,7 +130,7 @@ class _EPSG3413PageState extends State<EPSG3413Page> {
130130
child: FlutterMap(
131131
options: MapOptions(
132132
crs: epsg3413CRS,
133-
center: LatLng(90, 0),
133+
center: const LatLng(90, 0),
134134
zoom: 3,
135135
maxZoom: maxZoom,
136136
),
@@ -168,8 +168,8 @@ class _EPSG3413PageState extends State<EPSG3413Page> {
168168
overlayImages: [
169169
OverlayImage(
170170
bounds: LatLngBounds(
171-
LatLng(72.7911372, 162.6196478),
172-
LatLng(85.2802493, 79.794166),
171+
const LatLng(72.7911372, 162.6196478),
172+
const LatLng(85.2802493, 79.794166),
173173
),
174174
imageProvider: Image.asset(
175175
'assets/map/epsg3413/amsr2.png',

example/lib/pages/epsg4326_crs.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class EPSG4326Page extends StatelessWidget {
2626
options: MapOptions(
2727
minZoom: 0,
2828
crs: const Epsg4326(),
29-
center: LatLng(0, 0),
29+
center: const LatLng(0, 0),
3030
zoom: 0,
3131
),
3232
children: [

example/lib/pages/fallback_url_network_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class FallbackUrlNetworkPage extends StatelessWidget {
2222
description:
2323
'Map with a fake url should use the fallback, showing (51.5, -0.9).',
2424
zoom: 5,
25-
center: LatLng(51.5, -0.09),
25+
center: const LatLng(51.5, -0.09),
2626
);
2727
}
2828
}

example/lib/pages/fallback_url_offline_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class FallbackUrlOfflinePage extends StatelessWidget {
2323
'Map with a fake asset path, should be using the fallback to show Anholt Island, Denmark.',
2424
maxZoom: 14,
2525
minZoom: 12,
26-
center: LatLng(56.704173, 11.543808),
26+
center: const LatLng(56.704173, 11.543808),
2727
);
2828
}
2929
}

example/lib/pages/home.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class HomePage extends StatelessWidget {
1515
Marker(
1616
width: 80,
1717
height: 80,
18-
point: LatLng(51.5, -0.09),
18+
point: const LatLng(51.5, -0.09),
1919
builder: (ctx) => const FlutterLogo(
2020
textColor: Colors.blue,
2121
key: ObjectKey(Colors.blue),
@@ -24,7 +24,7 @@ class HomePage extends StatelessWidget {
2424
Marker(
2525
width: 80,
2626
height: 80,
27-
point: LatLng(53.3498, -6.2603),
27+
point: const LatLng(53.3498, -6.2603),
2828
builder: (ctx) => const FlutterLogo(
2929
textColor: Colors.green,
3030
key: ObjectKey(Colors.green),
@@ -33,7 +33,7 @@ class HomePage extends StatelessWidget {
3333
Marker(
3434
width: 80,
3535
height: 80,
36-
point: LatLng(48.8566, 2.3522),
36+
point: const LatLng(48.8566, 2.3522),
3737
builder: (ctx) => const FlutterLogo(
3838
textColor: Colors.purple,
3939
key: ObjectKey(Colors.purple),
@@ -55,7 +55,7 @@ class HomePage extends StatelessWidget {
5555
Flexible(
5656
child: FlutterMap(
5757
options: MapOptions(
58-
center: LatLng(51.5, -0.09),
58+
center: const LatLng(51.5, -0.09),
5959
zoom: 5,
6060
),
6161
nonRotatedChildren: [

example/lib/pages/interactive_test_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class _InteractiveTestPageState extends State<InteractiveTestPage> {
148148
child: FlutterMap(
149149
options: MapOptions(
150150
onMapEvent: onMapEvent,
151-
center: LatLng(51.5, -0.09),
151+
center: const LatLng(51.5, -0.09),
152152
zoom: 11,
153153
interactiveFlags: flags,
154154
),

example/lib/pages/latlng_to_screen_point.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class _LatLngScreenPointTestPageState extends State<LatLngScreenPointTestPage> {
5050
_textPos = CustomPoint(pt1!.x, pt1.y);
5151
setState(() {});
5252
},
53-
center: LatLng(51.5, -0.09),
53+
center: const LatLng(51.5, -0.09),
5454
zoom: 11,
5555
rotation: 0,
5656
),

example/lib/pages/live_location.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class _LiveLocationPageState extends State<LiveLocationPage> {
9999
currentLatLng =
100100
LatLng(_currentLocation!.latitude!, _currentLocation!.longitude!);
101101
} else {
102-
currentLatLng = LatLng(0, 0);
102+
currentLatLng = const LatLng(0, 0);
103103
}
104104

105105
final markers = <Marker>[

example/lib/pages/many_markers.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class _ManyMarkersPageState extends State<ManyMarkersPage> {
7373
Flexible(
7474
child: FlutterMap(
7575
options: MapOptions(
76-
center: LatLng(50, 20),
76+
center: const LatLng(50, 20),
7777
zoom: 5,
7878
interactiveFlags: InteractiveFlag.all - InteractiveFlag.rotate,
7979
),

example/lib/pages/map_controller.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class MapControllerPage extends StatefulWidget {
1717
}
1818
}
1919

20-
final LatLng london = LatLng(51.5, -0.09);
21-
final LatLng paris = LatLng(48.8566, 2.3522);
22-
final LatLng dublin = LatLng(53.3498, -6.2603);
20+
const LatLng london = LatLng(51.5, -0.09);
21+
const LatLng paris = LatLng(48.8566, 2.3522);
22+
const LatLng dublin = LatLng(53.3498, -6.2603);
2323

2424
class MapControllerPageState extends State<MapControllerPage> {
2525
late final MapController _mapController;
@@ -156,7 +156,7 @@ class MapControllerPageState extends State<MapControllerPage> {
156156
child: FlutterMap(
157157
mapController: _mapController,
158158
options: MapOptions(
159-
center: LatLng(51.5, -0.09),
159+
center: const LatLng(51.5, -0.09),
160160
zoom: 5,
161161
maxZoom: 5,
162162
minZoom: 3,

example/lib/pages/map_inside_listview.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MapInsideListViewPage extends StatelessWidget {
2323
height: 300,
2424
child: FlutterMap(
2525
options: MapOptions(
26-
center: LatLng(51.5, -0.09),
26+
center: const LatLng(51.5, -0.09),
2727
zoom: 5,
2828
),
2929
nonRotatedChildren: const [

example/lib/pages/marker_anchor.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ class MarkerAnchorPageState extends State<MarkerAnchorPage> {
4141
Marker(
4242
width: 80,
4343
height: 80,
44-
point: LatLng(51.5, -0.09),
44+
point: const LatLng(51.5, -0.09),
4545
builder: (ctx) => const FlutterLogo(),
4646
anchorPos: anchorPos,
4747
),
4848
Marker(
4949
width: 80,
5050
height: 80,
51-
point: LatLng(53.3498, -6.2603),
51+
point: const LatLng(53.3498, -6.2603),
5252
builder: (ctx) => const FlutterLogo(
5353
textColor: Colors.green,
5454
),
@@ -57,7 +57,7 @@ class MarkerAnchorPageState extends State<MarkerAnchorPage> {
5757
Marker(
5858
width: 80,
5959
height: 80,
60-
point: LatLng(48.8566, 2.3522),
60+
point: const LatLng(48.8566, 2.3522),
6161
builder: (ctx) => const FlutterLogo(textColor: Colors.purple),
6262
anchorPos: anchorPos,
6363
),
@@ -109,7 +109,7 @@ class MarkerAnchorPageState extends State<MarkerAnchorPage> {
109109
Flexible(
110110
child: FlutterMap(
111111
options: MapOptions(
112-
center: LatLng(51.5, -0.09),
112+
center: const LatLng(51.5, -0.09),
113113
zoom: 5,
114114
),
115115
children: [

example/lib/pages/marker_rotate.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ class MarkerRotatePageState extends State<MarkerRotatePage> {
7373
Marker(
7474
width: 80,
7575
height: 80,
76-
point: LatLng(51.5, -0.09),
76+
point: const LatLng(51.5, -0.09),
7777
rotate: rotateMarkerLondon,
7878
builder: (ctx) => const FlutterLogo(),
7979
),
8080
Marker(
8181
width: 80,
8282
height: 80,
83-
point: LatLng(53.3498, -6.2603),
83+
point: const LatLng(53.3498, -6.2603),
8484
rotate: rotateMarkerDublin,
8585
builder: (ctx) => const FlutterLogo(
8686
textColor: Colors.green,
@@ -89,7 +89,7 @@ class MarkerRotatePageState extends State<MarkerRotatePage> {
8989
Marker(
9090
width: 80,
9191
height: 80,
92-
point: LatLng(48.8566, 2.3522),
92+
point: const LatLng(48.8566, 2.3522),
9393
rotate: rotateMarkerParis,
9494
builder: (ctx) => const FlutterLogo(textColor: Colors.purple),
9595
),
@@ -134,7 +134,7 @@ class MarkerRotatePageState extends State<MarkerRotatePage> {
134134
Flexible(
135135
child: FlutterMap(
136136
options: MapOptions(
137-
center: LatLng(51.5, -0.09),
137+
center: const LatLng(51.5, -0.09),
138138
zoom: 5,
139139
),
140140
children: [

example/lib/pages/max_bounds.dart

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ class MaxBoundsPage extends StatelessWidget {
2525
Flexible(
2626
child: FlutterMap(
2727
options: MapOptions(
28-
center: LatLng(56.704173, 11.543808),
28+
center: const LatLng(56.704173, 11.543808),
2929
zoom: 3,
30-
maxBounds: LatLngBounds(LatLng(-90, -180), LatLng(90, 180)),
30+
maxBounds: LatLngBounds(
31+
const LatLng(-90, -180),
32+
const LatLng(90, 180),
33+
),
3134
screenSize: MediaQuery.of(context).size,
3235
),
3336
children: [

example/lib/pages/moving_markers.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class _MovingMarkersPageState extends State<MovingMarkersPage> {
5555
Flexible(
5656
child: FlutterMap(
5757
options: MapOptions(
58-
center: LatLng(51.5, -0.09),
58+
center: const LatLng(51.5, -0.09),
5959
zoom: 5,
6060
),
6161
children: [
@@ -79,19 +79,19 @@ List<Marker> _markers = [
7979
Marker(
8080
width: 80,
8181
height: 80,
82-
point: LatLng(51.5, -0.09),
82+
point: const LatLng(51.5, -0.09),
8383
builder: (ctx) => const FlutterLogo(),
8484
),
8585
Marker(
8686
width: 80,
8787
height: 80,
88-
point: LatLng(53.3498, -6.2603),
88+
point: const LatLng(53.3498, -6.2603),
8989
builder: (ctx) => const FlutterLogo(),
9090
),
9191
Marker(
9292
width: 80,
9393
height: 80,
94-
point: LatLng(48.8566, 2.3522),
94+
point: const LatLng(48.8566, 2.3522),
9595
builder: (ctx) => const FlutterLogo(),
9696
),
9797
];

example/lib/pages/network_tile_provider.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NetworkTileProviderPage extends StatelessWidget {
1414
Marker(
1515
width: 80,
1616
height: 80,
17-
point: LatLng(51.5, -0.09),
17+
point: const LatLng(51.5, -0.09),
1818
builder: (ctx) => const FlutterLogo(
1919
textColor: Colors.blue,
2020
key: ObjectKey(Colors.blue),
@@ -23,7 +23,7 @@ class NetworkTileProviderPage extends StatelessWidget {
2323
Marker(
2424
width: 80,
2525
height: 80,
26-
point: LatLng(53.3498, -6.2603),
26+
point: const LatLng(53.3498, -6.2603),
2727
builder: (ctx) => const FlutterLogo(
2828
textColor: Colors.green,
2929
key: ObjectKey(Colors.green),
@@ -32,7 +32,7 @@ class NetworkTileProviderPage extends StatelessWidget {
3232
Marker(
3333
width: 80,
3434
height: 80,
35-
point: LatLng(48.8566, 2.3522),
35+
point: const LatLng(48.8566, 2.3522),
3636
builder: (ctx) => const FlutterLogo(
3737
textColor: Colors.purple,
3838
key: ObjectKey(Colors.purple),
@@ -61,7 +61,7 @@ class NetworkTileProviderPage extends StatelessWidget {
6161
Flexible(
6262
child: FlutterMap(
6363
options: MapOptions(
64-
center: LatLng(51.5, -0.09),
64+
center: const LatLng(51.5, -0.09),
6565
zoom: 5,
6666
),
6767
children: [

example/lib/pages/offline_map.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class OfflineMapPage extends StatelessWidget {
2525
Flexible(
2626
child: FlutterMap(
2727
options: MapOptions(
28-
center: LatLng(56.704173, 11.543808),
28+
center: const LatLng(56.704173, 11.543808),
2929
minZoom: 12,
3030
maxZoom: 14,
31-
swPanBoundary: LatLng(56.6877, 11.5089),
32-
nePanBoundary: LatLng(56.7378, 11.6644),
31+
swPanBoundary: const LatLng(56.6877, 11.5089),
32+
nePanBoundary: const LatLng(56.7378, 11.6644),
3333
),
3434
children: [
3535
TileLayer(

0 commit comments

Comments
 (0)