项目
在 GitHub 查看
thosakwe/flutter_music_player
关于
A music player component for Flutter (i.e. Spotify, Apple Music, etc.) [AGPL/example/no longer maintaining]
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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

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,
),
),
);
}
}
探索相关项目
加载中…