playAudio method

  1. @override
Future<void> playAudio(
  1. String number,
  2. int count
)
override

Implementation

@override
Future<void> playAudio(String number, int count) async {
  try {
    await methodChannel.invokeMethod(
        'playAudio', {"number": number, "count": count}); // 调用原生方法
  } on PlatformException catch (e) {
    log("调用失败: '${e.message}'.");
  }
}