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:
@@ -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 '
|
||||
'contador en vivo)', () {
|
||||
testWidgets(
|
||||
|
||||
Reference in New Issue
Block a user