GeoPoint constructor

GeoPoint({
  1. required double latitude,
  2. required double longitude,
  3. String? name,
  4. int? id,
  5. String? slug,
  6. int? timestamp,
  7. double? altitude,
  8. double? speed,
  9. double? accuracy,
  10. double? heading,
  11. String? country,
  12. String? locality,
  13. String? sublocality,
  14. String? number,
  15. String? postalCode,
  16. String? region,
  17. double? speedAccuracy,
  18. String? street,
  19. String? subregion,
  20. List<File>? images,
})

Default constructor: needs latitude and longitude

Implementation

GeoPoint(
    {required this.latitude,
    required this.longitude,
    this.name,
    this.id,
    this.slug,
    this.timestamp,
    this.altitude,
    this.speed,
    this.accuracy,
    this.heading,
    this.country,
    this.locality,
    this.sublocality,
    this.number,
    this.postalCode,
    this.region,
    this.speedAccuracy,
    this.street,
    this.subregion,
    this.images}) {
  if (slug == null && name != null) slug = slugify(name!);
}