Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return data from the network #1

Open
AlexEAA opened this issue Feb 26, 2021 · 0 comments
Open

return data from the network #1

AlexEAA opened this issue Feb 26, 2021 · 0 comments

Comments

@AlexEAA
Copy link

AlexEAA commented Feb 26, 2021

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"),
              )
          )
      )
    ];
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant