diff --git a/lib/pantallas/pantalla_bienvenida.dart b/lib/pantallas/pantalla_bienvenida.dart index 9a83e62..8b0ae01 100644 --- a/lib/pantallas/pantalla_bienvenida.dart +++ b/lib/pantallas/pantalla_bienvenida.dart @@ -71,17 +71,23 @@ class PantallaBienvenida extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Image.asset( - 'assets/icons/pluriwave_app_mark.png', - key: const ValueKey('welcome-logo'), - width: 76, - height: 76, - errorBuilder: - (_, __, ___) => Icon( - Icons.graphic_eq_rounded, - size: 76, - color: t.electricMagenta, - ), + // Audit 14.8 (t4 line 693): the prototype clips + // its logo mark to a 20px rounded rect; the build + // used to paint it square. + ClipRRect( + borderRadius: BorderRadius.circular(20), + child: Image.asset( + 'assets/icons/pluriwave_app_mark.png', + key: const ValueKey('welcome-logo'), + width: 76, + height: 76, + errorBuilder: + (_, __, ___) => Icon( + Icons.graphic_eq_rounded, + size: 76, + color: t.electricMagenta, + ), + ), ), const SizedBox(height: 22), Text( @@ -95,7 +101,10 @@ class PantallaBienvenida extends StatelessWidget { const SizedBox(height: 12), Text( l10n.welcomeBody, + // Audit 14.4 (t4 line 697): 14.5px, not + // bodyMedium's 14. style: theme.textTheme.bodyMedium?.copyWith( + fontSize: 14.5, color: theme.colorScheme.onSurface.withValues( alpha: 0.72, ), @@ -109,14 +118,16 @@ class PantallaBienvenida extends StatelessWidget { titulo: l10n.welcomeBullet1Title, subtitulo: l10n.welcomeBullet1Subtitle, ), - const SizedBox(height: 16), + // Audit 14.6 (t4 line 701): 12px between bullets, + // not 16. + const SizedBox(height: 12), FilaCaracteristicaBienvenida( icon: Icons.directions_car_rounded, iconColor: t.liveGreen, titulo: l10n.welcomeBullet2Title, subtitulo: l10n.welcomeBullet2Subtitle, ), - const SizedBox(height: 16), + const SizedBox(height: 12), FilaCaracteristicaBienvenida( icon: Icons.alarm_rounded, iconColor: t.warmCoral, @@ -196,13 +207,18 @@ class FilaCaracteristicaBienvenida extends StatelessWidget { children: [ Text( titulo, + // Audit 14.5 (t4 line 700): 13.5px/w800, not bodyMedium's + // 14/w800. style: theme.textTheme.bodyMedium?.copyWith( + fontSize: 13.5, fontWeight: FontWeight.w800, ), ), Text( subtitulo, + // Audit 14.5 (t4 line 700): 11.5px, not bodySmall's 12. style: theme.textTheme.bodySmall?.copyWith( + fontSize: 11.5, color: theme.colorScheme.onSurface.withValues(alpha: 0.58), ), ), diff --git a/test/pantallas/pantalla_bienvenida_test.dart b/test/pantallas/pantalla_bienvenida_test.dart index 1bbaa3d..2605f69 100644 --- a/test/pantallas/pantalla_bienvenida_test.dart +++ b/test/pantallas/pantalla_bienvenida_test.dart @@ -65,6 +65,74 @@ void main() { }, ); + testWidgets( + 'visual fidelity (audit 14.4/14.5): body copy is 14.5px, bullet titles ' + 'are 13.5px/w800, bullet subtitles are 11.5px (t4 lines 697/700-702)', + (tester) async { + final navegacion = EstadoNavegacionRaiz(); + addTearDown(navegacion.dispose); + + await tester.pumpWidget(_app(navegacion: navegacion)); + await tester.pumpAndSettle(); + + final l10n = lookupAppLocalizations(const Locale('es')); + + final body = tester.widget( + find.textContaining('53.412 emisoras de 238 paĆ­ses'), + ); + expect(body.style?.fontSize, 14.5); + + final tituloBullet = tester.widget( + find.text(l10n.welcomeBullet1Title), + ); + expect(tituloBullet.style?.fontSize, 13.5); + expect(tituloBullet.style?.fontWeight, FontWeight.w800); + + final subtituloBullet = tester.widget( + find.text(l10n.welcomeBullet1Subtitle), + ); + expect(subtituloBullet.style?.fontSize, 11.5); + }, + ); + + testWidgets( + 'visual fidelity (audit 14.6): the 3 feature bullets are spaced 12px ' + 'apart, not 16 (t4 line 701)', + (tester) async { + final navegacion = EstadoNavegacionRaiz(); + addTearDown(navegacion.dispose); + + await tester.pumpWidget(_app(navegacion: navegacion)); + await tester.pumpAndSettle(); + + final bullets = find.byType(FilaCaracteristicaBienvenida); + final gap = + tester.getTopLeft(bullets.at(1)).dy - + tester.getBottomLeft(bullets.at(0)).dy; + expect(gap, 12); + }, + ); + + testWidgets( + 'visual fidelity (audit 14.8): the logo mark is clipped to a 20px ' + 'rounded rect, not painted square (t4 line 693)', + (tester) async { + final navegacion = EstadoNavegacionRaiz(); + addTearDown(navegacion.dispose); + + await tester.pumpWidget(_app(navegacion: navegacion)); + await tester.pumpAndSettle(); + + final clip = tester.widget( + find.ancestor( + of: find.byKey(const ValueKey('welcome-logo')), + matching: find.byType(ClipRRect), + ), + ); + expect(clip.borderRadius, BorderRadius.circular(20)); + }, + ); + testWidgets('rendered content contains no monetization strings', ( tester, ) async {