refactorización de pantallas
This commit is contained in:
@@ -183,21 +183,12 @@ class _PantallaVotacionClienteState extends State<PantallaVotacionCliente> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 56,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: _votacionCompleta
|
||||
? () => widget.onVotos(Map.unmodifiable(_votosPorVotante))
|
||||
: null,
|
||||
icon: const Icon(Icons.how_to_vote),
|
||||
label: Text(l10n.votar),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: TemaApp.colorAcento,
|
||||
foregroundColor: Colors.white,
|
||||
textStyle: const TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
BotonFarolero.secundario(
|
||||
texto: l10n.votar,
|
||||
icono: Icons.how_to_vote,
|
||||
onPressed: _votacionCompleta
|
||||
? () => widget.onVotos(Map.unmodifiable(_votosPorVotante))
|
||||
: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -232,16 +223,15 @@ class _PantallaVotacionClienteState extends State<PantallaVotacionCliente> {
|
||||
BuildContext context,
|
||||
JugadorInicioPartida votante,
|
||||
) {
|
||||
return Card(
|
||||
color: TemaApp.colorSuperficie,
|
||||
return PanelFarolero(
|
||||
margin: const EdgeInsets.only(bottom: 16),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Column(
|
||||
padding: const EdgeInsets.all(14),
|
||||
borderColor: TemaApp.colorAcento.withValues(alpha: 0.48),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Voto de ${votante.nombre}',
|
||||
AppLocalizations.of(context)!.voteOf(votante.nombre),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
@@ -258,7 +248,6 @@ class _PantallaVotacionClienteState extends State<PantallaVotacionCliente> {
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -269,29 +258,10 @@ class _PantallaVotacionClienteState extends State<PantallaVotacionCliente> {
|
||||
required bool selected,
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
return Card(
|
||||
color: selected
|
||||
? TemaApp.colorAcento.withValues(alpha: 0.3)
|
||||
: TemaApp.colorTarjeta,
|
||||
margin: const EdgeInsets.only(bottom: 8),
|
||||
child: ListTile(
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: selected
|
||||
? TemaApp.colorAcento
|
||||
: TemaApp.colorAcento.withValues(alpha: 0.3),
|
||||
child: Text(
|
||||
'${index + 1}',
|
||||
style: TextStyle(
|
||||
color: selected ? Colors.white : TemaApp.colorTexto,
|
||||
),
|
||||
),
|
||||
),
|
||||
title: Text(jugador.nombre),
|
||||
trailing: selected
|
||||
? const Icon(Icons.check_circle, color: TemaApp.colorAcento)
|
||||
: null,
|
||||
onTap: onTap,
|
||||
),
|
||||
return SelectorVotoFarolero(
|
||||
nombre: '${index + 1}. ${jugador.nombre}',
|
||||
seleccionado: selected,
|
||||
onTap: onTap,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user