LocationSettings class
Settings for location tracking
Constructors
- LocationSettings({LocationAccuracy accuracy = LocationAccuracy.high, double distanceFilter = 10.0, int? timeInterval, bool enableBackgroundTracking = false, bool showBackgroundNotification = true, String? notificationTitle = 'Location Tracking', String? notificationText = 'Tracking your location in background', bool pauseLocationUpdatesAutomatically = false, bool allowMockLocations = false})
-
const
-
LocationSettings.fromJson(Map<
String, dynamic> json) -
Create from JSON
factory
Properties
- accuracy → LocationAccuracy
-
Desired accuracy level
final
- allowMockLocations → bool
-
Whether to allow mock locations
final
- distanceFilter → double
-
Minimum distance (in meters) before location update
final
- enableBackgroundTracking → bool
-
Whether to track location in background
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- notificationText → String?
-
Notification text for background tracking (Android only)
final
- notificationTitle → String?
-
Notification title for background tracking (Android only)
final
- pauseLocationUpdatesAutomatically → bool
-
Whether to pause updates automatically when location doesn't change
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showBackgroundNotification → bool
-
Whether to show notification in background (Android only)
final
- timeInterval → int?
-
Time interval (in milliseconds) between location updates
final
Methods
-
copyWith(
{LocationAccuracy? accuracy, double? distanceFilter, int? timeInterval, bool? enableBackgroundTracking, bool? showBackgroundNotification, String? notificationTitle, String? notificationText, bool? pauseLocationUpdatesAutomatically, bool? allowMockLocations}) → LocationSettings -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited