@@ -10,10 +10,12 @@ class LocationIndicatorExamplePage extends StatefulWidget {
10
10
const LocationIndicatorExamplePage ({super .key});
11
11
12
12
@override
13
- State <LocationIndicatorExamplePage > createState () => _LocationIndicatorExamplePageState ();
13
+ State <LocationIndicatorExamplePage > createState () =>
14
+ _LocationIndicatorExamplePageState ();
14
15
}
15
16
16
- class _LocationIndicatorExamplePageState extends State <LocationIndicatorExamplePage > {
17
+ class _LocationIndicatorExamplePageState
18
+ extends State <LocationIndicatorExamplePage > {
17
19
final _mockLocations = [
18
20
LatLng (48.1234963 , 11.5910182 ),
19
21
LatLng (48.1239241 , 11.45897063 ),
@@ -49,7 +51,8 @@ class _LocationIndicatorExamplePageState extends State<LocationIndicatorExampleP
49
51
: await _controller! .locationDisplay.startSource ();
50
52
} catch (e, stack) {
51
53
if (! mounted) return ;
52
- ScaffoldMessenger .of (_snackBarKey.currentContext! ).showSnackBar (SnackBar (content: Text ("$e " )));
54
+ ScaffoldMessenger .of (_snackBarKey.currentContext! )
55
+ .showSnackBar (SnackBar (content: Text ("$e " )));
53
56
debugPrint ("$e " );
54
57
debugPrintStack (stackTrace: stack);
55
58
}
@@ -73,7 +76,9 @@ class _LocationIndicatorExamplePageState extends State<LocationIndicatorExampleP
73
76
_configureLocationDisplay (Colors .blue);
74
77
75
78
_panUpdateSubscription? .cancel ();
76
- _panUpdateSubscription = controller.centerPosition ().listen ((_) => _refreshAutoPanMode ());
79
+ _panUpdateSubscription = controller
80
+ .centerPosition ()
81
+ .listen ((_) => _refreshAutoPanMode ());
77
82
},
78
83
),
79
84
),
@@ -82,7 +87,9 @@ class _LocationIndicatorExamplePageState extends State<LocationIndicatorExampleP
82
87
ElevatedButton (
83
88
onPressed: _switchLocationSource,
84
89
child: Text (
85
- _isManualLocationSource ? "Use auto location source" : "Use manual location source" ,
90
+ _isManualLocationSource
91
+ ? "Use auto location source"
92
+ : "Use manual location source" ,
86
93
),
87
94
),
88
95
if (_isManualLocationSource) ...[
@@ -103,12 +110,15 @@ class _LocationIndicatorExamplePageState extends State<LocationIndicatorExampleP
103
110
ElevatedButton (
104
111
onPressed: () {
105
112
setState (
106
- () => _useCourseSymbolForMovement = ! _useCourseSymbolForMovement,
113
+ () =>
114
+ _useCourseSymbolForMovement = ! _useCourseSymbolForMovement,
107
115
);
108
116
_configureLocationDisplay (Colors .red);
109
117
},
110
118
child: Text (
111
- _useCourseSymbolForMovement ? "Disable course indicator" : "Enable course indicator" ,
119
+ _useCourseSymbolForMovement
120
+ ? "Disable course indicator"
121
+ : "Enable course indicator" ,
112
122
),
113
123
),
114
124
ElevatedButton (
@@ -157,7 +167,9 @@ class _LocationIndicatorExamplePageState extends State<LocationIndicatorExampleP
157
167
Future <void > _switchLocationSource () async {
158
168
await _controller! .locationDisplay.stopSource ();
159
169
await _controller! .setLocationDisplay (
160
- _isManualLocationSource ? ArcgisLocationDisplay () : ArcgisManualLocationDisplay (),
170
+ _isManualLocationSource
171
+ ? ArcgisLocationDisplay ()
172
+ : ArcgisManualLocationDisplay (),
161
173
);
162
174
setState (() => _isManualLocationSource = ! _isManualLocationSource);
163
175
@@ -254,7 +266,8 @@ class _LocationIndicatorExamplePageState extends State<LocationIndicatorExampleP
254
266
255
267
Future <void > _refreshAutoPanMode () async {
256
268
_refreshAutoPanModeTimer? .cancel ();
257
- _refreshAutoPanModeTimer = Timer (const Duration (milliseconds: 50 ), () async {
269
+ _refreshAutoPanModeTimer =
270
+ Timer (const Duration (milliseconds: 50 ), () async {
258
271
final panMode = await _controller! .locationDisplay.getAutoPanMode ();
259
272
if (! mounted) return ;
260
273
setState (() => _activeAutoPanMode = panMode);
0 commit comments