fix: Small visual bug

This commit is contained in:
PartyDonut 2025-02-28 10:07:54 +01:00
parent a6d9bf803f
commit 936f929bde
2 changed files with 44 additions and 50 deletions

View file

@ -43,32 +43,29 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final collectonOptions = ref.watch(provider); final collectonOptions = ref.watch(provider);
return ActionContent( return ActionContent(
title: Container( title: Column(
color: Theme.of(context).colorScheme.surface, children: [
child: Column( Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceBetween,
Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, if (widget.items.length == 1)
children: [ Text(
if (widget.items.length == 1) context.localized.addToCollection,
Text( style: Theme.of(context).textTheme.titleLarge,
context.localized.addToCollection,
style: Theme.of(context).textTheme.titleLarge,
)
else
Text(
context.localized.addItemsToCollection(widget.items.length),
style: Theme.of(context).textTheme.titleLarge,
),
IconButton(
onPressed: () => ref.read(provider.notifier).setItems(widget.items),
icon: const Icon(IconsaxOutline.refresh),
) )
], else
), Text(
if (widget.items.length == 1) ItemBottomSheetPreview(item: widget.items.first), context.localized.addItemsToCollection(widget.items.length),
], style: Theme.of(context).textTheme.titleLarge,
), ),
IconButton(
onPressed: () => ref.read(provider.notifier).setItems(widget.items),
icon: const Icon(IconsaxOutline.refresh),
)
],
),
if (widget.items.length == 1) ItemBottomSheetPreview(item: widget.items.first),
],
), ),
child: Column( child: Column(
children: [ children: [

View file

@ -38,32 +38,29 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final collectonOptions = ref.watch(provider); final collectonOptions = ref.watch(provider);
return ActionContent( return ActionContent(
title: Container( title: Column(
color: Theme.of(context).colorScheme.surface, children: [
child: Column( Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceBetween,
Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, if (widget.items.length == 1)
children: [ Text(
if (widget.items.length == 1) context.localized.addToPlaylist,
Text( style: Theme.of(context).textTheme.titleLarge,
context.localized.addToPlaylist,
style: Theme.of(context).textTheme.titleLarge,
)
else
Text(
context.localized.addItemsToPlaylist(widget.items.length),
style: Theme.of(context).textTheme.titleLarge,
),
IconButton(
onPressed: () => ref.read(provider.notifier).setItems(widget.items),
icon: const Icon(IconsaxOutline.refresh),
) )
], else
), Text(
if (widget.items.length == 1) ItemBottomSheetPreview(item: widget.items.first), context.localized.addItemsToPlaylist(widget.items.length),
], style: Theme.of(context).textTheme.titleLarge,
), ),
IconButton(
onPressed: () => ref.read(provider.notifier).setItems(widget.items),
icon: const Icon(IconsaxOutline.refresh),
)
],
),
if (widget.items.length == 1) ItemBottomSheetPreview(item: widget.items.first),
],
), ),
child: Column( child: Column(
children: [ children: [