limit team members to 4 and display member count in list

This commit is contained in:
2026-03-11 18:40:28 +01:00
parent 9408889ba6
commit 4074d0287c
5 changed files with 68 additions and 24 deletions

View File

@@ -128,6 +128,10 @@ class TeamListItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
final memberCountText = team.memberCount != null
? '${team.memberCount}/4 members'
: 'No members';
return Card(
margin: const EdgeInsets.symmetric(vertical: 8),
child: ListTile(
@@ -135,7 +139,21 @@ class TeamListItem extends StatelessWidget {
child: Text(team.tag),
),
title: Text(team.name),
subtitle: Text(team.description.isEmpty ? 'No description' : team.description),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(team.description.isEmpty ? 'No description' : team.description),
const SizedBox(height: 4),
Text(
memberCountText,
style: const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
),
),
],
),
isThreeLine: true,
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [