Improved tags view

This commit is contained in:
Juan Gilsanz Polo
2024-02-24 18:15:29 +01:00
parent c9617b5fdc
commit e50e5dd81f

View File

@@ -77,35 +77,46 @@ class TagsScreen extends ConsumerWidget {
return const SizedBox(height: 80); return const SizedBox(height: 80);
} }
final tag = tags.value?.content?.results?[index]; final tag = tags.value?.content?.results?[index];
return Column( return InkWell(
children: [ onTap: () => {},
ListTile( child: Container(
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 0), width: double.maxFinite,
dense: true, padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
title: Text( child: Column(
tag!.name!, crossAxisAlignment: CrossAxisAlignment.start,
style: TextStyle( children: [
fontSize: 16, Row(
fontWeight: FontWeight.w500, children: [
color: Theme.of(context).colorScheme.onSurface, Icon(
Icons.label_rounded,
size: 16,
color: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.7),
),
const SizedBox(width: 8),
Flexible(
child: Text(
tag!.name!,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context).colorScheme.onSurface,
),
),
),
],
), ),
), const SizedBox(height: 4),
subtitle: Text( Text(
t.tags.created(created: dateToString(tag.dateAdded!)), t.tags.created(created: dateToString(tag.dateAdded!)),
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant, color: Theme.of(context).colorScheme.onSurfaceVariant,
),
), ),
), ],
), ),
if (index < tags.value!.content!.results!.length - 1) ),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Divider(
color: Theme.of(context).colorScheme.tertiary.withOpacity(0.3),
),
),
],
); );
}, },
), ),