inputTips static method

Future<void> inputTips({
  1. required String newText,
  2. String? city,
  3. bool cityLimit = false,
  4. InputTipResultBack? back,
})

输入提示

Implementation

static Future<void> inputTips({
  required String newText,
  String? city,
  bool cityLimit = false,
  InputTipResultBack? back,
}) async {
  final String? jsonStr = await _channel.invokeMethod('inputTips', {
    "newText": newText,
    "city": city,
    "cityLimit": cityLimit,
  });
  if (jsonStr != null) {
    Map? map = json.decode(jsonStr);
    if (map != null && back != null) {
      List<InputTipResult> tips = [];
      map["data"].forEach((element) {
        tips.add(InputTipResult.fromJson(element));
      });
      back(map['code'] as int, tips);
    }
  }
}