screenshots + GUI details
This commit is contained in:
parent
0670fc39c8
commit
e9052aefee
15 changed files with 406 additions and 415 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -41,3 +41,4 @@ lib/generated_plugin_registrant.dart
|
|||
|
||||
|
||||
coverage/lcov.info
|
||||
assets/screenshots/src
|
26
README.md
26
README.md
|
@ -1,14 +1,28 @@
|
|||
![mucke](src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png)
|
||||
|
||||
# mucke
|
||||
![Build](https://github.com/moritz-weber/mucke/workflows/Build/badge.svg)
|
||||
|
||||
A simple Android music player with extras.
|
||||
|
||||
mucke allows you to:
|
||||
# mucke
|
||||
|
||||
<p align="center">
|
||||
<img src="src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" width="144px"/>
|
||||
<br>
|
||||
A music player that gets the best out of your local collection.
|
||||
</p>
|
||||
|
||||
<!-- A music player that treats your precious files like no one else. -->
|
||||
|
||||
## Features
|
||||
|
||||
- Like songs to hear them more often in shuffle mode.
|
||||
- Exclude songs from playing in shuffle mode.
|
||||
- Link songs together to play the back-to-back in shuffle mode.
|
||||
- Link songs together to play them back-to-back in shuffle mode.
|
||||
- Create smart playlists by filtering and sorting your library.
|
||||
- Customize your landing page for a quick start.
|
||||
|
||||
## Previews
|
||||
|
||||
<img src="assets/screenshots/like.png" width="18%" />
|
||||
<img src="assets/screenshots/exclude.png" width="18%" />
|
||||
<img src="assets/screenshots/link.png" width="18%" />
|
||||
<img src="assets/screenshots/smartlist.png" width="18%" />
|
||||
<img src="assets/screenshots/home.png" width="18%" />
|
||||
|
|
BIN
assets/screenshots/exclude.png
Normal file
BIN
assets/screenshots/exclude.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
BIN
assets/screenshots/home.png
Normal file
BIN
assets/screenshots/home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 236 KiB |
BIN
assets/screenshots/like.png
Normal file
BIN
assets/screenshots/like.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
BIN
assets/screenshots/link.png
Normal file
BIN
assets/screenshots/link.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
BIN
assets/screenshots/screenshots_mask.xcf
Normal file
BIN
assets/screenshots/screenshots_mask.xcf
Normal file
Binary file not shown.
BIN
assets/screenshots/smartlist.png
Normal file
BIN
assets/screenshots/smartlist.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 513 KiB |
|
@ -54,68 +54,70 @@ class _AlbumDetailsPageState extends State<AlbumDetailsPage> {
|
|||
discSongNums.add(songsByDisc[i].length + discSongNums[i]);
|
||||
}
|
||||
|
||||
return CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
AlbumSliverAppBar(
|
||||
album: widget.album,
|
||||
store: store,
|
||||
onTapMultiSelectMenu: () => _openMultiselectMenu(context),
|
||||
),
|
||||
for (int d = 0; d < songsByDisc.length; d++)
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final bool isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final List<bool> isSelected = store.selection.isSelected.toList();
|
||||
|
||||
return SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
if (songsByDisc.length > 1 && d > 0) Container(height: 8.0),
|
||||
if (songsByDisc.length > 1)
|
||||
ListTile(
|
||||
title: Text('Disc ${d + 1}', style: TEXT_HEADER),
|
||||
leading: const SizedBox(width: 40, child: Icon(Icons.album_rounded)),
|
||||
contentPadding: const EdgeInsets.only(left: HORIZONTAL_PADDING),
|
||||
),
|
||||
if (songsByDisc.length > 1)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: HORIZONTAL_PADDING,
|
||||
return Scrollbar(
|
||||
child: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
AlbumSliverAppBar(
|
||||
album: widget.album,
|
||||
store: store,
|
||||
onTapMultiSelectMenu: () => _openMultiselectMenu(context),
|
||||
),
|
||||
for (int d = 0; d < songsByDisc.length; d++)
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final bool isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final List<bool> isSelected = store.selection.isSelected.toList();
|
||||
|
||||
return SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
if (songsByDisc.length > 1 && d > 0) Container(height: 8.0),
|
||||
if (songsByDisc.length > 1)
|
||||
ListTile(
|
||||
title: Text('Disc ${d + 1}', style: TEXT_HEADER),
|
||||
leading: const SizedBox(width: 40, child: Icon(Icons.album_rounded)),
|
||||
contentPadding: const EdgeInsets.only(left: HORIZONTAL_PADDING),
|
||||
),
|
||||
child: Container(
|
||||
height: 1.0,
|
||||
color: Colors.white10,
|
||||
),
|
||||
),
|
||||
for (int s = 0; s < songsByDisc[d].length; s++)
|
||||
SongListTileNumbered(
|
||||
song: songsByDisc[d][s],
|
||||
isSelectEnabled: isMultiSelectEnabled,
|
||||
isSelected: isMultiSelectEnabled && isSelected[s + discSongNums[d]],
|
||||
onTap: () => audioStore.playSong(
|
||||
s + _calcOffset(d, songsByDisc),
|
||||
store.albumSongStream.value!,
|
||||
widget.album,
|
||||
),
|
||||
onTapMore: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (context) => SongBottomSheet(
|
||||
song: songsByDisc[d][s],
|
||||
enableGoToAlbum: false,
|
||||
if (songsByDisc.length > 1)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: HORIZONTAL_PADDING,
|
||||
),
|
||||
child: Container(
|
||||
height: 1.0,
|
||||
color: Colors.white10,
|
||||
),
|
||||
),
|
||||
onSelect: (bool selected) =>
|
||||
store.selection.setSelected(selected, s + discSongNums[d]),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
for (int s = 0; s < songsByDisc[d].length; s++)
|
||||
SongListTileNumbered(
|
||||
song: songsByDisc[d][s],
|
||||
isSelectEnabled: isMultiSelectEnabled,
|
||||
isSelected: isMultiSelectEnabled && isSelected[s + discSongNums[d]],
|
||||
onTap: () => audioStore.playSong(
|
||||
s + _calcOffset(d, songsByDisc),
|
||||
store.albumSongStream.value!,
|
||||
widget.album,
|
||||
),
|
||||
onTapMore: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (context) => SongBottomSheet(
|
||||
song: songsByDisc[d][s],
|
||||
enableGoToAlbum: false,
|
||||
),
|
||||
),
|
||||
onSelect: (bool selected) =>
|
||||
store.selection.setSelected(selected, s + discSongNums[d]),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -53,8 +53,8 @@ class _PlaylistPageState extends State<PlaylistPage> {
|
|||
final MusicDataStore musicDataStore = GetIt.I<MusicDataStore>();
|
||||
final NavigationStore navStore = GetIt.I<NavigationStore>();
|
||||
|
||||
return SafeArea(
|
||||
child: Observer(
|
||||
return Scaffold(
|
||||
body: Observer(
|
||||
builder: (context) {
|
||||
final songs = store.playlistSongStream.value ?? [];
|
||||
final playlist = store.playlistStream.value ?? widget.playlist;
|
||||
|
@ -78,178 +78,176 @@ class _PlaylistPageState extends State<PlaylistPage> {
|
|||
default:
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
body: Scrollbar(
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
CoverSliverAppBar(
|
||||
actions: [
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
return Scrollbar(
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
CoverSliverAppBar(
|
||||
actions: [
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
|
||||
if (!isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.edit_rounded),
|
||||
onPressed: () => navStore.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) => PlaylistFormPage(
|
||||
playlist: playlist,
|
||||
),
|
||||
if (!isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.edit_rounded),
|
||||
onPressed: () => navStore.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) => PlaylistFormPage(
|
||||
playlist: playlist,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.more_vert_rounded),
|
||||
onPressed: () => _openMultiselectMenu(context, playlist),
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final isAllSelected = store.selection.isAllSelected;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: isAllSelected
|
||||
? const Icon(Icons.deselect_rounded)
|
||||
: const Icon(Icons.select_all_rounded),
|
||||
onPressed: () {
|
||||
if (isAllSelected)
|
||||
store.selection.deselectAll();
|
||||
else
|
||||
store.selection.selectAll();
|
||||
},
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
return IconButton(
|
||||
key: const ValueKey('PLAYLIST_MULTISELECT'),
|
||||
icon: isMultiSelectEnabled
|
||||
? const Icon(Icons.close_rounded)
|
||||
: const Icon(Icons.checklist_rtl_rounded),
|
||||
onPressed: () => store.selection.toggleMultiSelect(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
title: playlist.name,
|
||||
subtitle2: '${songs.length} songs • ${utils.msToTimeString(totalDuration)}',
|
||||
background: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: playlist.gradient,
|
||||
),
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
cover: PlaylistCover(
|
||||
size: 120,
|
||||
icon: playlist.icon,
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.more_vert_rounded),
|
||||
onPressed: () => _openMultiselectMenu(context, playlist),
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final isAllSelected = store.selection.isAllSelected;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: isAllSelected
|
||||
? const Icon(Icons.deselect_rounded)
|
||||
: const Icon(Icons.select_all_rounded),
|
||||
onPressed: () {
|
||||
if (isAllSelected)
|
||||
store.selection.deselectAll();
|
||||
else
|
||||
store.selection.selectAll();
|
||||
},
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
return IconButton(
|
||||
key: const ValueKey('PLAYLIST_MULTISELECT'),
|
||||
icon: isMultiSelectEnabled
|
||||
? const Icon(Icons.close_rounded)
|
||||
: const Icon(Icons.checklist_rtl_rounded),
|
||||
onPressed: () => store.selection.toggleMultiSelect(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
title: playlist.name,
|
||||
subtitle2: '${songs.length} songs • ${utils.msToTimeString(totalDuration)}',
|
||||
background: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: playlist.gradient,
|
||||
),
|
||||
button: ElevatedButton(
|
||||
onPressed: () => audioStore.playPlaylist(playlist),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(child: Center(child: Text('Play'))),
|
||||
Icon(playIcon),
|
||||
],
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
primary: Colors.white10,
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
),
|
||||
cover: PlaylistCover(
|
||||
size: 120,
|
||||
icon: playlist.icon,
|
||||
gradient: playlist.gradient,
|
||||
),
|
||||
button: ElevatedButton(
|
||||
onPressed: () => audioStore.playPlaylist(playlist),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(child: Center(child: Text('Play'))),
|
||||
Icon(playIcon),
|
||||
],
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
primary: Colors.white10,
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final bool isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final List<bool> isSelected = store.selection.isSelected.toList();
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final bool isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final List<bool> isSelected = store.selection.isSelected.toList();
|
||||
|
||||
return ReorderableSliverList(
|
||||
enabled: !isMultiSelectEnabled,
|
||||
delegate: ReorderableSliverChildBuilderDelegate(
|
||||
(context, int index) {
|
||||
final Song song = songs[index];
|
||||
return Dismissible(
|
||||
key: ValueKey(song.path),
|
||||
child: SongListTile(
|
||||
song: song,
|
||||
showAlbum: true,
|
||||
subtitle: Subtitle.artistAlbum,
|
||||
onTap: () => audioStore.playSong(index, songs, playlist),
|
||||
onTapMore: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
// TODO: include RemoveFromPlaylist here!
|
||||
builder: (context) => SongBottomSheet(
|
||||
song: song,
|
||||
),
|
||||
),
|
||||
isSelectEnabled: isMultiSelectEnabled,
|
||||
isSelected: isMultiSelectEnabled && isSelected[index],
|
||||
onSelect: (bool selected) =>
|
||||
store.selection.setSelected(selected, index),
|
||||
),
|
||||
onDismissed: (direction) {
|
||||
musicDataStore.removePlaylistEntry(playlist.id, index);
|
||||
},
|
||||
background: Container(
|
||||
width: double.infinity,
|
||||
color: RED,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: HORIZONTAL_PADDING,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const [
|
||||
Icon(
|
||||
Icons.playlist_remove_rounded,
|
||||
color: Colors.white,
|
||||
),
|
||||
Icon(
|
||||
Icons.playlist_remove_rounded,
|
||||
color: Colors.white,
|
||||
)
|
||||
],
|
||||
),
|
||||
return ReorderableSliverList(
|
||||
enabled: !isMultiSelectEnabled,
|
||||
delegate: ReorderableSliverChildBuilderDelegate(
|
||||
(context, int index) {
|
||||
final Song song = songs[index];
|
||||
return Dismissible(
|
||||
key: ValueKey(song.path),
|
||||
child: SongListTile(
|
||||
song: song,
|
||||
showAlbum: true,
|
||||
subtitle: Subtitle.artistAlbum,
|
||||
onTap: () => audioStore.playSong(index, songs, playlist),
|
||||
onTapMore: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
// TODO: include RemoveFromPlaylist here!
|
||||
builder: (context) => SongBottomSheet(
|
||||
song: song,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
childCount: songs.length,
|
||||
),
|
||||
onReorder: (oldIndex, newIndex) =>
|
||||
musicDataStore.movePlaylistEntry(playlist.id, oldIndex, newIndex),
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
isSelectEnabled: isMultiSelectEnabled,
|
||||
isSelected: isMultiSelectEnabled && isSelected[index],
|
||||
onSelect: (bool selected) =>
|
||||
store.selection.setSelected(selected, index),
|
||||
),
|
||||
onDismissed: (direction) {
|
||||
musicDataStore.removePlaylistEntry(playlist.id, index);
|
||||
},
|
||||
background: Container(
|
||||
width: double.infinity,
|
||||
color: RED,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: HORIZONTAL_PADDING,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const [
|
||||
Icon(
|
||||
Icons.playlist_remove_rounded,
|
||||
color: Colors.white,
|
||||
),
|
||||
Icon(
|
||||
Icons.playlist_remove_rounded,
|
||||
color: Colors.white,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
childCount: songs.length,
|
||||
),
|
||||
onReorder: (oldIndex, newIndex) =>
|
||||
musicDataStore.movePlaylistEntry(playlist.id, oldIndex, newIndex),
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
@ -49,8 +49,8 @@ class _SmartListPageState extends State<SmartListPage> {
|
|||
final AudioStore audioStore = GetIt.I<AudioStore>();
|
||||
final NavigationStore navStore = GetIt.I<NavigationStore>();
|
||||
|
||||
return SafeArea(
|
||||
child: Observer(
|
||||
return Scaffold(
|
||||
body: Observer(
|
||||
builder: (context) {
|
||||
final songs = store.smartListSongStream.value ?? [];
|
||||
final smartList = store.smartListStream.value ?? widget.smartList;
|
||||
|
@ -74,146 +74,144 @@ class _SmartListPageState extends State<SmartListPage> {
|
|||
default:
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
body: Scrollbar(
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
CoverSliverAppBar(
|
||||
actions: [
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
return Scrollbar(
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
CoverSliverAppBar(
|
||||
actions: [
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
|
||||
if (!isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.edit_rounded),
|
||||
onPressed: () => navStore.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) => SmartListFormPage(
|
||||
smartList: smartList,
|
||||
),
|
||||
if (!isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.edit_rounded),
|
||||
onPressed: () => navStore.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) => SmartListFormPage(
|
||||
smartList: smartList,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.more_vert_rounded),
|
||||
onPressed: () => _openMultiselectMenu(context),
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final isAllSelected = store.selection.isAllSelected;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: isAllSelected
|
||||
? const Icon(Icons.deselect_rounded)
|
||||
: const Icon(Icons.select_all_rounded),
|
||||
onPressed: () {
|
||||
if (isAllSelected)
|
||||
store.selection.deselectAll();
|
||||
else
|
||||
store.selection.selectAll();
|
||||
},
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
return IconButton(
|
||||
key: const ValueKey('SMARTLIST_MULTISELECT'),
|
||||
icon: isMultiSelectEnabled
|
||||
? const Icon(Icons.close_rounded)
|
||||
: const Icon(Icons.checklist_rtl_rounded),
|
||||
onPressed: () => store.selection.toggleMultiSelect(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
title: smartList.name,
|
||||
subtitle2: '${songs.length} songs • ${utils.msToTimeString(totalDuration)}',
|
||||
background: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: smartList.gradient,
|
||||
),
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
cover: PlaylistCover(
|
||||
size: 120,
|
||||
icon: smartList.icon,
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: const Icon(Icons.more_vert_rounded),
|
||||
onPressed: () => _openMultiselectMenu(context),
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final isAllSelected = store.selection.isAllSelected;
|
||||
|
||||
if (isMultiSelectEnabled)
|
||||
return IconButton(
|
||||
key: GlobalKey(),
|
||||
icon: isAllSelected
|
||||
? const Icon(Icons.deselect_rounded)
|
||||
: const Icon(Icons.select_all_rounded),
|
||||
onPressed: () {
|
||||
if (isAllSelected)
|
||||
store.selection.deselectAll();
|
||||
else
|
||||
store.selection.selectAll();
|
||||
},
|
||||
);
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
return IconButton(
|
||||
key: const ValueKey('SMARTLIST_MULTISELECT'),
|
||||
icon: isMultiSelectEnabled
|
||||
? const Icon(Icons.close_rounded)
|
||||
: const Icon(Icons.checklist_rtl_rounded),
|
||||
onPressed: () => store.selection.toggleMultiSelect(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
title: smartList.name,
|
||||
subtitle2: '${songs.length} songs • ${utils.msToTimeString(totalDuration)}',
|
||||
background: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: smartList.gradient,
|
||||
),
|
||||
button: ElevatedButton(
|
||||
onPressed: () => audioStore.playSmartList(smartList),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(child: Center(child: Text('Play'))),
|
||||
Icon(playIcon),
|
||||
],
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
primary: Colors.white10,
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
),
|
||||
cover: PlaylistCover(
|
||||
size: 120,
|
||||
icon: smartList.icon,
|
||||
gradient: smartList.gradient,
|
||||
),
|
||||
button: ElevatedButton(
|
||||
onPressed: () => audioStore.playSmartList(smartList),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(child: Center(child: Text('Play'))),
|
||||
Icon(playIcon),
|
||||
],
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
backgroundColor: Colors.white10,
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final bool isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final List<bool> isSelected = store.selection.isSelected.toList();
|
||||
),
|
||||
Observer(
|
||||
builder: (context) {
|
||||
final bool isMultiSelectEnabled = store.selection.isMultiSelectEnabled;
|
||||
final List<bool> isSelected = store.selection.isSelected.toList();
|
||||
|
||||
return SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final Song song = songs[index];
|
||||
return SongListTile(
|
||||
song: song,
|
||||
showAlbum: true,
|
||||
subtitle: Subtitle.artistAlbum,
|
||||
isSelectEnabled: isMultiSelectEnabled,
|
||||
isSelected: isMultiSelectEnabled && isSelected[index],
|
||||
onTap: () => audioStore.playSong(index, songs, smartList),
|
||||
onTapMore: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (context) => SongBottomSheet(
|
||||
song: song,
|
||||
),
|
||||
return SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final Song song = songs[index];
|
||||
return SongListTile(
|
||||
song: song,
|
||||
showAlbum: true,
|
||||
subtitle: Subtitle.artistAlbum,
|
||||
isSelectEnabled: isMultiSelectEnabled,
|
||||
isSelected: isMultiSelectEnabled && isSelected[index],
|
||||
onTap: () => audioStore.playSong(index, songs, smartList),
|
||||
onTapMore: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (context) => SongBottomSheet(
|
||||
song: song,
|
||||
),
|
||||
onSelect: (bool selected) =>
|
||||
store.selection.setSelected(selected, index),
|
||||
);
|
||||
},
|
||||
childCount: songs.length,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
onSelect: (bool selected) =>
|
||||
store.selection.setSelected(selected, index),
|
||||
);
|
||||
},
|
||||
childCount: songs.length,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
@ -127,6 +127,12 @@ ThemeData theme() => ThemeData(
|
|||
return DARK4;
|
||||
}),
|
||||
),
|
||||
scrollbarTheme: ScrollbarThemeData(
|
||||
thickness: MaterialStateProperty.all(4.0),
|
||||
radius: const Radius.circular(2.0),
|
||||
thumbColor: MaterialStateProperty.all(Colors.white12),
|
||||
interactive: true,
|
||||
),
|
||||
);
|
||||
|
||||
const TextStyle TEXT_HEADER = TextStyle(
|
||||
|
|
|
@ -249,7 +249,7 @@ class Header extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0),
|
||||
boxShadow: const [
|
||||
BoxShadow(color: LIGHT1, blurRadius: 4, offset: Offset(0, 1), spreadRadius: -3.0),
|
||||
// BoxShadow(color: LIGHT1, blurRadius: 4, offset: Offset(0, 1), spreadRadius: -3.0),
|
||||
BoxShadow(color: Colors.black54, blurRadius: 8, offset: Offset(0, 2)),
|
||||
],
|
||||
image: DecorationImage(
|
||||
|
|
|
@ -345,13 +345,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
google_fonts:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: google_fonts
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.3"
|
||||
graphs:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -9,39 +9,39 @@ environment:
|
|||
flutter: ">=1.20.0"
|
||||
|
||||
dependencies:
|
||||
audio_service: ^0.18.0
|
||||
audio_session: ^0.1.5
|
||||
audiotagger: ^2.2.1
|
||||
collection: ^1.15.0
|
||||
drift: ^1.0.0
|
||||
equatable: ^2.0.3
|
||||
file_picker: ^4.3.0
|
||||
fimber: ^0.6.1
|
||||
audio_service: ^0.18.0 # MIT
|
||||
audio_session: ^0.1.5 # MIT
|
||||
audiotagger: ^2.2.1 # MIT
|
||||
collection: ^1.15.0 # BSD 3
|
||||
drift: ^1.0.0 # MIT
|
||||
equatable: ^2.0.3 # MIT
|
||||
file_picker: ^4.3.0 # MIT
|
||||
fimber: ^0.6.1 # Apache 2.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_fimber: ^0.6.3
|
||||
flutter_fimber_filelogger: ^2.0.0
|
||||
flutter_mobx: ^2.0.0
|
||||
flutter_speed_dial: ^5.0.0
|
||||
get_it: ^7.1.3
|
||||
google_fonts: ^2.3.1
|
||||
just_audio: ^0.9.18
|
||||
mobx: ^2.0.1
|
||||
path: ^1.8.0
|
||||
path_provider: ^2.0.2
|
||||
permission_handler: ^8.3.0
|
||||
provider: ^6.0.2
|
||||
reorderables: ^0.4.1
|
||||
sqlite3_flutter_libs: ^0.5.0
|
||||
string_similarity: ^2.0.0
|
||||
flutter_fimber: ^0.6.3 # Apache 2.0
|
||||
flutter_fimber_filelogger: ^2.0.0 # DEPRECATED -> fimber_io
|
||||
flutter_mobx: ^2.0.0 # MIT
|
||||
flutter_speed_dial: ^5.0.0 # MIT
|
||||
get_it: ^7.1.3 # MIT
|
||||
# google_fonts: ^2.3.1 # Apache 2.0
|
||||
just_audio: ^0.9.18 # MIT
|
||||
mobx: ^2.0.1 # MIT
|
||||
path: ^1.8.0 # BSD 3
|
||||
path_provider: ^2.0.2 # BSD 3
|
||||
permission_handler: ^8.3.0 # MIT
|
||||
provider: ^6.0.2 # MIT
|
||||
reorderables: ^0.4.1 # MIT
|
||||
sqlite3_flutter_libs: ^0.5.0 # MIT
|
||||
string_similarity: ^2.0.0 # MIT
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.0.4
|
||||
drift_dev: ^1.0.0
|
||||
build_runner: ^2.0.4 # BSD 3
|
||||
drift_dev: ^1.0.0 # MIT
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
mobx_codegen: ^2.0.1+3
|
||||
mockito: ^5.0.10
|
||||
mobx_codegen: ^2.0.1+3 # MIT
|
||||
mockito: ^5.0.10 # Apache 2.0
|
||||
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
|
@ -50,12 +50,7 @@ dev_dependencies:
|
|||
# The following section is specific to Flutter.
|
||||
flutter:
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
# the material Icons class.
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
assets:
|
||||
- assets/
|
||||
|
||||
|
@ -65,26 +60,10 @@ flutter:
|
|||
# For details regarding adding assets from package dependencies, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
# list giving the asset and other descriptors for the font. For
|
||||
# example:
|
||||
fonts:
|
||||
- family: MuckeIcons
|
||||
fonts:
|
||||
- asset: fonts/MuckeIcons.ttf
|
||||
# fonts:
|
||||
# - family: Schyler
|
||||
# fonts:
|
||||
# - asset: fonts/Schyler-Regular.ttf
|
||||
# - asset: fonts/Schyler-Italic.ttf
|
||||
# style: italic
|
||||
# - family: Trajan Pro
|
||||
# fonts:
|
||||
# - asset: fonts/TrajanPro.ttf
|
||||
# - asset: fonts/TrajanPro_Bold.ttf
|
||||
# weight: 700
|
||||
#
|
||||
|
||||
# For details regarding fonts from package dependencies,
|
||||
# see https://flutter.dev/custom-fonts/#from-packages
|
||||
|
|
Loading…
Add table
Reference in a new issue