keywordsSearch static method

Future<void> keywordsSearch({
  1. required String? keyWord,
  2. String? cityCode,
  3. int? page = 1,
  4. int? limit = 10,
  5. PoiResultBack? back,
})

关键词POI

Implementation

static Future<void> keywordsSearch({
  required String? keyWord,
  String? cityCode,
  int? page = 1,
  int? limit = 10,
  PoiResultBack? back,
}) async {
  final String? jsonStr = await _channel.invokeMethod('keywordsSearch', {
    "keyWord": keyWord,
    "cityCode": cityCode,
    "page": page,
    "limit": limit,
  });
  if (jsonStr != null) {
    Map? map = json.decode(jsonStr);
    if (map != null && back != null) {
      back(map['code'] as int, PoiResult.fromJson(map["data"]));
    }
  }
}