fix(inicio): render Tus emisoras as a 2-column grid of 8

Audit 1.10 (t4 lines 82-88): the prototype shows a 2x2+ grid of 8
favorite stations; the build was a 260px-wide horizontal strip capped
at 6.

Raises the cap to 8 and replaces the horizontal ListView with a
GridView.builder (2 columns, gap 10). Adds a dedicated _CeldaTusEmisoras
cell (44px square art radius 11, name + genre) rather than reusing
TarjetaEmisora(esCompacta: true), since that widget always renders a
favorite button and a live badge that this prototype cell never draws.
This commit is contained in:
2026-07-30 00:10:11 +02:00
parent fcba592352
commit a49b2b6519
2 changed files with 184 additions and 19 deletions
+50
View File
@@ -125,6 +125,56 @@ void main() {
);
});
testWidgets(
'visual fidelity (audit 1.10): Tus emisoras is a 2-column grid showing '
'up to 8 stations, not a 6-capped horizontal strip',
(tester) async {
_setLargeSurfaceSize(tester);
final favoritos = FakeServicioFavoritos();
final estado = EstadoRadio(
audio: FakeServicioAudio(),
favoritos: favoritos,
radio: FakeServicioRadio(),
servicioEcualizador: FakeServicioEcualizador(),
servicioGrabacion: FakeServicioGrabacionRadio(),
resolverArchivoCustom: _archivoCustomVacio,
iniciarAutomaticamente: false,
);
addTearDown(estado.dispose);
await tester.runAsync(estado.inicializar);
for (var i = 0; i < 8; i++) {
await favoritos.agregar(
emisoraDemo(uuid: 'grid-$i', nombre: 'Grid Estacion $i'),
);
}
await estado.cargarFavoritos();
await tester.pumpWidget(
_conProviders(estado, _testApp(const PantallaInicio())),
);
await _pumpStableFrame(tester);
for (var i = 0; i < 8; i++) {
expect(
find.text('Grid Estacion $i'),
findsOneWidget,
reason:
'prototype t4 lines 82-88: a grid of 8, the old strip capped '
'at 6',
);
}
final grid = tester.widget<GridView>(find.byType(GridView));
final delegate =
grid.gridDelegate as SliverGridDelegateWithFixedCrossAxisCount;
expect(
delegate.crossAxisCount,
2,
reason: 'prototype t4 line 82: grid-template-columns:1fr 1fr',
);
},
);
testWidgets('visual fidelity (audit 1.3): the hero art is 132 square', (
tester,
) async {