fromJson static method

GeoLocation? fromJson(
  1. dynamic dyn
)

Implementation

static GeoLocation? fromJson(dyn) {
  if (dyn == null) return null;
  if (dyn["lat"] != null && dyn["lon"] != null) {
    return GeoLocation(
        lat: dyn["lat"] as double?, lon: dyn["lon"] as double?);
  }
}