i have a methode that loaded me the data from server on Json format data , also im using audioPlayer library to play music got it from server , when i want to pass the path inside audioPlayer.play like that :
String Url = _loadedAudio[index]['file'];
await audioPlayer.play(Url);
it display to me this开发者_开发问答 error :
Too many positional arguments: 0 expected, but 1 found.
how can i solve it
You can try these two options:
await player.setSourceUrl(Url);
await player.resume();
Or
await player.play(UrlSource(Url));
精彩评论