OceanTideRsp.fromMap constructor

OceanTideRsp.fromMap(
  1. Map map
)

fromMap

Implementation

OceanTideRsp.fromMap(Map<dynamic, dynamic> map) {
  code = map['code'] as String;
  basic = Basic.fromMap(map['basic'] ?? Map());
  refer = Refer.fromMap(map['refer'] ?? Map());
  tideHourlyList = (map["tideHourlyList"] as List? ?? [])
      .map((v) => OceanTide.fromMap(v))
      .toList();
  tideList = (map["tideTable"] as List? ?? [])
      .map((v) => OceanTide.fromMap(v))
      .toList();
}