fix(alarma-sonando): restyle Stop as a neutral translucent surface
Audit 9.11 (t4 line 434): the Stop button was a FilledButton in colorScheme.primary (brand cyan), the wrong colour family for the largest element on the ringing screen. The prototype draws a neutral rgba(255,255,255,.08) surface with a rgba(255,255,255,.16) border and radius 24 (none of PluriWaveTokens' three named radii).
This commit is contained in:
@@ -283,9 +283,22 @@ class _PantallaAlarmaSonandoState extends State<PantallaAlarmaSonando> {
|
|||||||
child: FilledButton.icon(
|
child: FilledButton.icon(
|
||||||
key: const ValueKey('ringing-stop-button'),
|
key: const ValueKey('ringing-stop-button'),
|
||||||
style: FilledButton.styleFrom(
|
style: FilledButton.styleFrom(
|
||||||
|
// Audit 9.11 (t4 line 434): the prototype's Stop is a
|
||||||
|
// NEUTRAL translucent surface — not the brand cyan
|
||||||
|
// `colorScheme.primary` this used to render in. It is
|
||||||
|
// the largest element on a full-screen surface, so
|
||||||
|
// the wrong colour family was maximally visible.
|
||||||
|
backgroundColor: Colors.white.withValues(alpha: 0.08),
|
||||||
|
foregroundColor:
|
||||||
|
Theme.of(context).colorScheme.onSurface,
|
||||||
|
side: BorderSide(
|
||||||
|
color: Colors.white.withValues(alpha: 0.16),
|
||||||
|
),
|
||||||
minimumSize: const Size.fromHeight(76),
|
minimumSize: const Size.fromHeight(76),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(tokens.radiusLg),
|
borderRadius: BorderRadius.circular(
|
||||||
|
_stopButtonRadius,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: _detener,
|
onPressed: _detener,
|
||||||
@@ -341,6 +354,12 @@ class _PantallaAlarmaSonandoState extends State<PantallaAlarmaSonando> {
|
|||||||
String _hora(AlarmaMusical alarma) =>
|
String _hora(AlarmaMusical alarma) =>
|
||||||
'${alarma.hora.toString().padLeft(2, '0')}:${alarma.minuto.toString().padLeft(2, '0')}';
|
'${alarma.hora.toString().padLeft(2, '0')}:${alarma.minuto.toString().padLeft(2, '0')}';
|
||||||
|
|
||||||
|
/// Audit 9.11 (t4 line 434): the Stop button's radius — doesn't match any of
|
||||||
|
/// [PluriWaveTokens]'s three named radii (14/18/30), so it stays a local
|
||||||
|
/// constant here rather than growing the shared token surface for a single
|
||||||
|
/// call site (mirrors `_ArteEscuchar._radio` in `pantalla_inicio.dart`).
|
||||||
|
const _stopButtonRadius = 24.0;
|
||||||
|
|
||||||
/// Full-bleed blurred backdrop (WU11, replaces the `PluriGlassSurface` card
|
/// Full-bleed blurred backdrop (WU11, replaces the `PluriGlassSurface` card
|
||||||
/// container per task 11.3). This app has no per-station artwork/favicon
|
/// container per task 11.3). This app has no per-station artwork/favicon
|
||||||
/// safe to render here: `Emisora.favicon` is a network URL, and rendering
|
/// safe to render here: `Emisora.favicon` is a network URL, and rendering
|
||||||
|
|||||||
@@ -235,6 +235,53 @@ void main() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
group('visual fidelity (audit 9.11, proto t4 line 434): Detener es una '
|
||||||
|
'superficie neutra translucida, no cian', () {
|
||||||
|
testWidgets(
|
||||||
|
'fondo blanco 8%, borde blanco 16%, radio 24 — no colorScheme.primary/'
|
||||||
|
'radiusLg',
|
||||||
|
(tester) async {
|
||||||
|
await _montarPantalla(tester);
|
||||||
|
|
||||||
|
final elemento = find.byKey(const ValueKey('ringing-stop-button'));
|
||||||
|
final boton = tester.widget<FilledButton>(elemento);
|
||||||
|
final contexto = tester.element(elemento);
|
||||||
|
final primary = Theme.of(contexto).colorScheme.primary;
|
||||||
|
|
||||||
|
final fondo = boton.style?.backgroundColor?.resolve(<WidgetState>{});
|
||||||
|
final borde = boton.style?.side?.resolve(<WidgetState>{});
|
||||||
|
final forma =
|
||||||
|
boton.style?.shape?.resolve(<WidgetState>{})
|
||||||
|
as RoundedRectangleBorder?;
|
||||||
|
|
||||||
|
expect(
|
||||||
|
fondo,
|
||||||
|
Colors.white.withValues(alpha: 0.08),
|
||||||
|
reason:
|
||||||
|
'prototype t4 line 434: rgba(255,255,255,.08) — a neutral '
|
||||||
|
'translucent surface',
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
fondo,
|
||||||
|
isNot(primary),
|
||||||
|
reason:
|
||||||
|
'the largest element on a full-screen surface must not stay '
|
||||||
|
'the brand cyan colorScheme.primary (PluriWaveTokens.brand)',
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
borde?.color,
|
||||||
|
Colors.white.withValues(alpha: 0.16),
|
||||||
|
reason: 'prototype t4 line 434 border: rgba(255,255,255,.16)',
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
forma?.borderRadius,
|
||||||
|
BorderRadius.circular(24),
|
||||||
|
reason: 'prototype t4 line 434: radius 24 (was radiusLg — 30)',
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
group('WU11 — estado estatico de subida de volumen (resolucion 4, sin '
|
group('WU11 — estado estatico de subida de volumen (resolucion 4, sin '
|
||||||
'contador en vivo)', () {
|
'contador en vivo)', () {
|
||||||
testWidgets(
|
testWidgets(
|
||||||
|
|||||||
Reference in New Issue
Block a user