GoogleGeocodingLocation.fromJson constructor

GoogleGeocodingLocation.fromJson(
  1. Map<String, dynamic> json
)

GoogleGeocodingLocation From Json factory

Implementation

factory GoogleGeocodingLocation.fromJson(Map<String, dynamic> json) {
  final lat = json['lat'];
  final lng = json['lng'];
  return GoogleGeocodingLocation(
    lat: lat is int ? lat.toDouble() : lat as double,
    lng: lng is int ? lng.toDouble() : lng as double,
  );
}