esta melhor des que comecei

This commit is contained in:
Diogo
2026-03-12 00:57:01 +00:00
parent 5be578a64e
commit f5d7e88149
10 changed files with 1447 additions and 507 deletions

View File

@@ -72,15 +72,17 @@ class TeamCard extends StatelessWidget {
overflow: TextOverflow.ellipsis, // Previne overflows em nomes longos
),
// --- 3. SUBTÍTULO (Contagem + Época) ---
// --- 3. SUBTÍTULO (Contagem + Época em TEMPO REAL) ---
subtitle: Padding(
padding: EdgeInsets.only(top: 6.0 * sf),
child: Row(
children: [
Icon(Icons.groups_outlined, size: 16 * sf, color: Colors.grey),
SizedBox(width: 4 * sf),
FutureBuilder<int>(
future: controller.getPlayerCount(team.id),
// 👇 A CORREÇÃO ESTÁ AQUI: StreamBuilder em vez de FutureBuilder 👇
StreamBuilder<int>(
stream: controller.getPlayerCountStream(team.id),
initialData: 0,
builder: (context, snapshot) {
final count = snapshot.data ?? 0;
@@ -94,6 +96,7 @@ class TeamCard extends StatelessWidget {
);
},
),
SizedBox(width: 8 * sf),
Expanded( // Garante que a temporada se adapta se faltar espaço
child: Text(
@@ -107,7 +110,6 @@ class TeamCard extends StatelessWidget {
),
// --- 4. BOTÕES (Estatísticas e Apagar) ---
// Removido o SizedBox fixo! Agora é MainAxisSize.min
trailing: Row(
mainAxisSize: MainAxisSize.min, // <-- ISTO RESOLVE O OVERFLOW DAS RISCAS AMARELAS
children: [