1 huohei 2023-06-03 00:18:33 +08:00 via iPhone 报错信息呢 |
2 55z55 OP @huohei 第一种写法: onTap: () { AudioPlayer audioPlayer = AudioPlayer(); //点击时播放背景音乐 audioPlayer.play('click.mp3'); }, click.mp3 处报错:The argument type 'String' can't be assigned to the parameter type 'Source'. 第二种写法: onTap: () { AudioCache audioCache = AudioCache(); //点击时播放背景音乐 audioCache.play('click.mp3'); }, .play 处报错:The method 'play' isn't defined for the type 'AudioCache'. Try correcting the name to the name of an existing method, or defining a method named 'play'. |
3 huohei 2023-06-03 01:30:56 +08:00 via iPhone |
4 55z55 OP |