uso de imágenes y eliminación de innecesarias
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 285 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 70 KiB |
@@ -71,6 +71,7 @@ class _PantallaAdivinanzaState extends State<PantallaAdivinanza> {
|
||||
const SizedBox(height: 12),
|
||||
TarjetaFaseFarolero(
|
||||
icono: Icons.theater_comedy,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_impostor_mask.webp',
|
||||
titulo: l10n.impostorCanGuess,
|
||||
subtitulo: l10n.ifCorrectImpostorsWin,
|
||||
color: TemaApp.colorAcento,
|
||||
|
||||
@@ -69,7 +69,12 @@ class _PantallaAjustesState extends State<PantallaAjustes> {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Icon(Icons.edit),
|
||||
Image.asset(
|
||||
'assets/ui/generated/actions/action_settings_gear.webp',
|
||||
width: 38,
|
||||
height: 38,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -151,7 +151,7 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
|
||||
Future<void> _iniciarPartidaMulti() async {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
// 1. Pedir permisos automáticamente
|
||||
// 1. Pedir permisos automáticamente
|
||||
final permisosOk = await ServicioPermisos.solicitarPermisosNearby(context);
|
||||
if (!permisosOk) {
|
||||
if (mounted) {
|
||||
@@ -400,7 +400,7 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
// Categoría
|
||||
// CategorÃÂa
|
||||
Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(18, 18, 18, 28),
|
||||
@@ -417,7 +417,15 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
child: DropdownButtonFormField<String>(
|
||||
initialValue: _categoria,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.category),
|
||||
prefixIcon: Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Image.asset(
|
||||
'assets/ui/generated/actions/action_category_cards.webp',
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
items: categorias.map((c) {
|
||||
return DropdownMenuItem(
|
||||
@@ -465,7 +473,15 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
controller: _controladorNombre,
|
||||
decoration: InputDecoration(
|
||||
hintText: l10n.playerNameHint,
|
||||
prefixIcon: const Icon(Icons.person_add),
|
||||
prefixIcon: Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Image.asset(
|
||||
'assets/ui/generated/actions/action_add_player.webp',
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
textCapitalization: TextCapitalization.words,
|
||||
onSubmitted: (_) => _agregarJugador(),
|
||||
@@ -530,7 +546,7 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
|
||||
// Configuración de partida
|
||||
// Configuración de partida
|
||||
Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(18, 18, 18, 28),
|
||||
@@ -543,7 +559,7 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Número de impostores
|
||||
// Número de impostores
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@@ -604,10 +620,11 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Botón iniciar
|
||||
// Botón iniciar
|
||||
BotonFarolero(
|
||||
texto: l10n.startGame,
|
||||
icono: Icons.play_arrow,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_create_game.webp',
|
||||
onPressed: (_modoMultimovil || _jugadores.length >= 3)
|
||||
? _iniciarPartida
|
||||
: null,
|
||||
|
||||
@@ -92,6 +92,7 @@ class _PantallaDebateState extends State<PantallaDebate> {
|
||||
Expanded(
|
||||
child: TarjetaFaseFarolero(
|
||||
icono: Icons.forum,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_rules_book.webp',
|
||||
titulo: l10n.playersInDebate,
|
||||
subtitulo: l10n.activePlayersInfo(
|
||||
partida.jugadoresActivos.length,
|
||||
@@ -107,6 +108,7 @@ class _PantallaDebateState extends State<PantallaDebate> {
|
||||
nombre: '${index + 1}. ${jugador.nombre}',
|
||||
subtitulo: jugador.eliminado ? l10n.eliminated : null,
|
||||
icono: jugador.eliminado ? Icons.person_off : Icons.record_voice_over,
|
||||
assetIconPath: jugador.eliminado ? null : 'assets/ui/generated/actions/action_players_group.webp',
|
||||
destacado: !jugador.eliminado,
|
||||
completado: !jugador.eliminado,
|
||||
);
|
||||
|
||||
@@ -166,6 +166,7 @@ class _PantallaDebateClienteState extends State<PantallaDebateCliente> {
|
||||
const SizedBox(height: 12),
|
||||
TarjetaFaseFarolero(
|
||||
icono: Icons.forum,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_rules_book.webp',
|
||||
titulo: l10n.debate,
|
||||
subtitulo: l10n.debateInstructions,
|
||||
child: Column(
|
||||
@@ -195,6 +196,7 @@ class _PantallaDebateClienteState extends State<PantallaDebateCliente> {
|
||||
destacado: true,
|
||||
completado: true,
|
||||
icono: Icons.record_voice_over,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_players_group.webp',
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
|
||||
@@ -412,10 +412,13 @@ class _TarjetaProgresoGamificacion extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.local_fire_department,
|
||||
color: Color(0xFF1B1010),
|
||||
size: 30,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(7),
|
||||
child: Image.asset(
|
||||
'assets/ui/generated/actions/action_fire_badge.webp',
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
@@ -582,8 +585,13 @@ class _DeltaFuego extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.local_fire_department,
|
||||
color: TemaApp.colorNaranja, size: 24),
|
||||
Image.asset(
|
||||
'assets/ui/generated/actions/action_fire_badge.webp',
|
||||
width: 26,
|
||||
height: 26,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
texto,
|
||||
@@ -950,6 +958,7 @@ class _BotonesFinPartida extends StatelessWidget {
|
||||
BotonFarolero(
|
||||
texto: l10n.rematch,
|
||||
icono: Icons.replay,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_create_game.webp',
|
||||
onPressed: () {
|
||||
estado.revancha();
|
||||
Navigator.pushReplacement(
|
||||
|
||||
@@ -164,6 +164,7 @@ class _PantallaFinPartidaOnlineState extends State<PantallaFinPartidaOnline> {
|
||||
BotonFarolero.oscuro(
|
||||
texto: l10n.mainMenu,
|
||||
icono: Icons.home,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_result_trophy.webp',
|
||||
onPressed: () async {
|
||||
await context.read<ServicioNearby>().desconectar();
|
||||
if (!context.mounted) return;
|
||||
|
||||
@@ -286,6 +286,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
child: BotonFarolero.oscuro(
|
||||
texto: AppLocalizations.of(context)!.assumeOnThisPhone,
|
||||
icono: Icons.person_add_alt_1,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_add_player.webp',
|
||||
onPressed: () => nearby.asumirUsuariosDesconectados(),
|
||||
),
|
||||
),
|
||||
@@ -411,6 +412,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
) {
|
||||
return TarjetaFaseFarolero(
|
||||
icono: Icons.visibility,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_reveal_word.webp',
|
||||
titulo: l10n.waitingPlayersSeeWord,
|
||||
subtitulo: l10n.connectedPlayers,
|
||||
child: Column(
|
||||
@@ -427,6 +429,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
BotonFarolero(
|
||||
texto: l10n.seeYourWord,
|
||||
icono: Icons.visibility,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_reveal_word.webp',
|
||||
onPressed: () => _mostrarPalabraHost(context),
|
||||
),
|
||||
if (todosListos) ...[
|
||||
@@ -538,6 +541,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
|
||||
return TarjetaFaseFarolero(
|
||||
icono: Icons.forum,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_rules_book.webp',
|
||||
titulo: l10n.debate,
|
||||
subtitulo: l10n.debateInstructions,
|
||||
child: Column(
|
||||
@@ -605,6 +609,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
|
||||
return TarjetaFaseFarolero(
|
||||
icono: Icons.how_to_vote,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_vote_mask.webp',
|
||||
titulo: l10n.voting,
|
||||
subtitulo: l10n.votesProgress(votosEmitidos, totalVotos),
|
||||
color: TemaApp.colorAcento,
|
||||
@@ -668,6 +673,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
: null;
|
||||
return TarjetaFaseFarolero(
|
||||
icono: Icons.psychology,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_impostor_mask.webp',
|
||||
titulo: l10n.impostorGuessTitle,
|
||||
subtitulo: ultimo == null
|
||||
? l10n.impostorCanGuess
|
||||
@@ -783,6 +789,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
destacado: esHost,
|
||||
completado: listo,
|
||||
icono: esHost ? Icons.phone_android : Icons.devices,
|
||||
assetIconPath: esHost ? 'assets/ui/generated/actions/action_mobile_device.webp' : 'assets/ui/generated/actions/action_multidevice_signal.webp',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -798,6 +805,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
return BotonFarolero(
|
||||
texto: todosListos ? l10n.allSeenStartDebate : l10n.waitingPlayersSeeWord,
|
||||
icono: Icons.forum,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_rules_book.webp',
|
||||
onPressed: todosListos ? () => _avanzarAFase(FaseJuego.debate) : null,
|
||||
);
|
||||
case FaseJuego.debate:
|
||||
|
||||
@@ -30,6 +30,7 @@ class PantallaHistorial extends StatelessWidget {
|
||||
const SizedBox(height: 12),
|
||||
EstadoVacioFarolero(
|
||||
icono: Icons.history_rounded,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_history_ledger.webp',
|
||||
titulo: l10n.history,
|
||||
subtitulo: l10n.noSavedGames,
|
||||
),
|
||||
|
||||
@@ -8,7 +8,7 @@ import '../servicios/servicio_perfil_usuario.dart';
|
||||
import '../tema/componentes_farolero.dart';
|
||||
import '../tema/tema_app.dart';
|
||||
|
||||
/// Lobby del host. El host es autoridad de sala y también cliente local.
|
||||
/// Lobby del host. El host es autoridad de sala y también cliente local.
|
||||
class PantallaLobbyHost extends StatefulWidget {
|
||||
final String nombreSala;
|
||||
final VoidCallback onIniciar;
|
||||
@@ -63,6 +63,7 @@ class _PantallaLobbyHostState extends State<PantallaLobbyHost> {
|
||||
const SizedBox(height: 12),
|
||||
EncabezadoFarolero(
|
||||
icono: Icons.wifi_tethering,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_multidevice_signal.webp',
|
||||
titulo: widget.nombreSala,
|
||||
subtitulo: l10n.scanToJoin,
|
||||
),
|
||||
@@ -186,6 +187,7 @@ class _PantallaLobbyHostState extends State<PantallaLobbyHost> {
|
||||
BotonFarolero(
|
||||
texto: _iniciando ? l10n.starting : l10n.startGame,
|
||||
icono: Icons.play_arrow,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_create_game.webp',
|
||||
onPressed: puedeIniciar && !_iniciando
|
||||
? () {
|
||||
setState(() => _iniciando = true);
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:farolero/tema/componentes_farolero.dart';
|
||||
import 'package:farolero/tema/tema_app.dart';
|
||||
|
||||
/// Pantalla que ve cada jugador cuando recibe su palabra (modo multidispositivo).
|
||||
/// El cliente recibe la palabra vÃa ServicioNearby y se navega aquÃ.
|
||||
/// El cliente recibe la palabra vÃÂa ServicioNearby y se navega aquÃÂ.
|
||||
/// NO es la pantalla del host.
|
||||
class PantallaPalabraCliente extends StatefulWidget {
|
||||
final String palabra;
|
||||
@@ -166,7 +166,7 @@ class _PantallaPalabraClienteState extends State<PantallaPalabraCliente> {
|
||||
),
|
||||
|
||||
const Spacer(),
|
||||
// Botón confirmar
|
||||
// Botón confirmar
|
||||
BotonFarolero(
|
||||
texto: _haRevelado ? l10n.iveSeenIt : l10n.tapToSee,
|
||||
icono: Icons.check,
|
||||
|
||||
@@ -135,6 +135,7 @@ class _PantallaPalabrasClienteState extends State<PantallaPalabrasCliente> {
|
||||
? (_esUltimo ? l10n.iveSeenIt : l10n.next)
|
||||
: l10n.tapToSee,
|
||||
icono: _esUltimo ? Icons.check : Icons.arrow_forward,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_reveal_word.webp',
|
||||
onPressed: _actualRevelado ? _continuar : null,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -39,7 +39,7 @@ class _PantallaResultadoState extends State<PantallaResultado>
|
||||
),
|
||||
);
|
||||
|
||||
// Iniciar animación de suspense
|
||||
// Iniciar animación de suspense
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
_animController.forward().then((_) {
|
||||
setState(() => _revelado = true);
|
||||
@@ -72,7 +72,7 @@ class _PantallaResultadoState extends State<PantallaResultado>
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// Animación de suspense
|
||||
// Animación de suspense
|
||||
if (!_revelado) ...[
|
||||
const ArteGameplayFarolero.resultado(height: 152),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
@@ -19,7 +19,7 @@ import 'pantalla_resultado_online.dart';
|
||||
import 'pantalla_fin_partida_online.dart';
|
||||
|
||||
/// Pantalla para unirse a una partida multidispositivo.
|
||||
/// Flujo: nombre → discovery automático (lista de salas) → fallback QR
|
||||
/// Flujo: nombre → discovery automático (lista de salas) → fallback QR
|
||||
class PantallaUnirse extends StatefulWidget {
|
||||
const PantallaUnirse({super.key});
|
||||
|
||||
@@ -64,7 +64,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
nearby.onMensaje((endpointId, mensaje) {
|
||||
if (!mounted) return;
|
||||
if (mensaje.tipo == TipoMensaje.partidaInicio) {
|
||||
// El host ha iniciado la partida — nos ha enviado nuestra palabra
|
||||
// El host ha iniciado la partida  nos ha enviado nuestra palabra
|
||||
final jugadoresData = mensaje.datos['jugadores'] as List<dynamic>?;
|
||||
final jugadoresTodosData =
|
||||
mensaje.datos['jugadoresTodos'] as List<dynamic>?;
|
||||
@@ -303,7 +303,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
if (!_formKey.currentState!.validate()) return;
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
// Solicitar permisos automáticamente
|
||||
// Solicitar permisos automáticamente
|
||||
final permisosOk = await ServicioPermisos.solicitarPermisosNearby(context);
|
||||
if (!permisosOk) {
|
||||
setState(() {
|
||||
@@ -365,7 +365,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
_conectando = false;
|
||||
_error = l10n.couldNotConnectToHost(nombreHost);
|
||||
});
|
||||
// Reiniciar búsqueda
|
||||
// Reiniciar búsqueda
|
||||
_iniciarBusqueda();
|
||||
}
|
||||
}
|
||||
@@ -395,7 +395,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
datos['host'] as String? ?? datos['sala'] as String? ?? l10n.room;
|
||||
});
|
||||
|
||||
// Iniciar búsqueda para que Nearby encuentre al host
|
||||
// Iniciar búsqueda para que Nearby encuentre al host
|
||||
final nearby = context.read<ServicioNearby>();
|
||||
if (!nearby.buscando) {
|
||||
final servicioPerfil = context.read<ServicioPerfilUsuario>();
|
||||
@@ -419,7 +419,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
final nearby = context.watch<ServicioNearby>();
|
||||
|
||||
// Si estamos conectados → pantalla de espera
|
||||
// Si estamos conectados → pantalla de espera
|
||||
if (nearby.conectado && !nearby.esHost) {
|
||||
return _buildPantallaEspera(context, l10n);
|
||||
}
|
||||
@@ -457,6 +457,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
const SizedBox(height: 14),
|
||||
EncabezadoFarolero(
|
||||
icono: Icons.bluetooth_searching,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_multidevice_signal.webp',
|
||||
titulo: l10n.joinGameTitle,
|
||||
subtitulo: l10n.enterNameToSearch,
|
||||
color: TemaApp.colorAzul,
|
||||
@@ -479,6 +480,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
BotonFarolero(
|
||||
texto: l10n.searchGames,
|
||||
icono: Icons.search,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_join_search.webp',
|
||||
onPressed: _iniciarBusqueda,
|
||||
),
|
||||
if (_error != null) ...[
|
||||
@@ -527,6 +529,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
const SizedBox(height: 12),
|
||||
EncabezadoFarolero(
|
||||
icono: _conectando ? Icons.sync : Icons.radar,
|
||||
assetIconPath: _conectando ? null : 'assets/ui/generated/actions/action_join_search.webp',
|
||||
titulo: _conectando
|
||||
? '${l10n.connectingTo} ${_salaSeleccionada ?? ""}...'
|
||||
: l10n.searchingGames,
|
||||
@@ -553,6 +556,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
? Center(
|
||||
child: EstadoVacioFarolero(
|
||||
icono: Icons.radar,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_join_search.webp',
|
||||
titulo: l10n.noGamesFound,
|
||||
subtitulo: l10n.noGamesFoundHint,
|
||||
),
|
||||
@@ -584,10 +588,11 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: OutlinedButton.icon(
|
||||
child: BotonFarolero.oscuro(
|
||||
texto: l10n.scanQR,
|
||||
icono: Icons.qr_code_scanner,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_qr_scan.webp',
|
||||
onPressed: _abrirEscaner,
|
||||
icon: const Icon(Icons.qr_code_scanner),
|
||||
label: Text(l10n.scanQR),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -655,7 +660,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
);
|
||||
}
|
||||
|
||||
// ==================== ESCÁNER QR ====================
|
||||
// ==================== ESCÃÂÂÂÂÂNER QR ====================
|
||||
|
||||
Widget _buildEscaner(BuildContext context, AppLocalizations l10n) {
|
||||
return Scaffold(
|
||||
@@ -766,7 +771,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Column(
|
||||
children: [
|
||||
// Opción crear nuevo usuario (tarea 3.5)
|
||||
// Opción crear nuevo usuario (tarea 3.5)
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.add,
|
||||
@@ -798,7 +803,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
);
|
||||
}
|
||||
|
||||
/// Crea un nuevo usuario y lo envía al host
|
||||
/// Crea un nuevo usuario y lo envÃÂÂÂÂÂa al host
|
||||
Future<void> _crearNuevoUsuario(BuildContext context) async {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
final controller = TextEditingController();
|
||||
@@ -847,7 +852,7 @@ class _PantallaUnirseState extends State<PantallaUnirse> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Envía el usuario seleccionado/creado al host
|
||||
/// EnvÃÂÂÂÂÂa el usuario seleccionado/creado al host
|
||||
void _enviarUsuarioAlHost(Usuario usuario) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
final nearby = context.read<ServicioNearby>();
|
||||
|
||||
@@ -42,6 +42,7 @@ class _PantallaVerPalabraState extends State<PantallaVerPalabra> {
|
||||
const SizedBox(height: 10),
|
||||
TarjetaFaseFarolero(
|
||||
icono: Icons.visibility,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_reveal_word.webp',
|
||||
titulo: l10n.roundNumber(partida.rondaActual),
|
||||
subtitulo: l10n.eachPlayerMustSee,
|
||||
),
|
||||
@@ -57,6 +58,7 @@ class _PantallaVerPalabraState extends State<PantallaVerPalabra> {
|
||||
nombre: '${index + 1}. ${jugador.nombre}',
|
||||
subtitulo: haVisto ? l10n.alreadySeen : l10n.tapToSee,
|
||||
icono: haVisto ? Icons.check_circle : Icons.visibility,
|
||||
assetIconPath: haVisto ? null : 'assets/ui/generated/actions/action_reveal_word.webp',
|
||||
destacado: haVisto,
|
||||
completado: haVisto,
|
||||
onTap: haVisto ? null : () => _mostrarPalabra(context, jugador.id),
|
||||
@@ -70,6 +72,7 @@ class _PantallaVerPalabraState extends State<PantallaVerPalabra> {
|
||||
? l10n.allSeenStartDebate
|
||||
: l10n.playersRemaining(partida.jugadores.length - _hanVisto.length),
|
||||
icono: Icons.forum,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_rules_book.webp',
|
||||
onPressed: todosHanVisto
|
||||
? () {
|
||||
estado.iniciarDebate();
|
||||
@@ -154,6 +157,7 @@ class _PantallaRevelarPalabraState extends State<_PantallaRevelarPalabra> {
|
||||
const SizedBox(height: 12),
|
||||
TarjetaFaseFarolero(
|
||||
icono: widget.esImpostor ? Icons.theater_comedy : Icons.search,
|
||||
assetIconPath: widget.esImpostor ? 'assets/ui/generated/actions/action_impostor_mask.webp' : 'assets/ui/generated/actions/action_reveal_word.webp',
|
||||
titulo: widget.nombre,
|
||||
subtitulo: l10n.holdToSeeWord,
|
||||
color: colorEstado,
|
||||
@@ -250,6 +254,7 @@ class _PantallaRevelarPalabraState extends State<_PantallaRevelarPalabra> {
|
||||
BotonFarolero.secundario(
|
||||
texto: l10n.seenMyWord,
|
||||
icono: Icons.check,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_reveal_word.webp',
|
||||
onPressed: () {
|
||||
widget.onVisto();
|
||||
Navigator.pop(context);
|
||||
|
||||
@@ -61,6 +61,7 @@ class _PantallaVotacionState extends State<PantallaVotacion> {
|
||||
const SizedBox(height: 10),
|
||||
TarjetaFaseFarolero(
|
||||
icono: Icons.how_to_vote,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_vote_mask.webp',
|
||||
titulo: l10n.voteOf(votanteActual.nombre),
|
||||
subtitulo: l10n.votesProgress(estado.votos.length, activos.length),
|
||||
color: TemaApp.colorAcento,
|
||||
@@ -78,6 +79,7 @@ class _PantallaVotacionState extends State<PantallaVotacion> {
|
||||
Expanded(
|
||||
child: TarjetaFaseFarolero(
|
||||
icono: Icons.person_search,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_players_group.webp',
|
||||
titulo: l10n.whoIsImpostor,
|
||||
subtitulo: l10n.selectOnePlayer,
|
||||
color: TemaApp.colorNaranja,
|
||||
@@ -139,6 +141,7 @@ class _PantallaVotacionState extends State<PantallaVotacion> {
|
||||
const SizedBox(height: 24),
|
||||
TarjetaFaseFarolero(
|
||||
icono: Icons.check_circle,
|
||||
assetIconPath: 'assets/ui/generated/actions/action_result_trophy.webp',
|
||||
titulo: l10n.allVoted,
|
||||
subtitulo: l10n.tapToReveal,
|
||||
color: TemaApp.colorVerde,
|
||||
|
||||
@@ -77,6 +77,7 @@ class PanelFarolero extends StatelessWidget {
|
||||
|
||||
class EncabezadoFarolero extends StatelessWidget {
|
||||
final IconData icono;
|
||||
final String? assetIconPath;
|
||||
final String titulo;
|
||||
final String? subtitulo;
|
||||
final Color color;
|
||||
@@ -86,6 +87,7 @@ class EncabezadoFarolero extends StatelessWidget {
|
||||
const EncabezadoFarolero({
|
||||
super.key,
|
||||
required this.icono,
|
||||
this.assetIconPath,
|
||||
required this.titulo,
|
||||
this.subtitulo,
|
||||
this.color = TemaApp.colorNaranja,
|
||||
@@ -118,7 +120,16 @@ class EncabezadoFarolero extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(icono, color: color, size: 30),
|
||||
child: assetIconPath == null
|
||||
? Icon(icono, color: color, size: 30)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: Image.asset(
|
||||
assetIconPath!,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
@@ -159,12 +170,14 @@ class EncabezadoFarolero extends StatelessWidget {
|
||||
|
||||
class EstadoVacioFarolero extends StatelessWidget {
|
||||
final IconData icono;
|
||||
final String? assetIconPath;
|
||||
final String titulo;
|
||||
final String subtitulo;
|
||||
|
||||
const EstadoVacioFarolero({
|
||||
super.key,
|
||||
required this.icono,
|
||||
this.assetIconPath,
|
||||
required this.titulo,
|
||||
required this.subtitulo,
|
||||
});
|
||||
@@ -176,7 +189,17 @@ class EstadoVacioFarolero extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(icono, color: TemaApp.colorNaranja, size: 46),
|
||||
SizedBox(
|
||||
width: 64,
|
||||
height: 64,
|
||||
child: assetIconPath == null
|
||||
? Icon(icono, color: TemaApp.colorNaranja, size: 46)
|
||||
: Image.asset(
|
||||
assetIconPath!,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
Text(
|
||||
titulo,
|
||||
@@ -348,6 +371,7 @@ class BotonFarolero extends StatelessWidget {
|
||||
|
||||
class TarjetaFaseFarolero extends StatelessWidget {
|
||||
final IconData icono;
|
||||
final String? assetIconPath;
|
||||
final String titulo;
|
||||
final String? subtitulo;
|
||||
final Color color;
|
||||
@@ -357,6 +381,7 @@ class TarjetaFaseFarolero extends StatelessWidget {
|
||||
const TarjetaFaseFarolero({
|
||||
super.key,
|
||||
required this.icono,
|
||||
this.assetIconPath,
|
||||
required this.titulo,
|
||||
this.subtitulo,
|
||||
this.color = TemaApp.colorNaranja,
|
||||
@@ -388,7 +413,16 @@ class TarjetaFaseFarolero extends StatelessWidget {
|
||||
),
|
||||
border: Border.all(color: color.withValues(alpha: 0.72)),
|
||||
),
|
||||
child: Icon(icono, color: color, size: 30),
|
||||
child: assetIconPath == null
|
||||
? Icon(icono, color: color, size: 30)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: Image.asset(
|
||||
assetIconPath!,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
@@ -429,6 +463,7 @@ class EstadoJugadorFarolero extends StatelessWidget {
|
||||
final bool destacado;
|
||||
final bool completado;
|
||||
final IconData icono;
|
||||
final String? assetIconPath;
|
||||
final String? subtitulo;
|
||||
final VoidCallback? onTap;
|
||||
|
||||
@@ -438,6 +473,7 @@ class EstadoJugadorFarolero extends StatelessWidget {
|
||||
this.destacado = false,
|
||||
this.completado = false,
|
||||
this.icono = Icons.person,
|
||||
this.assetIconPath,
|
||||
this.subtitulo,
|
||||
this.onTap,
|
||||
});
|
||||
@@ -475,7 +511,16 @@ class EstadoJugadorFarolero extends StatelessWidget {
|
||||
color: color.withValues(alpha: 0.16),
|
||||
border: Border.all(color: color.withValues(alpha: 0.72)),
|
||||
),
|
||||
child: Icon(icono, color: color, size: 24),
|
||||
child: assetIconPath == null
|
||||
? Icon(icono, color: color, size: 24)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: Image.asset(
|
||||
assetIconPath!,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
@@ -564,7 +609,7 @@ class TemporizadorFarolero extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/ui/generated/gameplay/gameplay_phase_emblem.webp',
|
||||
'assets/ui/generated/actions/action_timer_hourglass.webp',
|
||||
height: 132,
|
||||
fit: BoxFit.contain,
|
||||
opacity: const AlwaysStoppedAnimation(0.34),
|
||||
|
||||
@@ -590,8 +590,13 @@ class BarraFuegoPremiumFarolero extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.local_fire_department,
|
||||
color: TemaApp.colorNaranja, size: 18),
|
||||
Image.asset(
|
||||
'assets/ui/generated/actions/action_fire_badge.webp',
|
||||
width: 22,
|
||||
height: 22,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
'${AppLocalizations.of(context)!.fireLabel} '
|
||||
@@ -1147,10 +1152,13 @@ class _IconoFuegoRecompensa extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.local_fire_department,
|
||||
color: Color(0xFF1B1010),
|
||||
size: 30,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(7),
|
||||
child: Image.asset(
|
||||
'assets/ui/generated/actions/action_fire_badge.webp',
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1185,10 +1193,12 @@ class _DeltaFuegoPremium extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.local_fire_department,
|
||||
color: TemaApp.colorNaranja,
|
||||
size: 24,
|
||||
Image.asset(
|
||||
'assets/ui/generated/actions/action_fire_badge.webp',
|
||||
width: 26,
|
||||
height: 26,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
|
||||
@@ -47,3 +47,4 @@ flutter:
|
||||
- assets/ui/generated/final_rewards/
|
||||
- assets/ui/generated/gameplay/
|
||||
- assets/ui/generated/meta/
|
||||
- assets/ui/generated/actions/
|
||||
|
||||
133
tmp_asset_refs.csv
Normal file
@@ -0,0 +1,133 @@
|
||||
"Path","SizeKB","Refs"
|
||||
"assets/app_icon/farolero_app_icon.png","1580,7","0"
|
||||
"assets/avatars/avatar_02.png","103,9","1"
|
||||
"assets/avatars/avatar_03.png","106,1","1"
|
||||
"assets/avatars/avatar_04.png","94,6","1"
|
||||
"assets/avatars/avatar_05.png","108,7","1"
|
||||
"assets/avatars/avatar_06.png","106,7","1"
|
||||
"assets/avatars/avatar_07.png","105,3","1"
|
||||
"assets/avatars/avatar_08.png","106","1"
|
||||
"assets/avatars/avatar_09.png","101,1","1"
|
||||
"assets/avatars/avatar_10.png","113,7","1"
|
||||
"assets/avatars/avatar_11.png","103,7","1"
|
||||
"assets/avatars/avatar_12.png","109,1","1"
|
||||
"assets/avatars/avatar_13.png","109,3","1"
|
||||
"assets/avatars/avatar_14.png","109,9","1"
|
||||
"assets/avatars/avatar_15.png","112,9","1"
|
||||
"assets/avatars/avatar_16.png","109,3","1"
|
||||
"assets/avatars/avatar_17.png","105,4","1"
|
||||
"assets/avatars/avatar_18.png","105,5","1"
|
||||
"assets/avatars/avatar_19.png","111,5","1"
|
||||
"assets/avatars/avatar_20.png","106,8","1"
|
||||
"assets/avatars/avatar_21.png","106,1","1"
|
||||
"assets/avatars/avatar_22.png","110,5","1"
|
||||
"assets/avatars/avatar_23.png","103,9","1"
|
||||
"assets/avatars/avatar_24.png","108,6","1"
|
||||
"assets/avatars/avatar_25.png","115,7","1"
|
||||
"assets/avatars/avatar_26.png","108,4","1"
|
||||
"assets/avatars/avatar_27.png","114,9","1"
|
||||
"assets/avatars/avatar_28.png","111,8","1"
|
||||
"assets/avatars/avatar_29.png","102,8","1"
|
||||
"assets/avatars/avatar_30.png","103,1","1"
|
||||
"assets/avatars/avatar_31.png","116,6","1"
|
||||
"assets/avatars/avatar_32.png","114,2","1"
|
||||
"assets/avatars/avatar_33.png","117,3","1"
|
||||
"assets/avatars/avatar_34.png","117,8","1"
|
||||
"assets/avatars/avatar_35.png","119,2","1"
|
||||
"assets/avatars/avatar_36.png","121,4","1"
|
||||
"assets/avatars/avatar_37.png","121","1"
|
||||
"assets/avatars/avatar_38.png","123,4","1"
|
||||
"assets/avatars/avatar_39.png","121,8","1"
|
||||
"assets/avatars/avatar_40.png","122,1","1"
|
||||
"assets/avatars/avatar_41.png","124,5","1"
|
||||
"assets/avatars/avatar_42.png","119,9","1"
|
||||
"assets/avatars/avatar_43.png","126,4","1"
|
||||
"assets/avatars/avatar_44.png","124,3","1"
|
||||
"assets/avatars/avatar_45.png","125,3","1"
|
||||
"assets/avatars/avatar_46.png","121,7","1"
|
||||
"assets/avatars/avatar_47.png","115,9","1"
|
||||
"assets/avatars/avatar_48.png","115,3","1"
|
||||
"assets/avatars/avatar_49.png","113,2","1"
|
||||
"assets/avatars/avatar_50.png","106,8","1"
|
||||
"assets/avatars/avatar_51.png","118,7","1"
|
||||
"assets/avatars/avatar_52.png","116","1"
|
||||
"assets/avatars/avatar_53.png","117,6","1"
|
||||
"assets/avatars/avatar_54.png","109,6","1"
|
||||
"assets/avatars/avatar_55.png","119,3","1"
|
||||
"assets/avatars/avatar_56.png","118,2","1"
|
||||
"assets/avatars/avatar_57.png","115,5","1"
|
||||
"assets/avatars/avatar_58.png","108,3","1"
|
||||
"assets/avatars/avatar_59.png","113,6","1"
|
||||
"assets/avatars/avatar_60.png","112,4","1"
|
||||
"assets/avatars/avatar_61.png","112,3","1"
|
||||
"assets/avatars/avatar_62.png","106,8","1"
|
||||
"assets/avatars/avatar_63.png","105,9","1"
|
||||
"assets/avatars/avatar_64.png","108,6","1"
|
||||
"assets/avatars/avatar_65.png","111,9","1"
|
||||
"assets/avatars/avatar_66.png","103,6","1"
|
||||
"assets/avatars/avatar_67.png","115,8","1"
|
||||
"assets/avatars/avatar_68.png","115,3","1"
|
||||
"assets/avatars/avatar_69.png","113,9","1"
|
||||
"assets/avatars/avatar_70.png","105,8","1"
|
||||
"assets/avatars/avatar_71.png","113,6","1"
|
||||
"assets/avatars/avatar_72.png","112,5","1"
|
||||
"assets/avatars/avatar_73.png","114,4","1"
|
||||
"assets/avatars/avatar_74.png","107,5","1"
|
||||
"assets/avatars/avatar_75.png","111,4","1"
|
||||
"assets/avatars/avatar_76.png","111,7","1"
|
||||
"assets/avatars/avatar_77.png","113,5","1"
|
||||
"assets/avatars/avatar_78.png","105,9","1"
|
||||
"assets/avatars/avatar_79.png","108","1"
|
||||
"assets/avatars/avatar_80.png","104,6","1"
|
||||
"assets/avatars/avatar_81.png","105,7","1"
|
||||
"assets/avatars/avatar_82.png","113,1","1"
|
||||
"assets/avatars/avatar_83.png","110,8","1"
|
||||
"assets/avatars/avatar_84.png","104,7","1"
|
||||
"assets/medals/brasa.webp","22,9","1"
|
||||
"assets/medals/cincuenta_victorias.webp","25,3","1"
|
||||
"assets/medals/diez_victorias.webp","20,5","1"
|
||||
"assets/medals/habitual.webp","25,7","1"
|
||||
"assets/medals/impostor_habitual.webp","25","1"
|
||||
"assets/medals/incandescente.webp","27","1"
|
||||
"assets/medals/leyenda.webp","27,7","1"
|
||||
"assets/medals/llama_fuerte.webp","24,2","1"
|
||||
"assets/medals/llama_suave.webp","22","1"
|
||||
"assets/medals/lobo_faroles.webp","24,6","1"
|
||||
"assets/medals/novato.webp","20,9","1"
|
||||
"assets/medals/primer_engano.webp","23,2","1"
|
||||
"assets/medals/primera_victoria.webp","18,1","1"
|
||||
"assets/medals/veinticinco_victorias.webp","24","1"
|
||||
"assets/medals/veterano.webp","26,9","1"
|
||||
"assets/ui/generated/actions/action_category_cards.webp","10,1","1"
|
||||
"assets/ui/generated/actions/action_history_ledger.webp","8,8","1"
|
||||
"assets/ui/generated/actions/action_mobile_device.webp","7,5","1"
|
||||
"assets/ui/generated/actions/action_notes_quill.webp","9,8","1"
|
||||
"assets/ui/generated/actions/action_qr_scan.webp","8,5","1"
|
||||
"assets/ui/generated/actions/action_settings_gear.webp","10,8","1"
|
||||
"assets/ui/generated/actions/action_timer_hourglass.webp","8,3","1"
|
||||
"assets/ui/generated/create_game/create_game_header_art.webp","122,5","1"
|
||||
"assets/ui/generated/gameplay/notes_strategy_art.webp","126,4","1"
|
||||
"assets/ui/generated/join_lobby/qr_frame.webp","113,2","1"
|
||||
"assets/ui/generated/main/main_atmosphere_bg.webp","89,1","1"
|
||||
"assets/ui/generated/meta/history_ledger_art.webp","130,9","1"
|
||||
"assets/ui/generated/meta/settings_profile_art.webp","124,2","1"
|
||||
"assets/ui/generated/mode/mode_duel_hero.webp","84,7","1"
|
||||
"assets/ui/generated/shared/screen_atmosphere_bg.webp","143,1","1"
|
||||
"assets/avatars/avatar_01.png","90,4","2"
|
||||
"assets/rewards/medal_unlock_burst.webp","185,8","2"
|
||||
"assets/ui/generated/actions/action_add_player.webp","8,2","2"
|
||||
"assets/ui/generated/final_rewards/cinematic_burst.webp","178,6","2"
|
||||
"assets/ui/generated/gameplay/gameplay_phase_emblem.webp","113,2","2"
|
||||
"assets/ui/generated/join_lobby/signal_art.webp","129,3","2"
|
||||
"assets/ui/generated/main/main_lantern_hero.webp","69,4","2"
|
||||
"assets/ui/generated/actions/action_create_game.webp","8,6","3"
|
||||
"assets/ui/generated/actions/action_join_search.webp","8,2","3"
|
||||
"assets/ui/generated/actions/action_multidevice_signal.webp","9,8","3"
|
||||
"assets/ui/generated/actions/action_players_group.webp","9","3"
|
||||
"assets/ui/generated/meta/result_verdict_art.webp","129,1","3"
|
||||
"assets/ui/generated/actions/action_fire_badge.webp","8,1","5"
|
||||
"assets/ui/generated/actions/action_rules_book.webp","7,2","5"
|
||||
"assets/ui/generated/actions/action_impostor_mask.webp","8,1","6"
|
||||
"assets/ui/generated/actions/action_result_trophy.webp","12,2","6"
|
||||
"assets/ui/generated/actions/action_reveal_word.webp","9,3","7"
|
||||
"assets/ui/generated/actions/action_vote_mask.webp","8,6","7"
|
||||
|