Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thosakwe/flutter_music_player
A music player component for Flutter (i.e. Spotify, Apple Music, etc.) [AGPL/example/no longer maintaining]
https://github.com/thosakwe/flutter_music_player
dart flutter
Last synced: 10 days ago
JSON representation
A music player component for Flutter (i.e. Spotify, Apple Music, etc.) [AGPL/example/no longer maintaining]
- Host: GitHub
- URL: https://github.com/thosakwe/flutter_music_player
- Owner: thosakwe
- License: agpl-3.0
- Created: 2018-03-17T17:27:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-05T13:52:12.000Z (almost 5 years ago)
- Last Synced: 2024-10-22T09:51:01.161Z (19 days ago)
- Topics: dart, flutter
- Language: Dart
- Homepage:
- Size: 77 MB
- Stars: 226
- Watchers: 11
- Forks: 47
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](screenshots/fullscreen.png)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:```yaml
dependencies:
flutter: sdk
music_player:
git: https://github.com/thosakwe/flutter_music_player.git
```## Usage
```dart
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,
),
),
);
}
}