LocationSettings constructor
LocationSettings({
- bool askForPermission = true,
- String rationaleMessageForPermissionRequest = 'The app needs to access your location',
- String rationaleMessageForGPSRequest = 'The app needs to access your GPS location',
- bool useGooglePlayServices = true,
- bool askForGooglePlayServices = false,
- bool askForGPS = true,
- bool fallbackToGPS = true,
- bool ignoreLastKnownPosition = false,
- double? expirationDuration,
- double? expirationTime,
- double fastestInterval = 500,
- double interval = 1000,
- double? maxWaitTime = 3000,
- int? numUpdates,
- double? acceptableAccuracy,
- LocationAccuracy accuracy = LocationAccuracy.high,
- double smallestDisplacement = 0,
- bool waitForAccurateLocation = true,
LocationSettings is used to change the settings of the next location request.
Implementation
LocationSettings({
this.askForPermission = true,
this.rationaleMessageForPermissionRequest =
'The app needs to access your location',
this.rationaleMessageForGPSRequest =
'The app needs to access your GPS location',
this.useGooglePlayServices = true,
this.askForGooglePlayServices = false,
this.askForGPS = true,
this.fallbackToGPS = true,
this.ignoreLastKnownPosition = false,
this.expirationDuration,
this.expirationTime,
this.fastestInterval = 500,
this.interval = 1000,
this.maxWaitTime = 3000,
this.numUpdates,
this.acceptableAccuracy,
this.accuracy = LocationAccuracy.high,
this.smallestDisplacement = 0,
this.waitForAccurateLocation = true,
});