ClimateRemovalsLocation.fromJson constructor

ClimateRemovalsLocation.fromJson(
  1. Object? json
)

Implementation

factory ClimateRemovalsLocation.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return ClimateRemovalsLocation(
    city: map['city'] == null ? null : (map['city'] as String),
    country: (map['country'] as String),
    latitude:
        map['latitude'] == null ? null : (map['latitude'] as num).toDouble(),
    longitude: map['longitude'] == null
        ? null
        : (map['longitude'] as num).toDouble(),
    region: map['region'] == null ? null : (map['region'] as String),
  );
}