changeSettings method
Future<bool>
changeSettings({
- LocationAccuracy? accuracy,
- int? interval,
- double? distanceFilter,
- bool? pausesLocationUpdatesAutomatically,
- int? backgroundInterval,
override
Change settings of the location request.
The accuracy argument is controlling the precision of the
LocationData. The interval and distanceFilter are controlling how
often a new location is sent through onLocationChanged. The
pausesLocationUpdatesAutomatically argument indicates whether the
underlying location manager object may pause location updates.
backgroundInterval (in milliseconds, Android only) sets a different
update interval to use while background mode is enabled. When null,
interval is used in the background as well. Ignored on iOS, macOS and
web.
Implementation
@override
Future<bool> changeSettings({
LocationAccuracy? accuracy,
int? interval,
double? distanceFilter,
bool? pausesLocationUpdatesAutomatically,
// backgroundInterval is Android-only and ignored on web.
int? backgroundInterval,
}) async {
_accuracy = accuracy;
return true;
}