fromMap static method Null safety

AutocompleteResult fromMap(
  1. Map<String, dynamic> map
)

Implementation

static AutocompleteResult fromMap(Map<String, dynamic> map) {
  ELocation? _elocation;
  if (map.containsKey("eLocation")) {
    _elocation = ELocation.fromMap(map["eLocation"]);
  }
  SuggestedSearch? _suggestedSearch;
  if (map.containsKey("suggestedSearch")) {
    _suggestedSearch = SuggestedSearch.fromMap(map["suggestedSearch"]);
  }
  return AutocompleteResult(
      eLocation: _elocation, suggestedSearch: _suggestedSearch);
}