diff --git a/lib/geolocation_service.dart b/lib/geolocation_service.dart index 68fa110..955dd13 100644 --- a/lib/geolocation_service.dart +++ b/lib/geolocation_service.dart @@ -46,7 +46,11 @@ class GeolocationService { static Future onLocation(bg.Location location) async { if (_shouldDelete(location)) { - await bg.BackgroundGeolocation.destroyLocation(location.uuid); + try { + await bg.BackgroundGeolocation.destroyLocation(location.uuid); + } catch(error) { + developer.log('Failed to delete location', error: error); + } } else { LocationCache.set(location); try {