Geolocation constructor

Geolocation({
  1. required ResourceType type,
  2. required String id,
  3. String idV1 = "",
  4. required bool isConfigured,
  5. double? latitude,
  6. double? longitude,
})

Creates a Geolocation object.

Implementation

Geolocation({
  required super.type,
  required super.id,
  this.idV1 = "",
  required this.isConfigured,
  double? latitude,
  double? longitude,
})  : assert(idV1.isEmpty || Validators.isValidIdV1(idV1),
          '"$idV1" is not a valid `idV1`'),
      assert(latitude == null || Validators.isValidLatitude(latitude),
          '"$latitude" is not a valid `latitude`'),
      assert(longitude == null || Validators.isValidLongitude(longitude),
          '"$longitude" is not a valid `longitude`'),
      _originalLatitude = latitude,
      _latitude = latitude,
      _originalLongitude = longitude,
      _longitude = longitude;