BMFSuggestionInfo.fromMap constructor Null safety
- Map map
map => BMFSuggestionInfo
Implementation
BMFSuggestionInfo.fromMap(Map map)
: assert(
map != null, // ignore: unnecessary_null_comparison
'Construct a BMFSuggestionInfo,The parameter map cannot be null !') {
key = map['key'];
location =
map['location'] == null ? null : BMFCoordinate.fromMap(map['location']);
uid = map['uid'];
city = map['city'];
district = map['district'];
tag = map['tag'];
address = map['address'];
if (map['children'] != null) {
List<BMFSuggestionChildrenInfo> tmpChildren = [];
map['children'].forEach((v) {
tmpChildren.add(BMFSuggestionChildrenInfo.fromMap(v as Map));
});
children = tmpChildren;
}
}