searchKeyword method

  1. @override
Future<List<PoiResultItem>> searchKeyword({
  1. required String keyword,
  2. String city = '',
  3. String types = '',
  4. int pageSize = 20,
  5. int pageNum = 1,
})
override

Implementation

@override
Future<List<PoiResultItem>> searchKeyword({required String keyword, String city = '', String types = '', int pageSize = 20, int pageNum = 1}) async {
  final dataList = await methodChannel.invokeMethod('searchKeyword', {
    'keyword': keyword,
    'city': city,
    'types': types,
    'pageSize': pageSize,
    'pageNum': pageNum,
  });
  return dataList.map((e) => PoiResultItem.fromJson(e)).toList().cast<PoiResultItem>();
}