nueva pantalla molona

This commit is contained in:
2026-05-10 21:59:38 +02:00
parent 8359d54000
commit 79a66c2e82
11 changed files with 131 additions and 56 deletions

View File

@@ -102,48 +102,9 @@ class _PantallaFinPartidaOnlineState extends State<PantallaFinPartidaOnline> {
padding: const EdgeInsets.all(24),
child: Column(
children: [
Container(
width: double.infinity,
padding: const EdgeInsets.all(32),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: ganaronJugadores
? [
TemaApp.colorVerde.withValues(alpha: 0.3),
TemaApp.colorVerde.withValues(alpha: 0.1),
]
: [
TemaApp.colorAcento.withValues(alpha: 0.3),
TemaApp.colorAcento.withValues(alpha: 0.1),
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: ganaronJugadores
? TemaApp.colorVerde
: TemaApp.colorAcento,
),
),
child: Column(
children: [
Text(
ganaronJugadores ? '🎉' : '🎭',
style: const TextStyle(fontSize: 64),
),
const SizedBox(height: 16),
Text(
ganaronJugadores ? l10n.playersWin : l10n.impostorsWin,
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
color: ganaronJugadores
? TemaApp.colorVerde
: TemaApp.colorAcento,
),
textAlign: TextAlign.center,
),
],
),
_ResultadoOnlineHero(
ganaronJugadores: ganaronJugadores,
titulo: ganaronJugadores ? l10n.playersWin : l10n.impostorsWin,
),
const SizedBox(height: 24),
if (_progreso != null) ...[
@@ -286,6 +247,59 @@ class _PantallaFinPartidaOnlineState extends State<PantallaFinPartidaOnline> {
}
}
class _ResultadoOnlineHero extends StatelessWidget {
final bool ganaronJugadores;
final String titulo;
const _ResultadoOnlineHero({
required this.ganaronJugadores,
required this.titulo,
});
@override
Widget build(BuildContext context) {
final color = ganaronJugadores ? TemaApp.colorVerde : TemaApp.colorAcento;
return Container(
width: double.infinity,
padding: const EdgeInsets.fromLTRB(20, 18, 20, 24),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
color.withValues(alpha: 0.20),
const Color(0xFF101827).withValues(alpha: 0.68),
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
borderRadius: BorderRadius.circular(28),
border: Border.all(color: color.withValues(alpha: 0.65)),
),
child: Column(
children: [
Image.asset(
'assets/ui/generated/final_rewards/cinematic_burst.png',
height: 250,
fit: BoxFit.contain,
opacity: const AlwaysStoppedAnimation(0.95),
),
const SizedBox(height: 8),
Text(
titulo,
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
color: color,
fontWeight: FontWeight.w900,
shadows: [
Shadow(color: color.withValues(alpha: 0.75), blurRadius: 18),
],
),
textAlign: TextAlign.center,
),
],
),
).animate().fadeIn(duration: 320.ms).slideY(begin: -0.08);
}
}
class _TarjetaProgresoGamificacion extends StatelessWidget {
final ProgresoGamificacionUsuario progreso;