该
audioplayer插件目前仅支持网络路径和文件。您可以将资产移动到临时文件夹并使用以下代码播放它:
import 'package:path_provider/path_provider.dart';
…
final file = new File('${(await getTemporaryDirectory()).path}/music.mp3');await file.writeAsBytes((await loadAsset()).buffer.asUint8List());final result = await audioPlayer.play(file.path, isLocal: true);


