flutter_audio_player icon indicating copy to clipboard operation
flutter_audio_player copied to clipboard

return data from the network

Open AlexEAA opened this issue 5 years ago • 0 comments

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"),
              )
          )
      )
    ];
  }

AlexEAA avatar Feb 26 '21 12:02 AlexEAA