toMap method

Map toMap()

Implementation

Map toMap() {
  if (Platform.isAndroid) {
    return {
      "locationMode": getLocationMode(),
      "gpsFirst": gpsFirst,
      "httpTimeOut": httpTimeOut,
      "interval": interval,
      "needsAddress": needsAddress,
      "onceLocation": onceLocation,
      "onceLocationLatest": onceLocationLatest,
      "locationProtocal": getLocationProtocal(),
      "sensorEnable": sensorEnable,
      "wifiScan": wifiScan,
      "locationCacheEnable": locationCacheEnable,
      "geoLanguage": getGeoLanguage()
    };
  } else {
    return {
      "allowsBackgroundLocationUpdates": allowsBackgroundLocationUpdates,
      "desiredAccuracy": getDesiredAccuracy(),
      "locatingWithReGeocode": locatingWithReGeocode,
      "locationTimeout": locationTimeout,
      "pausesLocationUpdatesAutomatically":
      pausesLocationUpdatesAutomatically,
      "reGeocodeTimeout": reGeocodeTimeout,
      "detectRiskOfFakeLocation": detectRiskOfFakeLocation,
      "distanceFilter": distanceFilter,
      "geoLanguage": getGeoLanguage()
    };
  }
}