Files
pluriwave/lib/widgets/pluri_wave_scaffold.dart
T
FreeTLab 202bef3539 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
2026-06-11 23:42:16 +02:00

111 lines
2.9 KiB
Dart

import 'package:flutter/material.dart';
import '../tema/pluriwave_theme.dart';
import '../tema/pluriwave_tokens.dart';
class PluriWaveScaffold extends StatelessWidget {
const PluriWaveScaffold({
super.key,
required this.body,
this.appBar,
this.bottomNavigationBar,
this.floatingActionButton,
});
final PreferredSizeWidget? appBar;
final Widget body;
final Widget? bottomNavigationBar;
final Widget? floatingActionButton;
@override
Widget build(BuildContext context) {
final t = context.pluriTokens;
return Scaffold(
backgroundColor: t.deepViolet,
appBar: appBar,
bottomNavigationBar: bottomNavigationBar,
floatingActionButton: floatingActionButton,
extendBody: false,
body: DecoratedBox(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
t.deepViolet,
Theme.of(context).colorScheme.surface,
PluriWaveTokens.auroraTeal,
t.deepViolet,
],
stops: const [0, 0.34, 0.68, 1],
),
),
child: Stack(
fit: StackFit.expand,
children: [
Positioned(
left: -120,
top: -120,
child: _AuroraOrb(
size: 300,
color: t.electricMagenta.withValues(alpha: 0.18),
),
),
Positioned(
right: -150,
top: 160,
child: _AuroraOrb(
size: 340,
color: Theme.of(
context,
).colorScheme.secondary.withValues(alpha: 0.12),
),
),
Positioned(
left: -90,
bottom: 80,
child: _AuroraOrb(
size: 260,
color: t.warmCoral.withValues(alpha: 0.10),
),
),
Positioned.fill(
child: IgnorePointer(
child: Opacity(
opacity: 0.055,
child: Image.asset(
'assets/images/noise_soft.png',
fit: BoxFit.cover,
errorBuilder: (_, __, ___) => const SizedBox.shrink(),
),
),
),
),
body,
],
),
),
);
}
}
class _AuroraOrb extends StatelessWidget {
const _AuroraOrb({required this.size, required this.color});
final double size;
final Color color;
@override
Widget build(BuildContext context) {
return IgnorePointer(
child: Container(
width: size,
height: size,
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: RadialGradient(colors: [color, color.withValues(alpha: 0)]),
),
),
);
}
}