feat(ui): design token discipline, accessibility and i18n pass

- Replace all hardcoded Color literals outside lib/tema with theme tokens (new static brand palette in PluriWaveTokens); media notification uses the brand color instead of the Material default purple
- Favorite button on station cards grows to a 48dp target and becomes an independent semantics node for screen readers (Semantics container fix)
- All flutter_animate call sites route through the PluriAnimate reduced-motion gate (zero direct .animate() left)
- Locale-aware short dates via intl DateFormat (new lib/l10n/formato_fechas.dart) replacing the hardcoded DD/MM/YYYY; proper plural messages for the favorites counter; example stream URL as a localized key - all 13 locales
- Rounded shimmer placeholders matching card radii; shimmer loading state in search instead of a bare spinner; rounded icon variants unified in settings; bottom-sheet conventions on the custom station form
- Fix latent debug crash: vacation editor read AppLocalizations in initState
- 11 new tests (121 total green), flutter analyze clean
This commit is contained in:
2026-06-11 23:42:16 +02:00
parent 52855e75c2
commit 202bef3539
49 changed files with 1108 additions and 175 deletions
+14
View File
@@ -33,6 +33,20 @@ extension PluriAnimate on Widget {
.scaleXY(begin: begin, end: 1, duration: duration, curve: curve);
}
/// Fade + subtle vertical slide entry animation.
Widget pluriFadeSlideIn(
BuildContext context, {
Duration duration = const Duration(milliseconds: 350),
Duration delay = Duration.zero,
Curve curve = Curves.easeOutCubic,
double beginY = 0.1,
}) {
if (_animacionesDeshabilitadas(context)) return this;
return animate(delay: delay)
.fadeIn(duration: duration, curve: curve)
.slideY(begin: beginY, end: 0, duration: duration, curve: curve);
}
bool _animacionesDeshabilitadas(BuildContext context) =>
MediaQuery.maybeDisableAnimationsOf(context) ?? false;
}
+20 -4
View File
@@ -36,9 +36,19 @@ class PluriWaveTokens extends ThemeExtension<PluriWaveTokens> {
final double spacingMd;
final double spacingLg;
/// Brand accent (S5-R8). Same hue as [electricMagenta]; exposed as a
/// static const so const contexts (e.g. AudioServiceConfig) can use it.
static const Color brand = Color(0xFF21D4D9);
/// Secondary palette used by gradients and decorative orbs (S5-R1).
/// These are token DEFINITIONS — the only place raw literals may live.
static const Color brightCyan = Color(0xFF20E6FF);
static const Color auroraTeal = Color(0xFF0E4A4F);
static const Color skyBlue = Color(0xFF60A5FA);
static const dark = PluriWaveTokens(
deepViolet: Color(0xFF07121A),
electricMagenta: Color(0xFF21D4D9),
electricMagenta: brand,
warmCoral: Color(0xFFF4B860),
glassSurface: Color(0x1FFFFFFF),
glassBorder: Color(0x33FFFFFF),
@@ -86,13 +96,19 @@ class PluriWaveTokens extends ThemeExtension<PluriWaveTokens> {
}
@override
PluriWaveTokens lerp(covariant ThemeExtension<PluriWaveTokens>? other, double t) {
PluriWaveTokens lerp(
covariant ThemeExtension<PluriWaveTokens>? other,
double t,
) {
if (other is! PluriWaveTokens) return this;
return PluriWaveTokens(
deepViolet: Color.lerp(deepViolet, other.deepViolet, t) ?? deepViolet,
electricMagenta: Color.lerp(electricMagenta, other.electricMagenta, t) ?? electricMagenta,
electricMagenta:
Color.lerp(electricMagenta, other.electricMagenta, t) ??
electricMagenta,
warmCoral: Color.lerp(warmCoral, other.warmCoral, t) ?? warmCoral,
glassSurface: Color.lerp(glassSurface, other.glassSurface, t) ?? glassSurface,
glassSurface:
Color.lerp(glassSurface, other.glassSurface, t) ?? glassSurface,
glassBorder: Color.lerp(glassBorder, other.glassBorder, t) ?? glassBorder,
glowColor: Color.lerp(glowColor, other.glowColor, t) ?? glowColor,
radiusSm: lerpDouble(radiusSm, other.radiusSm, t) ?? radiusSm,