BMFWeatherSearchOption.fromMap constructor Null safety

BMFWeatherSearchOption.fromMap(
  1. Map map
)

map => BMFWeatherSearchOption

Implementation

BMFWeatherSearchOption.fromMap(Map map)
    : assert(
          map != null, // ignore: unnecessary_null_comparison
          'Construct a BMFWeatherSearchOption,The parameter map cannot be null !') {
  districtID = map['districtID'];
  location =
      map['location'] == null ? null : BMFCoordinate.fromMap(map['location']);
  serverType = BMFWeatherServerType.values[map['serverType'] as int];
  dataType = BMFWeatherDataType.values[map['dataType'] as int];
  languageType = BMFLanguageType.values[map['languageType'] as int];
}