Limpieza de peso de imágenes
This commit is contained in:
@@ -125,51 +125,49 @@ class _PantallaFinPartidaState extends State<PantallaFinPartida> {
|
||||
? TemaApp.colorVerde
|
||||
: TemaApp.colorAcento,
|
||||
),
|
||||
Transform.translate(
|
||||
offset: const Offset(0, -18),
|
||||
child: Column(
|
||||
children: [
|
||||
if (_progreso == null)
|
||||
const _TarjetaRecompensaCargando()
|
||||
else
|
||||
_TarjetaProgresoGamificacion(progreso: _progreso!),
|
||||
const SizedBox(height: 18),
|
||||
_TarjetaSecreto(
|
||||
palabra: partida.palabraSecreta,
|
||||
categoria: BancoPalabras.nombreBonitoCategoria(
|
||||
partida.categoriaReal,
|
||||
l10n,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Column(
|
||||
children: [
|
||||
if (_progreso == null)
|
||||
const _TarjetaRecompensaCargando()
|
||||
else
|
||||
_TarjetaProgresoGamificacion(progreso: _progreso!),
|
||||
const SizedBox(height: 18),
|
||||
_TarjetaSecreto(
|
||||
palabra: partida.palabraSecreta,
|
||||
categoria: BancoPalabras.nombreBonitoCategoria(
|
||||
partida.categoriaReal,
|
||||
l10n,
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
_TarjetaImpostores(
|
||||
titulo: impostores.length == 1
|
||||
? l10n.theImpostorWas
|
||||
: l10n.theImpostorsWere,
|
||||
impostores: impostores,
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
if (partida.historialVotaciones.isNotEmpty)
|
||||
_TarjetaHistorialVotos(partida: partida, l10n: l10n),
|
||||
const SizedBox(height: 24),
|
||||
_BotonesFinPartida(
|
||||
estado: estado,
|
||||
onPrincipal: () async {
|
||||
await context.read<ServicioNearby>().desconectar();
|
||||
estado.limpiar();
|
||||
if (!context.mounted) return;
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const PantallaPrincipal(),
|
||||
),
|
||||
(route) => false,
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
_TarjetaImpostores(
|
||||
titulo: impostores.length == 1
|
||||
? l10n.theImpostorWas
|
||||
: l10n.theImpostorsWere,
|
||||
impostores: impostores,
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
if (partida.historialVotaciones.isNotEmpty)
|
||||
_TarjetaHistorialVotos(partida: partida, l10n: l10n),
|
||||
const SizedBox(height: 24),
|
||||
_BotonesFinPartida(
|
||||
estado: estado,
|
||||
onPrincipal: () async {
|
||||
await context.read<ServicioNearby>().desconectar();
|
||||
estado.limpiar();
|
||||
if (!context.mounted) return;
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const PantallaPrincipal(),
|
||||
),
|
||||
(route) => false,
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -231,7 +229,7 @@ class _HeroResultado extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 420,
|
||||
height: 548,
|
||||
width: double.infinity,
|
||||
child: CustomPaint(painter: _HeroCinematicoPainter(color: color)),
|
||||
),
|
||||
@@ -267,7 +265,7 @@ class _HeroResultado extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/ui/generated/final_rewards/cinematic_burst.png',
|
||||
'assets/ui/generated/final_rewards/cinematic_burst.webp',
|
||||
width: 260,
|
||||
height: 260,
|
||||
fit: BoxFit.contain,
|
||||
@@ -310,17 +308,22 @@ class _HeroResultado extends StatelessWidget {
|
||||
)
|
||||
.shimmer(delay: 700.ms, duration: 1500.ms),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'$apertura$tituloLimpio!',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
|
||||
color: color,
|
||||
fontSize: 34,
|
||||
fontWeight: FontWeight.w900,
|
||||
letterSpacing: 1.2,
|
||||
shadows: [
|
||||
Shadow(color: color.withValues(alpha: 0.90), blurRadius: 24),
|
||||
],
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'$apertura$tituloLimpio!',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
|
||||
color: color,
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.w900,
|
||||
letterSpacing: 1.0,
|
||||
shadows: [
|
||||
Shadow(color: color.withValues(alpha: 0.90), blurRadius: 24),
|
||||
],
|
||||
),
|
||||
),
|
||||
).animate().fadeIn(delay: 180.ms).slideY(begin: 0.25),
|
||||
],
|
||||
@@ -730,7 +733,7 @@ class _MedallaDesbloqueada extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/rewards/medal_unlock_burst.png',
|
||||
'assets/rewards/medal_unlock_burst.webp',
|
||||
width: 82,
|
||||
height: 82,
|
||||
fit: BoxFit.cover,
|
||||
@@ -943,30 +946,22 @@ class _BotonesFinPartida extends StatelessWidget {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 56,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
estado.revancha();
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => const PantallaVerPalabra()),
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.replay),
|
||||
label: Text(l10n.rematch),
|
||||
),
|
||||
BotonFarolero(
|
||||
texto: l10n.rematch,
|
||||
icono: Icons.replay,
|
||||
onPressed: () {
|
||||
estado.revancha();
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => const PantallaVerPalabra()),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 56,
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: onPrincipal,
|
||||
icon: const Icon(Icons.home),
|
||||
label: Text(l10n.mainMenu),
|
||||
),
|
||||
BotonFarolero.oscuro(
|
||||
texto: l10n.mainMenu,
|
||||
icono: Icons.home,
|
||||
onPressed: onPrincipal,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user