StormTrackNow.fromMap constructor

StormTrackNow.fromMap(
  1. Map map
)

Implementation

StormTrackNow.fromMap(Map<dynamic, dynamic> map) {
  pubTime = map['pubTime'] as String;
  lon = map['lon'] as String;
  lat = map['lat'] as String;
  type = map['type'] as String;
  pressure = map['pressure'] as String;
  windSpeed = map['windSpeed'] as String;
  moveSpeed = map['moveSpeed'] as String;
  moveDir = map['moveDir'] as String;
  move360 = map['move360'] as String? ?? '';
  if (map.containsKey('windRadius30')) {
    windRadius30 = StormTrackWind.fromMap(map['windRadius30']);
  }
  if (map.containsKey('windRadius50')) {
    windRadius50 = StormTrackWind.fromMap(map['windRadius50']);
  }
  if (map.containsKey('windRadius64')) {
    windRadius64 = StormTrackWind.fromMap(map['windRadius64']);
  }
}