flutter_audio_player
flutter_audio_player copied to clipboard
return data from the network
I don’t understand how I can dynamically return data from the network
class AudioPlayerModelFactory {
static List<AudioPlayerModel> getAudioPlayerModels() {
return [
AudioPlayerModel(
id: "1",
isPlaying: false,
audio: Audio(
"assets/audios/country.mp3",
metas: Metas(
id: "1",
title: "My Country Song",
artist: "Joe Doe",
album: "Country Album",
image: MetasImage.asset("assets/images/country.jpg"),
)
)
),
AudioPlayerModel(
id: "2",
isPlaying: false,
audio: Audio(
"assets/audios/country_2.mp3",
metas: Metas(
id: "2",
title: "My Other Country Song",
artist: "Joe Doe",
album: "Country Album",
image: MetasImage.asset("assets/images/country.jpg"),
)
)
)
];
}