LocationSettings constructor

LocationSettings({
  1. bool askForPermission = true,
  2. String rationaleMessageForPermissionRequest = 'The app needs to access your location',
  3. String rationaleMessageForGPSRequest = 'The app needs to access your GPS location',
  4. bool useGooglePlayServices = true,
  5. bool askForGooglePlayServices = false,
  6. bool askForGPS = true,
  7. bool fallbackToGPS = true,
  8. bool ignoreLastKnownPosition = false,
  9. double? expirationDuration,
  10. double? expirationTime,
  11. double fastestInterval = 500,
  12. double interval = 1000,
  13. double? maxWaitTime = 3000,
  14. int? numUpdates,
  15. double? acceptableAccuracy,
  16. LocationAccuracy accuracy = LocationAccuracy.high,
  17. double smallestDisplacement = 0,
  18. 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,
});