Gamificación

This commit is contained in:
2026-05-09 17:24:46 +02:00
parent dcecee805b
commit e2cebafdbb
29 changed files with 877 additions and 58 deletions

View File

@@ -217,15 +217,26 @@ class _PantallaLobbyHostState extends State<PantallaLobbyHost> {
? TemaApp.colorNaranja
: TemaApp.colorAzul,
size: 38,
fuego: usuario.fuego,
medallas: usuario.medallas,
),
),
title: Text(usuario.nombre),
subtitle: Text(
seleccionadoPorMi
? 'Seleccionado por este móvil'
: seleccionadoPorOtro
? 'Seleccionado por otro cliente'
: 'Disponible',
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
seleccionadoPorMi
? 'Seleccionado por este móvil'
: seleccionadoPorOtro
? 'Seleccionado por otro cliente'
: 'Disponible',
),
if (usuario.medallas.isNotEmpty) ...[
const SizedBox(height: 4),
MedallasCompactasFarolero(ids: usuario.medallas),
],
],
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
@@ -300,11 +311,15 @@ class _PantallaLobbyHostState extends State<PantallaLobbyHost> {
);
if (nombre != null && nombre.trim().isNotEmpty) {
final gamificacion =
context.read<ServicioPerfilUsuario>().resumenGamificacion;
await nearby.crearUsuarioSala(
nombre.trim(),
seleccionar: true,
nick: perfil.nick,
avatar: perfil.avatarAsset,
fuego: gamificacion.fuego,
medallas: gamificacion.medallas,
);
}
}