Hybrid Media Player in Flutter

Flutter Packages:

To extend the capability of Flutter to do more things, we required to install the app-specific packages. For this app, we required the following packages:

  1. video_player
  2. fluttertoast
  3. flutter_statusbarcolor
Dependencies/packages in pubspec.yaml file

Project Structure:

Hybrid Media Player — Home page

The Audio/Music Player:

The Audio/ folder contains all of the code for creating the Audio/Music player. Now, let's take a look at what each file does.

Music Player - Home
Playing song from the assets
Notification of the currently playing song

Playing Songs on the internet:

There is one button in the top right corner in the app bar on the audio home. This button will play the songs on the internet. The Audio/playOnline.dart file contains the code for this feature.

Playing music on the internet

The Video Player:

The second option on the home screen gives a way to open the Video Player. This Video Player will play the videos from the local(assets) files or on the internet.

List of available videos
Play the video
Playing video on the internet

App Demo Video:

Go through this video see how the app works.

Application Source Code:


Tech blogger, researcher and integrator