fix(widgets): share station-art fallback across every surface
TarjetaEmisora had the only good fallback for a station with no artwork -- a deterministic pick from 4 bundled illustrations with a gradient/glyph last resort. FilaEmisoraPlana's flat rows, the Escuchar hero, the "Tus emisoras" grid cell, the mini player and the full player each had their own, separate, flat primaryContainer square instead. Extract the good fallback into PluriStationArtFallback and use it from every one of those call sites. The selection formula (asset order, codeUnits-sum modulo) is preserved exactly, since navegacion_auto.dart mirrors the same formula independently for Android Auto's own drawable rotation.
This commit is contained in:
@@ -10,6 +10,7 @@ import '../modelos/emisora.dart';
|
||||
import '../pantallas/pantalla_reproductor.dart';
|
||||
import '../servicios/servicio_audio.dart';
|
||||
import '../tema/pluriwave_theme.dart';
|
||||
import 'pluri_station_art_fallback.dart';
|
||||
|
||||
/// Barra inferior persistente con controles básicos de reproducción.
|
||||
/// Toca la barra para abrir PantallaReproductor completa.
|
||||
@@ -318,9 +319,9 @@ class _ArteMiniReproductor extends StatelessWidget {
|
||||
imageUrl: emisora.favicon!,
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (_, __) => _shimmer(theme),
|
||||
errorWidget: (_, __, ___) => _iconoFallback(theme),
|
||||
errorWidget: (_, __, ___) => _iconoFallback(),
|
||||
)
|
||||
: _iconoFallback(theme),
|
||||
: _iconoFallback(),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -331,12 +332,9 @@ class _ArteMiniReproductor extends StatelessWidget {
|
||||
child: Container(color: theme.colorScheme.surfaceContainerHighest),
|
||||
);
|
||||
|
||||
Widget _iconoFallback(ThemeData theme) => Container(
|
||||
color: theme.colorScheme.primaryContainer,
|
||||
child: Icon(
|
||||
Icons.radio_rounded,
|
||||
size: 20,
|
||||
color: theme.colorScheme.onPrimaryContainer,
|
||||
),
|
||||
);
|
||||
// Issue 6 (feedback-pruebas): was a flat `primaryContainer` square with a
|
||||
// bare `radio_rounded` icon — now the same shared fallback every other
|
||||
// surface uses.
|
||||
Widget _iconoFallback() =>
|
||||
PluriStationArtFallback(seed: emisora.uuid, iconSize: 20);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user