uso de imágenes y eliminación de innecesarias
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user