WeatherLocation.fromJson constructor

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

Implementation

factory WeatherLocation.fromJson(Map<String, dynamic> json) {
  return WeatherLocation(
    useFixedLocation: json['useFixedLocation'] as bool?,
    latitude: (json['latitude'] as num?)?.toDouble(),
    longitude: (json['longitude'] as num?)?.toDouble(),
    locationName: json['locationName']?.toString(),
    isoCountryCode: json['isoCountryCode']?.toString(),
    postalCode: json['postalCode']?.toString(),
  );
}