You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Important
if (!isHighestAccuracy) {
final fastestInterval = Preferences.instance.getInt(Preferences.fastestInterval);
if (fastestInterval != null && duration < fastestInterval) return true;
}
Can change control of Fasteninterval, with its value (0 deactivated), this permit to use High Accuraci and limit the interval as you want
thanks