Location constructor

Location({
  1. double? latitude,
  2. double? longitude,
  3. double? accuracy,
  4. double? altitude,
  5. double? bearing,
  6. double? speed,
  7. String? country,
  8. String? province,
  9. String? city,
  10. String? district,
  11. String? street,
  12. String? streetNumber,
  13. String? cityCode,
  14. String? adCode,
  15. String? address,
  16. String? description,
  17. String? snapshotUrl,
  18. double? zoomLevel,
  19. double? distance,
})

Implementation

Location({
  double? latitude,
  double? longitude,
  double? accuracy,
  double? altitude,
  double? bearing,
  double? speed,
  String? country,
  String? province,
  String? city,
  String? district,
  String? street,
  String? streetNumber,
  String? cityCode,
  String? adCode,
  String? address,
  String? description,
  String? snapshotUrl,
  double? zoomLevel,
  double? distance,
})  : latitude = latitude ?? 39.909187,
      longitude = longitude ?? 116.397451,
      accuracy = accuracy ?? 0,
      altitude = altitude ?? 0,
      bearing = bearing ?? 0,
      speed = speed ?? 0,
      country = country ?? '',
      province = province ?? '',
      city = city ?? '',
      district = district ?? '',
      street = street ?? '',
      streetNumber = streetNumber ?? '',
      cityCode = cityCode ?? '',
      adCode = adCode ?? '',
      address = address ?? '',
      description = description ?? '',
      snapshotUrl = snapshotUrl ?? '',
      zoomLevel = zoomLevel ?? 16.0,
      distance = distance ?? 0;