searchKeyword method

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

Implementation

@override
Future<List<SearchResultItem>> 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) => SearchResultItem.fromJson(e)).toList().cast<SearchResultItem>();
}