-
-
Notifications
You must be signed in to change notification settings - Fork 102
Feature for fasten interval #93
Copy link
Copy link
Open
Description
final lastLocation = LocationCache.get();
if (lastLocation == null) return false;
final isHighestAccuracy = Preferences.instance.getString(Preferences.accuracy) == 'highest';
final duration = DateTime.parse(location.timestamp).difference(DateTime.parse(lastLocation.timestamp)).inSeconds;
Important
if (!isHighestAccuracy) {
final fastestInterval = Preferences.instance.getInt(Preferences.fastestInterval);
if (fastestInterval != null && duration < fastestInterval) return true;
}
final distance = _distance(lastLocation, location);
Can change control of Fasteninterval, with its value (0 deactivated), this permit to use High Accuraci and limit the interval as you want
thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels