RadarReviewResourceLocation.fromJson constructor

RadarReviewResourceLocation.fromJson(
  1. Object? json
)

Implementation

factory RadarReviewResourceLocation.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return RadarReviewResourceLocation(
    city: map['city'] == null ? null : (map['city'] as String),
    country: map['country'] == null ? null : (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),
  );
}