diff --git a/assets/ui/generated/icons/action_delete.webp b/assets/ui/generated/icons/action_delete.webp new file mode 100644 index 0000000..4e4d834 Binary files /dev/null and b/assets/ui/generated/icons/action_delete.webp differ diff --git a/assets/ui/generated/icons/action_hide_eye.webp b/assets/ui/generated/icons/action_hide_eye.webp new file mode 100644 index 0000000..7bdfae7 Binary files /dev/null and b/assets/ui/generated/icons/action_hide_eye.webp differ diff --git a/assets/ui/generated/icons/action_replay.webp b/assets/ui/generated/icons/action_replay.webp new file mode 100644 index 0000000..83c496a Binary files /dev/null and b/assets/ui/generated/icons/action_replay.webp differ diff --git a/assets/ui/generated/icons/action_reveal_eye.webp b/assets/ui/generated/icons/action_reveal_eye.webp new file mode 100644 index 0000000..9813c55 Binary files /dev/null and b/assets/ui/generated/icons/action_reveal_eye.webp differ diff --git a/assets/ui/generated/icons/action_save.webp b/assets/ui/generated/icons/action_save.webp new file mode 100644 index 0000000..7c0c983 Binary files /dev/null and b/assets/ui/generated/icons/action_save.webp differ diff --git a/assets/ui/generated/icons/control_minus.webp b/assets/ui/generated/icons/control_minus.webp new file mode 100644 index 0000000..4f02e70 Binary files /dev/null and b/assets/ui/generated/icons/control_minus.webp differ diff --git a/assets/ui/generated/icons/control_plus.webp b/assets/ui/generated/icons/control_plus.webp new file mode 100644 index 0000000..d650e69 Binary files /dev/null and b/assets/ui/generated/icons/control_plus.webp differ diff --git a/assets/ui/generated/icons/nav_back.webp b/assets/ui/generated/icons/nav_back.webp new file mode 100644 index 0000000..edadd3e Binary files /dev/null and b/assets/ui/generated/icons/nav_back.webp differ diff --git a/assets/ui/generated/icons/nav_close.webp b/assets/ui/generated/icons/nav_close.webp new file mode 100644 index 0000000..0fdb2c0 Binary files /dev/null and b/assets/ui/generated/icons/nav_close.webp differ diff --git a/assets/ui/generated/icons/nav_forward.webp b/assets/ui/generated/icons/nav_forward.webp new file mode 100644 index 0000000..81a4b9e Binary files /dev/null and b/assets/ui/generated/icons/nav_forward.webp differ diff --git a/assets/ui/generated/icons/nav_home.webp b/assets/ui/generated/icons/nav_home.webp new file mode 100644 index 0000000..44161a0 Binary files /dev/null and b/assets/ui/generated/icons/nav_home.webp differ diff --git a/assets/ui/generated/icons/status_cancel.webp b/assets/ui/generated/icons/status_cancel.webp new file mode 100644 index 0000000..898dd92 Binary files /dev/null and b/assets/ui/generated/icons/status_cancel.webp differ diff --git a/assets/ui/generated/icons/status_check.webp b/assets/ui/generated/icons/status_check.webp new file mode 100644 index 0000000..00de000 Binary files /dev/null and b/assets/ui/generated/icons/status_check.webp differ diff --git a/assets/ui/generated/icons/status_disconnected.webp b/assets/ui/generated/icons/status_disconnected.webp new file mode 100644 index 0000000..b53593a Binary files /dev/null and b/assets/ui/generated/icons/status_disconnected.webp differ diff --git a/assets/ui/generated/icons/status_key.webp b/assets/ui/generated/icons/status_key.webp new file mode 100644 index 0000000..f78158b Binary files /dev/null and b/assets/ui/generated/icons/status_key.webp differ diff --git a/assets/ui/generated/icons/status_lock.webp b/assets/ui/generated/icons/status_lock.webp new file mode 100644 index 0000000..2115e66 Binary files /dev/null and b/assets/ui/generated/icons/status_lock.webp differ diff --git a/lib/pantallas/pantalla_adivinanza.dart b/lib/pantallas/pantalla_adivinanza.dart index bce2437..ebf0564 100644 --- a/lib/pantallas/pantalla_adivinanza.dart +++ b/lib/pantallas/pantalla_adivinanza.dart @@ -99,7 +99,7 @@ class _PantallaAdivinanzaState extends State { controller: _controlador, decoration: InputDecoration( hintText: l10n.guessWordHint, - prefixIcon: const Icon(Icons.search), + prefixIcon: IconoFarolero(Icons.search), ), textCapitalization: TextCapitalization.sentences, textAlign: TextAlign.center, diff --git a/lib/pantallas/pantalla_ajustes.dart b/lib/pantallas/pantalla_ajustes.dart index 8515570..2294a34 100644 --- a/lib/pantallas/pantalla_ajustes.dart +++ b/lib/pantallas/pantalla_ajustes.dart @@ -135,7 +135,7 @@ class _PantallaAjustesState extends State { leading: Text(bandera, style: const TextStyle(fontSize: 24)), title: Text(nombre), trailing: seleccionado - ? const Icon(Icons.check_circle, color: TemaApp.colorAcento) + ? IconoFarolero(Icons.check_circle, color: TemaApp.colorAcento) : null, onTap: onTap, dense: true, @@ -172,7 +172,7 @@ class _PantallaAjustesState extends State { onChanged: (_) => setDialogState(() {}), decoration: InputDecoration( labelText: l10n.profileName, - prefixIcon: const Icon(Icons.person), + prefixIcon: IconoFarolero(Icons.person), ), ), const SizedBox(height: 12), @@ -180,7 +180,7 @@ class _PantallaAjustesState extends State { controller: nickController, decoration: InputDecoration( labelText: l10n.profileNick, - prefixIcon: const Icon(Icons.alternate_email), + prefixIcon: IconoFarolero(Icons.alternate_email), ), ), const SizedBox(height: 18), diff --git a/lib/pantallas/pantalla_crear_partida.dart b/lib/pantallas/pantalla_crear_partida.dart index 4c84d88..a95d140 100644 --- a/lib/pantallas/pantalla_crear_partida.dart +++ b/lib/pantallas/pantalla_crear_partida.dart @@ -353,12 +353,12 @@ class _PantallaCrearPartidaState extends State { ButtonSegment( value: false, label: Text(l10n.singleDevice), - icon: const Icon(Icons.phone_android), + icon: IconoFarolero(Icons.phone_android), ), ButtonSegment( value: true, label: Text(l10n.multiDevice), - icon: const Icon(Icons.devices), + icon: IconoFarolero(Icons.devices), ), ], selected: {_modoMultimovil}, @@ -490,7 +490,7 @@ class _PantallaCrearPartidaState extends State { const SizedBox(width: 8), IconButton.filled( onPressed: _agregarJugador, - icon: const Icon(Icons.add), + icon: IconoFarolero(Icons.add), ), ], ), @@ -529,7 +529,7 @@ class _PantallaCrearPartidaState extends State { ? Text(l10n.mainDeviceUser) : null, trailing: esPerfilLocal - ? const Icon(Icons.lock, color: TemaApp.colorDorado) + ? IconoFarolero(Icons.lock, color: TemaApp.colorDorado) : IconButton( icon: const Icon( Icons.close, @@ -570,7 +570,7 @@ class _PantallaCrearPartidaState extends State { onPressed: _numImpostores > 1 ? () => setState(() => _numImpostores--) : null, - icon: const Icon(Icons.remove_circle_outline), + icon: IconoFarolero(Icons.remove_circle_outline), ), Text( '$_numImpostores', @@ -580,7 +580,7 @@ class _PantallaCrearPartidaState extends State { onPressed: _numImpostores < _maxImpostores ? () => setState(() => _numImpostores++) : null, - icon: const Icon(Icons.add_circle_outline), + icon: IconoFarolero(Icons.add_circle_outline), ), ], ), diff --git a/lib/pantallas/pantalla_debate_cliente.dart b/lib/pantallas/pantalla_debate_cliente.dart index 32f7258..9604790 100644 --- a/lib/pantallas/pantalla_debate_cliente.dart +++ b/lib/pantallas/pantalla_debate_cliente.dart @@ -127,7 +127,7 @@ class _PantallaDebateClienteState extends State { actions: [ IconButton( tooltip: l10n.seeYourWord, - icon: const Icon(Icons.visibility), + icon: IconoFarolero(Icons.visibility), onPressed: widget.jugadoresControlados.isEmpty ? null : () => mostrarRevisionPalabraOnline( @@ -138,7 +138,7 @@ class _PantallaDebateClienteState extends State { ), IconButton( tooltip: l10n.notesTitle, - icon: const Icon(Icons.edit_note), + icon: IconoFarolero(Icons.edit_note), onPressed: _puedeAbrirNotas ? () => Navigator.push( context, diff --git a/lib/pantallas/pantalla_fin_partida.dart b/lib/pantallas/pantalla_fin_partida.dart index 81db72f..f365f7c 100644 --- a/lib/pantallas/pantalla_fin_partida.dart +++ b/lib/pantallas/pantalla_fin_partida.dart @@ -846,7 +846,7 @@ class _TarjetaImpostores extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(Icons.theater_comedy, color: TemaApp.colorAcento), + IconoFarolero(Icons.theater_comedy, color: TemaApp.colorAcento), const SizedBox(width: 8), Flexible( child: Text( @@ -867,7 +867,7 @@ class _TarjetaImpostores extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(Icons.theater_comedy, + IconoFarolero(Icons.theater_comedy, size: 20, color: TemaApp.colorAcento), const SizedBox(width: 8), Text( @@ -879,7 +879,7 @@ class _TarjetaImpostores extends StatelessWidget { ), if (j.eliminado) ...[ const SizedBox(width: 8), - const Icon(Icons.close, + IconoFarolero(Icons.close, size: 16, color: TemaApp.colorTextoSecundario), ], ], diff --git a/lib/pantallas/pantalla_fin_partida_online.dart b/lib/pantallas/pantalla_fin_partida_online.dart index 9b1de04..e7886ba 100644 --- a/lib/pantallas/pantalla_fin_partida_online.dart +++ b/lib/pantallas/pantalla_fin_partida_online.dart @@ -196,7 +196,7 @@ class _PantallaFinPartidaOnlineState extends State { return [ IconButton( tooltip: l10n.seeYourWord, - icon: const Icon(Icons.visibility), + icon: IconoFarolero(Icons.visibility), onPressed: widget.jugadoresControlados.isEmpty ? null : () => mostrarRevisionPalabraOnline( @@ -207,7 +207,7 @@ class _PantallaFinPartidaOnlineState extends State { ), IconButton( tooltip: l10n.notesTitle, - icon: const Icon(Icons.edit_note), + icon: IconoFarolero(Icons.edit_note), onPressed: snapshot.roomId == null || widget.jugadoresControlados.isEmpty ? null : () => Navigator.push( diff --git a/lib/pantallas/pantalla_gestor_host.dart b/lib/pantallas/pantalla_gestor_host.dart index 0ffbf41..6b263ed 100644 --- a/lib/pantallas/pantalla_gestor_host.dart +++ b/lib/pantallas/pantalla_gestor_host.dart @@ -163,7 +163,7 @@ class _PantallaGestorHostState extends State { actions: [ IconButton( tooltip: l10n.seeYourWord, - icon: const Icon(Icons.visibility), + icon: IconoFarolero(Icons.visibility), onPressed: partida.fase.index <= FaseJuego.verPalabra.index ? null : () => mostrarRevisionPalabraOnline( @@ -179,7 +179,7 @@ class _PantallaGestorHostState extends State { ), IconButton( tooltip: l10n.notesTitle, - icon: const Icon(Icons.edit_note), + icon: IconoFarolero(Icons.edit_note), onPressed: partida.fase.index < FaseJuego.debate.index || nearby.roomId == null ? null @@ -198,7 +198,7 @@ class _PantallaGestorHostState extends State { ), ), IconButton( - icon: const Icon(Icons.close), + icon: IconoFarolero(Icons.close), onPressed: () async { await nearby.desconectar(); widget.onPartidaFin(); @@ -263,7 +263,7 @@ class _PantallaGestorHostState extends State { children: [ Row( children: [ - const Icon(Icons.link_off, color: TemaApp.colorAcento), + IconoFarolero(Icons.link_off, color: TemaApp.colorAcento), const SizedBox(width: 8), Expanded( child: Text( @@ -583,7 +583,7 @@ class _PantallaGestorHostState extends State { ), child: Row( children: [ - const Icon(Icons.record_voice_over, color: TemaApp.colorNaranja), + IconoFarolero(Icons.record_voice_over, color: TemaApp.colorNaranja), const SizedBox(width: 12), Expanded( child: Text( diff --git a/lib/pantallas/pantalla_lobby_host.dart b/lib/pantallas/pantalla_lobby_host.dart index f2b0b91..82436bb 100644 --- a/lib/pantallas/pantalla_lobby_host.dart +++ b/lib/pantallas/pantalla_lobby_host.dart @@ -40,7 +40,7 @@ class _PantallaLobbyHostState extends State { appBar: AppBar( title: Text(widget.nombreSala), leading: IconButton( - icon: const Icon(Icons.close), + icon: IconoFarolero(Icons.close), onPressed: () async { await nearby.desconectar(); if (context.mounted) Navigator.pop(context); @@ -148,7 +148,7 @@ class _PantallaLobbyHostState extends State { ), IconButton.filledTonal( onPressed: () => _crearNuevoUsuario(context), - icon: const Icon(Icons.person_add), + icon: IconoFarolero(Icons.person_add), ), ], ), @@ -330,19 +330,19 @@ class _PantallaLobbyHostState extends State { if (seleccionadoPorMi) IconButton( tooltip: l10n.release, - icon: const Icon(Icons.close), + icon: IconoFarolero(Icons.close), onPressed: () => nearby.liberarUsuarioSala(usuario.id), ) else if (!seleccionadoPorOtro) IconButton( tooltip: l10n.select, - icon: const Icon(Icons.check_circle_outline), + icon: IconoFarolero(Icons.check_circle_outline), onPressed: () => nearby.seleccionarUsuarioSala(usuario.id), ), if (!usuario.estaSeleccionado) IconButton( tooltip: l10n.delete, - icon: const Icon(Icons.delete_outline, color: TemaApp.colorAcento), + icon: IconoFarolero(Icons.delete_outline, color: TemaApp.colorAcento), onPressed: () => nearby.eliminarUsuarioSala(usuario.id), ), ], @@ -381,7 +381,7 @@ class _PantallaLobbyHostState extends State { textCapitalization: TextCapitalization.words, decoration: InputDecoration( hintText: l10n.yourName, - prefixIcon: const Icon(Icons.person), + prefixIcon: IconoFarolero(Icons.person), ), onSubmitted: (v) => Navigator.pop(ctx, v), ), diff --git a/lib/pantallas/pantalla_notas.dart b/lib/pantallas/pantalla_notas.dart index 5c618fd..774491e 100644 --- a/lib/pantallas/pantalla_notas.dart +++ b/lib/pantallas/pantalla_notas.dart @@ -75,7 +75,7 @@ class _PantallaNotasState extends State { actions: [ if (_jugadorSeleccionadoId != null) IconButton( - icon: const Icon(Icons.save), + icon: IconoFarolero(Icons.save), onPressed: () async { await _guardarNotas(); if (context.mounted) { @@ -129,7 +129,7 @@ class _PantallaNotasState extends State { style: const TextStyle(color: Colors.white)), ), title: Text(j.nombre), - trailing: const Icon(Icons.arrow_forward_ios, size: 16), + trailing: IconoFarolero(Icons.arrow_forward_ios, size: 16), onTap: () { setState(() { _jugadorSeleccionadoId = j.id; @@ -166,7 +166,7 @@ class _PantallaNotasState extends State { Row( children: [ IconButton( - icon: const Icon(Icons.arrow_back), + icon: IconoFarolero(Icons.arrow_back), onPressed: () async { await _guardarNotas(); setState(() { @@ -202,7 +202,7 @@ class _PantallaNotasState extends State { controller: _controladores[j.id], decoration: InputDecoration( labelText: j.nombre, - prefixIcon: const Icon(Icons.person, size: 20), + prefixIcon: IconoFarolero(Icons.person, size: 20), hintText: l10n.playerNoteHint, ), maxLines: 2, @@ -223,7 +223,7 @@ class _PantallaNotasState extends State { controller: _controladorNotaLibre, decoration: InputDecoration( hintText: l10n.freeNoteHint, - prefixIcon: const Icon(Icons.note, size: 20), + prefixIcon: IconoFarolero(Icons.note, size: 20), ), maxLines: 5, minLines: 3, diff --git a/lib/pantallas/pantalla_notas_online.dart b/lib/pantallas/pantalla_notas_online.dart index 21b2517..9b9e8df 100644 --- a/lib/pantallas/pantalla_notas_online.dart +++ b/lib/pantallas/pantalla_notas_online.dart @@ -105,7 +105,7 @@ class _PantallaNotasOnlineState extends State { actions: [ if (_autor != null) IconButton( - icon: const Icon(Icons.save), + icon: IconoFarolero(Icons.save), onPressed: () async { await _guardarNotas(); if (!context.mounted) return; @@ -143,7 +143,7 @@ class _PantallaNotasOnlineState extends State { .map( (autor) => Card( child: ListTile( - leading: const Icon(Icons.edit_note), + leading: IconoFarolero(Icons.edit_note), title: Text(autor.nombre), onTap: () => _seleccionarAutor(autor), ), @@ -173,7 +173,7 @@ class _PantallaNotasOnlineState extends State { children: [ if (widget.autoresControlados.length > 1) IconButton( - icon: const Icon(Icons.arrow_back), + icon: IconoFarolero(Icons.arrow_back), onPressed: () async { await _guardarNotas(); if (!mounted) return; @@ -205,7 +205,7 @@ class _PantallaNotasOnlineState extends State { controller: _controladores[jugador.id], decoration: InputDecoration( labelText: jugador.nombre, - prefixIcon: const Icon(Icons.person, size: 20), + prefixIcon: IconoFarolero(Icons.person, size: 20), hintText: l10n.playerNoteHint, ), maxLines: 2, @@ -225,7 +225,7 @@ class _PantallaNotasOnlineState extends State { controller: _notaLibreController, decoration: InputDecoration( hintText: l10n.freeNoteHint, - prefixIcon: const Icon(Icons.note, size: 20), + prefixIcon: IconoFarolero(Icons.note, size: 20), ), maxLines: 5, minLines: 3, diff --git a/lib/pantallas/pantalla_palabra_cliente.dart b/lib/pantallas/pantalla_palabra_cliente.dart index 086881f..7502ad5 100644 --- a/lib/pantallas/pantalla_palabra_cliente.dart +++ b/lib/pantallas/pantalla_palabra_cliente.dart @@ -134,7 +134,7 @@ class _PantallaPalabraClienteState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(Icons.lightbulb, color: TemaApp.colorAcento), + IconoFarolero(Icons.lightbulb, color: TemaApp.colorAcento), const SizedBox(width: 8), Flexible( child: Text( diff --git a/lib/pantallas/pantalla_principal.dart b/lib/pantallas/pantalla_principal.dart index 43e475e..ea75562 100644 --- a/lib/pantallas/pantalla_principal.dart +++ b/lib/pantallas/pantalla_principal.dart @@ -261,7 +261,7 @@ class _PerfilInicioPremium extends StatelessWidget { foregroundColor: TemaApp.colorDorado, side: BorderSide(color: TemaApp.colorDorado.withValues(alpha: 0.44)), ), - icon: const Icon(Icons.settings_rounded), + icon: IconoFarolero(Icons.settings_rounded), ), ], ), @@ -506,7 +506,7 @@ class _AccesoHistorialPremium extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(Icons.history_rounded, color: TemaApp.colorNaranja), + IconoFarolero(Icons.history_rounded, color: TemaApp.colorNaranja), const SizedBox(width: 10), Text( etiqueta.toUpperCase(), diff --git a/lib/pantallas/pantalla_resultado_online.dart b/lib/pantallas/pantalla_resultado_online.dart index 1824fa0..6df5c60 100644 --- a/lib/pantallas/pantalla_resultado_online.dart +++ b/lib/pantallas/pantalla_resultado_online.dart @@ -191,7 +191,7 @@ class _PantallaResultadoOnlineState extends State { List _acciones(BuildContext context, AppLocalizations l10n) => [ IconButton( tooltip: l10n.seeYourWord, - icon: const Icon(Icons.visibility), + icon: IconoFarolero(Icons.visibility), onPressed: widget.jugadoresControlados.isEmpty ? null : () => mostrarRevisionPalabraOnline( @@ -202,7 +202,7 @@ class _PantallaResultadoOnlineState extends State { ), IconButton( tooltip: l10n.notesTitle, - icon: const Icon(Icons.edit_note), + icon: IconoFarolero(Icons.edit_note), onPressed: _snapshot.roomId == null || widget.jugadoresControlados.isEmpty ? null : () => Navigator.push( diff --git a/lib/pantallas/pantalla_seleccion_modo_juego.dart b/lib/pantallas/pantalla_seleccion_modo_juego.dart index 078205b..7517f77 100644 --- a/lib/pantallas/pantalla_seleccion_modo_juego.dart +++ b/lib/pantallas/pantalla_seleccion_modo_juego.dart @@ -228,7 +228,7 @@ class _ModoCard extends StatelessWidget { ), ), const SizedBox(width: 8), - Icon(Icons.chevron_right_rounded, color: color, size: 30), + IconoFarolero(Icons.chevron_right_rounded, color: color, size: 30), ], ), ), diff --git a/lib/pantallas/pantalla_unirse.dart b/lib/pantallas/pantalla_unirse.dart index c6dfaa6..e4867d2 100644 --- a/lib/pantallas/pantalla_unirse.dart +++ b/lib/pantallas/pantalla_unirse.dart @@ -467,7 +467,7 @@ class _PantallaUnirseState extends State { controller: _nombreController, decoration: InputDecoration( labelText: l10n.yourName, - prefixIcon: const Icon(Icons.person), + prefixIcon: IconoFarolero(Icons.person), ), validator: (v) { if (v == null || v.trim().isEmpty) return l10n.nameRequired; @@ -509,7 +509,7 @@ class _PantallaUnirseState extends State { appBar: AppBar( title: Text(l10n.joinGameTitle), leading: IconButton( - icon: const Icon(Icons.arrow_back), + icon: IconoFarolero(Icons.arrow_back), onPressed: () async { await nearby.pararBusqueda(); setState(() { @@ -667,7 +667,7 @@ class _PantallaUnirseState extends State { appBar: AppBar( title: Text(l10n.scanQR), leading: IconButton( - icon: const Icon(Icons.arrow_back), + icon: IconoFarolero(Icons.arrow_back), onPressed: () => setState(() => _escaneandoQR = false), ), ), @@ -714,7 +714,7 @@ class _PantallaUnirseState extends State { appBar: AppBar( title: Text(_salaSeleccionada ?? l10n.joinGameTitle), leading: IconButton( - icon: const Icon(Icons.close), + icon: IconoFarolero(Icons.close), onPressed: () async { final nearby = context.read(); await nearby.desconectar(); @@ -792,7 +792,7 @@ class _PantallaUnirseState extends State { // Si no hay usuarios, permitir crear uno OutlinedButton.icon( onPressed: () => _crearNuevoUsuario(context), - icon: const Icon(Icons.person_add), + icon: IconoFarolero(Icons.person_add), label: Text(l10n.createNewUser), ), ], @@ -823,7 +823,7 @@ class _PantallaUnirseState extends State { textCapitalization: TextCapitalization.words, decoration: InputDecoration( hintText: l10n.yourName, - prefixIcon: const Icon(Icons.person), + prefixIcon: IconoFarolero(Icons.person), ), onSubmitted: (v) => Navigator.pop(ctx, v), ), @@ -902,7 +902,7 @@ class _PantallaUnirseState extends State { ), trailing: seleccionadoPorMi ? IconButton( - icon: const Icon(Icons.close), + icon: IconoFarolero(Icons.close), onPressed: () => nearby.liberarUsuarioSala(usuario.id), ) : null, diff --git a/lib/pantallas/pantalla_ver_palabra.dart b/lib/pantallas/pantalla_ver_palabra.dart index d1514e8..c2104e0 100644 --- a/lib/pantallas/pantalla_ver_palabra.dart +++ b/lib/pantallas/pantalla_ver_palabra.dart @@ -201,7 +201,7 @@ class _PantallaRevelarPalabraState extends State<_PantallaRevelarPalabra> { ) : Column( children: [ - const Icon(Icons.lock, color: TemaApp.colorDorado, size: 52), + IconoFarolero(Icons.lock, color: TemaApp.colorDorado, size: 52), const SizedBox(height: 16), Text( l10n.holdToSeeWord, diff --git a/lib/pantallas/pantalla_votacion_cliente.dart b/lib/pantallas/pantalla_votacion_cliente.dart index 806123d..250559b 100644 --- a/lib/pantallas/pantalla_votacion_cliente.dart +++ b/lib/pantallas/pantalla_votacion_cliente.dart @@ -122,7 +122,7 @@ class _PantallaVotacionClienteState extends State { actions: [ IconButton( tooltip: l10n.seeYourWord, - icon: const Icon(Icons.visibility), + icon: IconoFarolero(Icons.visibility), onPressed: widget.jugadoresControlados.isEmpty ? null : () => mostrarRevisionPalabraOnline( @@ -133,7 +133,7 @@ class _PantallaVotacionClienteState extends State { ), IconButton( tooltip: l10n.notesTitle, - icon: const Icon(Icons.edit_note), + icon: IconoFarolero(Icons.edit_note), onPressed: _puedeAbrirNotas ? () => Navigator.push( context, diff --git a/lib/tema/componentes_farolero.dart b/lib/tema/componentes_farolero.dart index 1f7ba07..0bda716 100644 --- a/lib/tema/componentes_farolero.dart +++ b/lib/tema/componentes_farolero.dart @@ -6,6 +6,126 @@ import 'package:google_fonts/google_fonts.dart'; import '../modelos/gamificacion_usuario.dart'; import 'tema_app.dart'; +class IconoFarolero extends StatelessWidget { + final IconData icono; + final String? assetPath; + final Color? color; + final double size; + + const IconoFarolero( + this.icono, { + super.key, + this.assetPath, + this.color, + this.size = 28, + }); + + static String? assetFor(IconData icono) { + if (icono == Icons.arrow_back) return 'assets/ui/generated/icons/nav_back.webp'; + if (icono == Icons.close) return 'assets/ui/generated/icons/nav_close.webp'; + if (icono == Icons.check || + icono == Icons.check_circle || + icono == Icons.check_circle_outline) { + return 'assets/ui/generated/icons/status_check.webp'; + } + if (icono == Icons.arrow_forward || + icono == Icons.arrow_forward_ios || + icono == Icons.chevron_right_rounded || + icono == Icons.skip_next) { + return 'assets/ui/generated/icons/nav_forward.webp'; + } + if (icono == Icons.home) return 'assets/ui/generated/icons/nav_home.webp'; + if (icono == Icons.replay) return 'assets/ui/generated/icons/action_replay.webp'; + if (icono == Icons.save) return 'assets/ui/generated/icons/action_save.webp'; + if (icono == Icons.delete_outline) return 'assets/ui/generated/icons/action_delete.webp'; + if (icono == Icons.lock) return 'assets/ui/generated/icons/status_lock.webp'; + if (icono == Icons.key) return 'assets/ui/generated/icons/status_key.webp'; + if (icono == Icons.visibility) return 'assets/ui/generated/icons/action_reveal_eye.webp'; + if (icono == Icons.visibility_off) return 'assets/ui/generated/icons/action_hide_eye.webp'; + if (icono == Icons.add || + icono == Icons.add_circle_outline || + icono == Icons.person_add || + icono == Icons.person_add_alt_1) { + return 'assets/ui/generated/icons/control_plus.webp'; + } + if (icono == Icons.remove_circle_outline) return 'assets/ui/generated/icons/control_minus.webp'; + if (icono == Icons.cancel || icono == Icons.person_off) { + return 'assets/ui/generated/icons/status_cancel.webp'; + } + if (icono == Icons.link_off) return 'assets/ui/generated/icons/status_disconnected.webp'; + if (icono == Icons.search || + icono == Icons.person_search || + icono == Icons.gps_fixed) { + return 'assets/ui/generated/actions/action_join_search.webp'; + } + if (icono == Icons.how_to_vote) return 'assets/ui/generated/actions/action_vote_mask.webp'; + if (icono == Icons.edit_note || icono == Icons.note) { + return 'assets/ui/generated/actions/action_notes_quill.webp'; + } + if (icono == Icons.theater_comedy || + icono == Icons.theater_comedy_rounded || + icono == Icons.psychology) { + return 'assets/ui/generated/actions/action_impostor_mask.webp'; + } + if (icono == Icons.emoji_events || + icono == Icons.celebration || + icono == Icons.bar_chart) { + return 'assets/ui/generated/actions/action_result_trophy.webp'; + } + if (icono == Icons.forum || + icono == Icons.chat_bubble || + icono == Icons.record_voice_over) { + return 'assets/ui/generated/actions/action_rules_book.webp'; + } + if (icono == Icons.person || + icono == Icons.groups || + icono == Icons.groups_rounded) { + return 'assets/ui/generated/actions/action_players_group.webp'; + } + if (icono == Icons.devices || + icono == Icons.devices_rounded || + icono == Icons.phone_android || + icono == Icons.phone_android_rounded) { + return 'assets/ui/generated/actions/action_mobile_device.webp'; + } + if (icono == Icons.wifi_tethering || + icono == Icons.bluetooth_searching || + icono == Icons.radar || + icono == Icons.sync) { + return 'assets/ui/generated/actions/action_multidevice_signal.webp'; + } + if (icono == Icons.qr_code_scanner) return 'assets/ui/generated/actions/action_qr_scan.webp'; + if (icono == Icons.history_rounded) return 'assets/ui/generated/actions/action_history_ledger.webp'; + if (icono == Icons.menu_book_rounded || icono == Icons.lightbulb) { + return 'assets/ui/generated/actions/action_rules_book.webp'; + } + if (icono == Icons.hourglass_bottom || icono == Icons.hourglass_empty) { + return 'assets/ui/generated/actions/action_timer_hourglass.webp'; + } + if (icono == Icons.play_arrow || icono == Icons.play_arrow_rounded) { + return 'assets/ui/generated/actions/action_create_game.webp'; + } + return null; + } + + @override + Widget build(BuildContext context) { + final resolved = assetPath ?? assetFor(icono); + if (resolved == null) { + return Icon(icono, color: color, size: size); + } + return Image.asset( + resolved, + width: size, + height: size, + fit: BoxFit.contain, + filterQuality: FilterQuality.medium, + errorBuilder: (context, error, stackTrace) => + Icon(icono, color: color, size: size), + ); + } +} + class FondoFarolero extends StatelessWidget { final Widget child; final bool intenso; @@ -120,16 +240,15 @@ class EncabezadoFarolero extends StatelessWidget { ), ], ), - 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, - ), - ), + child: Padding( + padding: const EdgeInsets.all(6), + child: IconoFarolero( + icono, + assetPath: assetIconPath, + color: color, + size: 30, + ), + ), ), const SizedBox(width: 14), Expanded( @@ -192,13 +311,12 @@ class EstadoVacioFarolero extends StatelessWidget { SizedBox( width: 64, height: 64, - child: assetIconPath == null - ? Icon(icono, color: TemaApp.colorNaranja, size: 46) - : Image.asset( - assetIconPath!, - fit: BoxFit.contain, - filterQuality: FilterQuality.medium, - ), + child: IconoFarolero( + icono, + assetPath: assetIconPath, + color: TemaApp.colorNaranja, + size: 58, + ), ), const SizedBox(height: 14), Text( @@ -230,7 +348,7 @@ class LogoFarolero extends StatelessWidget { children: [ Positioned( top: 0, - child: Icon( + child: IconoFarolero( Icons.lightbulb, color: TemaApp.colorDorado.withValues(alpha: 0.32), size: size * 0.82, @@ -331,13 +449,12 @@ class BotonFarolero extends StatelessWidget { SizedBox( width: 44, height: 40, - child: assetIconPath == null - ? Icon(icono, color: colorTexto, size: 30) - : Image.asset( - assetIconPath!, - fit: BoxFit.contain, - filterQuality: FilterQuality.medium, - ), + child: IconoFarolero( + icono, + assetPath: assetIconPath, + color: colorTexto, + size: 38, + ), ), const SizedBox(width: 10), Expanded( @@ -413,16 +530,15 @@ class TarjetaFaseFarolero extends StatelessWidget { ), border: Border.all(color: color.withValues(alpha: 0.72)), ), - 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, - ), - ), + child: Padding( + padding: const EdgeInsets.all(6), + child: IconoFarolero( + icono, + assetPath: assetIconPath, + color: color, + size: 30, + ), + ), ), const SizedBox(width: 14), Expanded( @@ -511,16 +627,15 @@ class EstadoJugadorFarolero extends StatelessWidget { color: color.withValues(alpha: 0.16), border: Border.all(color: color.withValues(alpha: 0.72)), ), - 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, - ), - ), + child: Padding( + padding: const EdgeInsets.all(5), + child: IconoFarolero( + icono, + assetPath: assetIconPath, + color: color, + size: 26, + ), + ), ), const SizedBox(width: 12), Expanded( @@ -549,9 +664,10 @@ class EstadoJugadorFarolero extends StatelessWidget { ], ), ), - Icon( + IconoFarolero( completado ? Icons.check_circle : Icons.hourglass_bottom, color: completado ? TemaApp.colorVerde : TemaApp.colorTextoSecundario, + size: 28, ), ], ), @@ -878,7 +994,7 @@ class AccesoFarolero extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon(icono, color: TemaApp.colorNaranja, size: 22), + IconoFarolero(icono, color: TemaApp.colorNaranja, size: 24), const SizedBox(height: 5), Text( etiqueta.toUpperCase(), diff --git a/lib/tema/componentes_resultado_farolero.dart b/lib/tema/componentes_resultado_farolero.dart index c1f98ed..8f9211c 100644 --- a/lib/tema/componentes_resultado_farolero.dart +++ b/lib/tema/componentes_resultado_farolero.dart @@ -8,6 +8,7 @@ import '../modelos/gamificacion_usuario.dart'; import '../modelos/jugador.dart'; import '../modelos/partida.dart'; import 'tema_app.dart'; +import 'componentes_farolero.dart'; class ResultadoRondaFarolero extends StatelessWidget { final ResultadoVotacion resultado; @@ -122,7 +123,7 @@ class DetalleVotosFarolero extends StatelessWidget { children: [ Row( children: [ - const Icon(Icons.bar_chart, color: TemaApp.colorNaranja), + IconoFarolero(Icons.bar_chart, color: TemaApp.colorNaranja), const SizedBox(width: 8), Expanded( child: Text( @@ -804,7 +805,7 @@ class TarjetaImpostoresPremium extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(Icons.theater_comedy, color: TemaApp.colorAcento), + IconoFarolero(Icons.theater_comedy, color: TemaApp.colorAcento), const SizedBox(width: 8), Flexible( child: Text( diff --git a/pubspec.yaml b/pubspec.yaml index 2aa12e9..10eadf4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -48,3 +48,4 @@ flutter: - assets/ui/generated/gameplay/ - assets/ui/generated/meta/ - assets/ui/generated/actions/ + - assets/ui/generated/icons/