File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class ShowLocationSampleState extends State<ShowLocationSample> {
4141
4242 @override
4343 void dispose () {
44+ _locationDataSource.stop ();
4445 _locationSubscription? .cancel ();
4546 _statusSubscription? .cancel ();
4647
@@ -157,7 +158,7 @@ class ShowLocationSampleState extends State<ShowLocationSample> {
157158 });
158159
159160 try {
160- await _locationDataSource.start ();
161+ // await _locationDataSource.start();
161162 _locationSubscription = _locationDataSource.onLocationChanged
162163 .listen (_handleLdsLocationChange);
163164 } on ArcGISException catch (e) {
Original file line number Diff line number Diff line change @@ -42,12 +42,9 @@ class SimulateLocationSampleState extends State<SimulateLocationSample> {
4242
4343 @override
4444 void dispose () {
45+ _locationDataSource.stop ();
4546 _locationSubscription? .cancel ();
4647 _statusSubscription? .cancel ();
47- if (_locationDataSource.status == LocationDataSourceStatus .starting ||
48- _locationDataSource.status == LocationDataSourceStatus .started) {
49- _locationDataSource.stop ();
50- }
5148
5249 super .dispose ();
5350 }
You can’t perform that action at this time.
0 commit comments