feat(ui): add generated premium assets
This commit is contained in:
@@ -293,25 +293,48 @@ class _TarjetaEmisoraState extends State<TarjetaEmisora> {
|
||||
}
|
||||
|
||||
Widget _iconoFallback(double size) {
|
||||
final t = context.pluriTokens;
|
||||
return DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [t.deepViolet, t.electricMagenta.withValues(alpha: 0.8)],
|
||||
final art = _fallbackArtFor(widget.emisora.uuid);
|
||||
return Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Image.asset(
|
||||
art,
|
||||
fit: BoxFit.cover,
|
||||
errorBuilder: (_, __, ___) => DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
context.pluriTokens.deepViolet,
|
||||
context.pluriTokens.electricMagenta.withValues(alpha: 0.8),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: PluriIcon(
|
||||
glyph: PluriIconGlyph.player,
|
||||
variant: PluriIconVariant.filled,
|
||||
size: size,
|
||||
semanticLabel: 'Icono de emisora',
|
||||
Center(
|
||||
child: PluriIcon(
|
||||
glyph: PluriIconGlyph.player,
|
||||
variant: PluriIconVariant.activeGlow,
|
||||
size: size,
|
||||
semanticLabel: 'Icono de emisora',
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
String _fallbackArtFor(String seed) {
|
||||
const arts = [
|
||||
'assets/images/station_art_aurora.png',
|
||||
'assets/images/station_art_cosmic.png',
|
||||
'assets/images/station_art_pulse.png',
|
||||
'assets/images/station_art_nova.png',
|
||||
];
|
||||
final index = seed.codeUnits.fold<int>(0, (a, b) => a + b) % arts.length;
|
||||
return arts[index];
|
||||
}
|
||||
}
|
||||
|
||||
class _LiveBadge extends StatelessWidget {
|
||||
|
||||
Reference in New Issue
Block a user