Premium Only Content

How to play audio in flutter? | Play an Audio from Local Asset | Android Studio
✅✅ If you found this video useful then like this video
🖍Kindly Write your feedback in comments
=============================================
add audio players dependency in pubspec .yaml .
audioplayers: ^0.20.1
https://pub.dev/packages/audioplayers...
Create a folder named asset and put an audio file in it.
Open the pubspec.yaml file and add the folder location where the audio is.
assets:
- assets/
open the main.dart file and import the audioplayers package.
import 'package:audioplayers/audioplayers.dart';
Add a button and include the code to play the audio in the onpress event.
final player = AudioCache();
player.play('audiofile.wav');
Run and Click the button.
)) notice if you are using audioplayers: 1.0.1
use:
final player=AudioPlayer();
player.setSource(AssetSource('theme_01.mp3'));
-
LIVE
Joker Effect
1 hour agoYou Will Never Believe How Cooked Kick Streamers Are. Come Debate Me If You Think I am Wrong!
397 watching -
LIVE
FrizzleMcDizzle
3 hours agoSilent Hill f - NEW HORROR GAME - COME CHAT
72 watching -
LIVE
Mally_Mouse
6 days ago🌶️ 🥵Spicy BITE Saturday!! 🥵🌶️- Let's Play: Unrailed 2!
121 watching -
23:53
MYLUNCHBREAK CHANNEL PAGE
23 hours agoIstanbul SHOULD NOT Exist - Pt 3
37.2K17 -
LIVE
RaikenNight
1 hour agoMEGABONK
25 watching -
LIVE
Misfit Electronic Gaming
5 hours ago"LIVE" "Clover Pit" Is out Now "HELLDIVERS 2" Managed Democracy Maybe REPO +More
11 watching -
LIVE
ManoloCalifas
3 hours ago🔴 LIVE - DARK SOULS III SEAMLESS CO-OP KINDA VIBES
13 watching -
LIVE
StuffCentral
4 hours agoBad Company Presents: Ball in the fall, Two 1v1 cash prize tournaments back to back!
53 watching -
LIVE
Midnight In The Mountains™
3 hours agoGaming w/ Gaming w/ PER·SE·VER·ANCE | Family Event OVER EARLY! | Midnights Split Stream!
17 watching -
LIVE
BigTallRedneck
7 hours agoROCKET LEAGUE - STUFF CENTRAL'S 1V1 TOURNEY
106 watching