A music player component for Flutter

Overview

This is an example

I currently have no plans of putting this on Pub. Originally, I did, but I lost interest. However, I think this is a good example, so I'm keeping it up.

That being said, the license is AGPL. Please know what that means, and don't be a pirate. I will find you.

music_player

Fullscreen screenshot

A music player component for Flutter (i.e. Spotify, Apple Music, etc.).

This is ready-to-go for embedding in a music-playing application. It supports seeking, as well as having callbacks for skipping, shuffling, and looping.

Installation

This package is not yet on Pub (I haven't figured out how to test it), so in the meantime:

dependencies:
  flutter: sdk
  music_player:
    git: https://github.com/thosakwe/flutter_music_player.git

Usage

class MyWidget extends StatelessWidget {
    @override
    build(BuildContext context) {
        return new MusicPlayer(
            onError: (e) {
                Scaffold.of(context).showSnackBar(
                    new SnackBar(
                        content: new Text(e),
                    ),
                );
            },
            onSkipPrevious: () {},
            onSkipNext: () {},
            onCompleted: () {},
            onLoopChanged: (loop) {
                setState(() => this.loopKind = loop);
            },
            onShuffleChanged: (loop) {
                setState(() => this.shuffle = loop);
            },
            key: musicPlayerKey,
            textColor: Colors.white,
            loop: loopKind,
            shuffle: shuffle,
            url: mp3Url,
            title: const Text(
                'BBC',
                textAlign: TextAlign.center,
                textScaleFactor: 1.5,
                style: const TextStyle(
                    fontWeight: FontWeight.bold,
                    color: Colors.white,
                ),
            ),
            subtitle: const Text(
                'JAY Z - Holy Grail',
                textAlign: TextAlign.center,
                style: const TextStyle(
                    color: Colors.white,
                ),
            ),
        );
    }
}
You might also like...

Flutter video player widget based on video_player

Neeko Simple video player widget based on video_player. Neek supports more actions such as timeline control, toggle fullscreen and so on. Note: This p

Oct 20, 2022

Alexander-Playlist - A media player and playlist based on Flutter

Alexander-Playlist - A media player and playlist based on Flutter

Alexander's App - silexcorp A new Flutter application. http://alexandermateo.com/ Config Firebase Configure firebase to your project. Screenshot | | |

Nov 8, 2021

Just another tape player has been written in Flutter for iOS and Android

Just another tape player has been written in Flutter for iOS and Android

Just another tape player has been written in Flutter for iOS and Android. The application is able to find tapes and theirs images using https://zxInfo.dk public API and upload them to ZX-Spectrum compatible computers by the audio output of the smartphone. Now it supports TAP and TZX tape images only.

Dec 28, 2022

Video player-2.2.10 - A Flutter plugin for iOS, Android and Web for playing back video on a Widget surface

Video player-2.2.10 - A Flutter plugin for iOS, Android and Web for playing back video on a Widget surface

Video Player plugin for Flutter A Flutter plugin for iOS, Android and Web for pl

Sep 29, 2022

A radio player mobile application which streams audio from Radio Sai Global Harmony.

A radio player mobile application which streams audio from Radio Sai Global Harmony.

Sai Voice A radio player which streams audio from Radio Sai Global Harmony. *Special Thanks to Aman Achutan for the logo Om Sri Sai Ram 🙏 Sai Voice i

Nov 26, 2022

Music App made with flutter

Music App made with flutter

Chillify A Flutter music app made with Provider and BLoC pattern. (Works on Android for now) Recommended Flutter version: 1.7.8+hotfix.4 UI heavily in

Jan 4, 2023

:lock: this is flutter mobile application music using glass morphism concept

:lock: this is flutter mobile application music using glass morphism concept

Flutter Glass Morphism 💝 Description: This is source flutter using glass morphism concept How I can run it? 🚀 Clone this repo 🚀 Run below code in t

Jan 19, 2022

A Flutter package for working with piano keys and sheet music

A Flutter package for working with piano keys and sheet music

Piano A Flutter package that provides: logic for working with musical notes, clefs and octaves; a widget that can render notes on a clef; an interacti

Jan 5, 2023
Comments
  • disable features

    disable features

    It would be nice if we could disable features.

    For example, I would like to hide the track bar. Some more customization would be ideal too, i.e reduce icon sizes.

    Thanks!

    opened by abacaj 2
  • pls  update

    pls update

    The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.

    Because hitm depends on music_player from git which requires SDK version <2.0.0, version solving failed.

    this is my meet problem . pls update it . thx

    opened by YoungCC2 1
  • background image

    background image

    Hey!

    Cool plugin, trying to make use of it and trying to figure out how to change the background image as shown in your screenshot :)

    Any help would be appreciated

    opened by abacaj 1
Owner
Tobe Osakwe
Compiler and OSDev enthusiast. Restarting my blog. Always down to chat about coding 👍🏿
Tobe Osakwe
🎵 Elegant music app to play local music & YouTube music. Distributes music into albums & artists. Has playlists & lyrics.

Harmonoid Elegant music app to play local music & YouTube music. Download Now ?? Feel free to report bugs & issues. We'll be there to fix. Loving the

Harmonoid 2.5k Dec 30, 2022
🎵 Elegant music app to play local music & YouTube music. Distributes music into albums & artists. Has playlists & lyrics. Windows + Linux + Android.

Harmonoid Elegant music app to play local music & YouTube music. Download Now ?? Windows, Linux & Android. Feel free to report bugs & issues. Loving t

Harmonoid 1.9k Aug 10, 2022
A music player component for Flutter

This is an example I currently have no plans of putting this on Pub. Originally, I did, but I lost interest. However, I think this is a good example,

Tobe Osakwe 215 Dec 12, 2022
YoYo Video Player is a HLS(.m3u8) video player for flutter.

YoYo Video Player YoYo Video Player is a HLS(.m3u8) video player for flutter. The video_player is a video player that allows you to select HLS video s

Ko Htut 89 Dec 23, 2022
Munem Sarker 1 Jan 25, 2022
Flutter UI Challenge: Music Player

Flutter UI Challenge: Music Player Resource Design: https://dribbble.com Output

jaydip patel 4 Dec 23, 2022
Playify is a Flutter plugin for play/pause/seek songs, fetching music metadata, and browsing music library.

Playify Playify is a Flutter plugin for play/pause/seek songs, fetching music metadata, and browsing music library. Playify was built using iOS's Medi

Ibrahim Berat Kaya 32 Dec 14, 2022
A powerful Flutter chat UI component library and business logic for Tencent Cloud Chat, creating seamless in-app chat modules for delightful user experiences.

<style> .button-9 { appearance: button; backface-visibility: hidden; background-color: #1d52d9; border-radius: 6px; border-width: 0; box-shadow: rgba(

Tencent Cloud 63 Aug 11, 2023
Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Better Player Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run. Introduction This plugi

Jakub 733 Jan 3, 2023
Flutter Radio Player, A Plugin to handle streaming audio without a hassle

Flutter radio plugin handles a single streaming media preciously. This plugin was developed with maximum usage in mind. Flutter Radio player enables S

Sithira Munasinghe 104 Dec 27, 2022