TextSearchRequest.fromMap constructor
TextSearchRequest.fromMap(
- Map map
Implementation
factory TextSearchRequest.fromMap(Map<dynamic, dynamic> map) {
return TextSearchRequest(
language: map['language'],
query: map['query'] ?? (throw ('A query must be provided.')),
location:
map['location'] != null ? Coordinate.fromMap(map['location']) : null,
radius: map['radius'],
pageSize: map['pageSize'],
poiType: map['poiType'] != null
? LocationType.fromString(map['poiType'])
: null,
hwPoiType: map['hwPoiType'] != null
? HwLocationType.fromString(map['hwPoiType'])
: null,
pageIndex: map['pageIndex'],
countryCode: map['countryCode'],
children: map['children'],
countries: map['countries'] != null
? List<String>.from(map['countries']?.map((dynamic x) => x?.toString))
: null,
);
}