LocationService constructor

LocationService({
  1. String? roleName,
  2. List<String>? supportedDataTypes,
  3. GeolocationAccuracy accuracy = GeolocationAccuracy.balanced,
  4. double distance = 0,
  5. Duration? interval,
  6. String? notificationTitle,
  7. String? notificationMessage,
  8. String? notificationDescription,
})

Create and configure a LocationService.

Default configuration is:

  • roleName = "location_service"
  • accuracy = balanced
  • distance = 0
  • interval = 1 minute

Implementation

LocationService({
  String? roleName,
  List<String>? supportedDataTypes,
  this.accuracy = GeolocationAccuracy.balanced,
  this.distance = 0,
  Duration? interval,
  this.notificationTitle,
  this.notificationMessage,
  this.notificationDescription,
}) : super(
        roleName: roleName ?? DEFAULT_ROLENAME,
        supportedDataTypes: supportedDataTypes,
      ) {
  this.interval = interval ?? const Duration(minutes: 1);
}