updates
This commit is contained in:
parent
2ce32cac4e
commit
b6639fb1c9
26 changed files with 454 additions and 204 deletions
|
|
@ -158,6 +158,29 @@ class TrackControlBar extends ConsumerWidget {
|
|||
}
|
||||
},
|
||||
),
|
||||
_ControlChip(
|
||||
label: filter.minRating != null ? '${filter.minRating}+★' : 'Rating',
|
||||
active: filter.minRating != null,
|
||||
onTap: () async {
|
||||
final picked = await _showPicker<int?>(
|
||||
context,
|
||||
title: 'Minimum rating',
|
||||
current: filter.minRating,
|
||||
options: const [
|
||||
_Opt('Any rating', null),
|
||||
_Opt('1+', 1),
|
||||
_Opt('2+', 2),
|
||||
_Opt('3+', 3),
|
||||
_Opt('4+', 4),
|
||||
_Opt('5 stars', 5),
|
||||
],
|
||||
);
|
||||
if (picked != null) {
|
||||
ref.read(trackFilterProvider.notifier).state =
|
||||
filter.copyWith(minRating: picked.value);
|
||||
}
|
||||
},
|
||||
),
|
||||
if (filter.isActive)
|
||||
_ClearChip(onTap: () => ref.read(trackFilterProvider.notifier).state =
|
||||
const BrowseFilter()),
|
||||
|
|
@ -250,11 +273,11 @@ class _ClearChip extends StatelessWidget {
|
|||
const BoxConstraints(minHeight: TimbreSpacing.minTouchTarget),
|
||||
padding: const EdgeInsets.symmetric(horizontal: TimbreSpacing.md),
|
||||
alignment: Alignment.center,
|
||||
child: const Row(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.close, size: 14, color: TimbreColors.dimmed),
|
||||
SizedBox(width: TimbreSpacing.xs),
|
||||
const SizedBox(width: TimbreSpacing.xs),
|
||||
Text('Clear', style: TextStyle(color: TimbreColors.dimmed)),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue