https://github.com/yichuancq/flutter_himalaya.git
A new Flutter application.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
>播放页面
> 专辑列表
更多细节请查看GitHub
///播放控制按钮组
Widget _playerControlBar() {
return SizedBox(
height: 40,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
IconButton(
icon: Icon(Icons.reorder, color: Colors.white),
onPressed: () {
showModalSheet();
},
),
//返回前一首
IconButton(
icon: Icon(Icons.skip_previous, color: Colors.white),
onPressed: () {
_prev();
},
),
// 播放,暂停
IconButton(
//判断是否播放中,返回不同按钮状态
icon: playFlag == true
? Icon(Icons.pause, color: Colors.red) //暂停
: Icon(Icons.play_arrow, color: Colors.white),
// 播放
onPressed: () {
setState(() {
controlPlay();
});
},
),
//一下首
IconButton(
icon: Icon(Icons.skip_next, color: Colors.white),
onPressed: () {
_next();
},
),
IconButton(
icon: Icon(Icons.timer, color: Colors.white),
onPressed: () {
// _showModalSheet();
},
),
],
),
);
}