Location tracking improvements

This commit is contained in:
Yegor Vialov
2019-10-21 18:22:25 +00:00
parent c70f52a73d
commit c263542c54
2 changed files with 40 additions and 34 deletions

View File

@ -133,6 +133,9 @@ class _ConfigPanelWidgetState extends State<ConfigPanelWidget> {
value: _locationTrackingEnabled,
onChanged: (value) {
SharedPreferences.getInstance().then((prefs) => prefs.setBool("location-enabled", value));
if (value) {
LocationManager().updateDeviceLocation();
}
setState(() {
_locationTrackingEnabled = value;
});