先commit,明天测下控制中心
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:keep="@drawable/ic_previous,@drawable/ic_next,@drawable/ic_play,@drawable/ic_pause" />
|
||||
tools:keep="@drawable/*" />
|
||||
@@ -20,20 +20,20 @@ class PlaybackStateManager {
|
||||
// lib/audio/playback_state_manager.dart
|
||||
audio_service.PlaybackState get playbackState {
|
||||
final playControl = audio_service.MediaControl(
|
||||
androidIcon: _playing ? '@drawable/ic_pause' : '@drawable/ic_play',
|
||||
androidIcon: _playing ? 'ic_pause' : 'ic_play',
|
||||
label: _playing ? '暂停' : '播放',
|
||||
action: audio_service.MediaAction.playPause,
|
||||
);
|
||||
|
||||
final controls = [
|
||||
audio_service.MediaControl(
|
||||
androidIcon: '@drawable/ic_previous', // 上一首
|
||||
androidIcon: 'ic_previous', // 上一首
|
||||
label: '上一曲',
|
||||
action: audio_service.MediaAction.skipToPrevious,
|
||||
),
|
||||
playControl,
|
||||
audio_service.MediaControl(
|
||||
androidIcon: '@drawable/ic_next', // 下一首
|
||||
androidIcon: 'ic_next', // 下一首
|
||||
label: '下一曲',
|
||||
action: audio_service.MediaAction.skipToNext,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user