Fix one off locations
This commit is contained in:
parent
0f37947be1
commit
13cabaccd1
2 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ class _MainScreenState extends State<MainScreen> {
|
||||||
FilledButton.tonal(
|
FilledButton.tonal(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
try {
|
try {
|
||||||
await bg.BackgroundGeolocation.getCurrentPosition(samples: 1);
|
await bg.BackgroundGeolocation.getCurrentPosition(samples: 1, persist: true);
|
||||||
await bg.BackgroundGeolocation.sync();
|
await bg.BackgroundGeolocation.sync();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
developer.log('Failed to fetch location', error: error);
|
developer.log('Failed to fetch location', error: error);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class _QuickActionsInitializerState extends State<QuickActionsInitializer> {
|
||||||
bg.BackgroundGeolocation.stop();
|
bg.BackgroundGeolocation.stop();
|
||||||
case 'sos':
|
case 'sos':
|
||||||
try {
|
try {
|
||||||
await bg.BackgroundGeolocation.getCurrentPosition(samples: 1, extras: {'alarm': 'sos'});
|
await bg.BackgroundGeolocation.getCurrentPosition(samples: 1, persist: true, extras: {'alarm': 'sos'});
|
||||||
await bg.BackgroundGeolocation.sync();
|
await bg.BackgroundGeolocation.sync();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
developer.log('Failed to send alert', error: error);
|
developer.log('Failed to send alert', error: error);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue