Task -1:
<> Creating a flutter app, using assets audio also adding features play, pause and stop in the app.
So, let's start with how I create the audio player app
<> First creating a folder inside my audioplayer_app called assets where I put my audio file which is soft.mp3
<> For creating an audioplayer app in flutter there is a package available in pub.dev website from were using the plugin audioplayers available to play the audio.
<> Adding the dependencies in the pubspec.yaml file
<> importing the package in the main.dart file
<> adding the path of the song in the assets folder in the pubspec.yaml file after the #assets
<> in the audio player app I created three buttons play, pause and stop and a slider to show the duration of the song and a FloatingActionButton with icon and label ganna.com.I created this FloatingActionButton because if someone wants to play the song from the Internet and have some choices while listening to the song so when someone clicks on the floatingactionbutton they redirect to the webpage of ganna.com because I added the URL of the page and for the URL I used the package url_launcher from pub.dev .Getting the help of the documentation .using AudioCache( ),AdvancedPlayer( ) . passing the two arguments text and onPressed in _btn( txt,onPressed) .using the play( ), pause( ) and stop( ) , creating the _LaunchURL( ) so that this method is assigned to the onpresseed in the FloatingActionButton.extended( )
Thank you!!