customSound method

Future<void> customSound(
  1. String soundName
)
override

播放自定义的音效

Implementation

Future<void> customSound(String soundName) async {
  // 通过 channel 调用原生播放系统音效 ,通过soundId区分不同音效
  await methodChannel.invokeMethod('playCustomSound', {'soundName': soundName});
}