location property
The configuration settings for location tracking.
This property holds the settings used to configure the behavior of the location tracking features in the application. It includes settings such as desired accuracy, distance filter, maximum acceptable accuracy and speed accuracy, and update intervals.
The location class contains various parameters that can be adjusted to control
how the location tracking operates. For instance, desiredAccuracy controls the
accuracy level of the location data, distanceFilter determines the minimum distance
a device must move horizontally before an update event is generated, and
locationUpdateInterval sets the desired interval for active location updates.
Assign a properly configured location instance to this property to modify the
location tracking behavior.
Example:
location = LocationConfig(
desiredAccuracy: LocationConfig.desiredAcuracyHigh,
distanceFilter: 10.0,
maxAcceptableAccuracy: 30.0,
maxAcceptableSpeedAccuracy: 3.0,
locationUpdateInterval: 3000,
fastestLocationUpdateInterval: 1000,
);
Implementation
LocationConfig? location;