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

audioplayers package has been upgraded and the steps shown dont work anymore. not sure how to go about the project #51

Open
ayushipaikane opened this issue Apr 9, 2023 · 6 comments

Comments

@ayushipaikane
Copy link

No description provided.

@paliwalaman7
Copy link

I am also facing same thing

@sarmad-hzn
Copy link

i just pasted the folder and added that in pubspec file (idk i should do it or not)
and then this below code worked after reading the documentation

final player = AudioPlayer();
player.play(AssetSource('note1.wav'));

@alizeeshan7447
Copy link

It works... I also apply this... It's working...

@PiusCharles
Copy link

the player.play bring error on my code

@TriptiMirani
Copy link

i just pasted the folder and added that in pubspec file (idk i should do it or not) and then this below code worked after reading the documentation

final player = AudioPlayer();
player.play(AssetSource('note1.wav'));

(i just pasted the folder and added that in pubspec file)==> which folder?

@benkim3858
Copy link

final AudioPlayer player = AudioPlayer();

Future<void> playSound(String soundName) async {
await player.play(AssetSource(soundName));
}

After adding this code to Xylophone App Class

TextButton(
onPressed: () {
playSound('note1.wav');
},
child: Text('C'),
),

Use it like this on the button.

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

7 participants