fix(favoritos): stop the header padding from doubling up
Issue 3 (feedback-pruebas): ReorderableListView.padding wrapped header/rows/footer with a single horizontal value (16), which doubled up on top of PluriRootHeader's own internal inset -- landing the title at 36px instead of the 20px every other root uses -- while also applying card-tier padding to the flat FilaEmisoraPlana rows (row tier, matching the same widget's fix on Buscar) and leaving the populated-state top gap at an unwired 4 that didn't match this same screen's own empty state (0) or the footer CTA's prototype value (8). Zeroes the list-level padding and gives the header, chip strip, rows, and footer CTA their own correctly-tiered insets instead.
This commit is contained in:
@@ -174,12 +174,18 @@ class _PantallaFavoritosState extends State<PantallaFavoritos> {
|
||||
|
||||
return ReorderableListView(
|
||||
buildDefaultDragHandles: false,
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
PluriLayout.horizontal,
|
||||
4,
|
||||
PluriLayout.horizontal,
|
||||
PluriLayout.bottomChromeInset,
|
||||
),
|
||||
// Issue 3 (feedback-pruebas): zero horizontal here, matching every
|
||||
// other root's PluriLayout.pageListPadding convention (Alarmas,
|
||||
// Ajustes, and this screen's OWN empty-state branch above).
|
||||
// ReorderableListView.padding wraps header/children/footer UNIFORMLY,
|
||||
// so a single horizontal value here can never be simultaneously right
|
||||
// for PluriRootHeader (self-padded, wants none), the reorderable rows
|
||||
// (want row tier, applied per item below) and the footer CTA (wants
|
||||
// card tier, applied on the footer's own Padding below). The previous
|
||||
// `PluriLayout.horizontal` doubled up on top of PluriRootHeader's own
|
||||
// internal inset, pushing "Favorites" in by 36px instead of the 20px
|
||||
// every other root uses for its title.
|
||||
padding: const EdgeInsets.only(bottom: PluriLayout.bottomChromeInset),
|
||||
header: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12),
|
||||
child: Column(
|
||||
@@ -224,17 +230,39 @@ class _PantallaFavoritosState extends State<PantallaFavoritos> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_FilaChipsGrupos(
|
||||
grupos: gruposVisibles,
|
||||
favoritos: favoritos,
|
||||
seleccionado: seleccionEfectiva,
|
||||
onSeleccionar: (id) => setState(() => _grupoSeleccionadoId = id),
|
||||
// Issue 3 (feedback-pruebas): t4:218 draws this chip strip at
|
||||
// title-tier (20px) horizontal inset, directly on the page
|
||||
// background -- it now needs its OWN inset since the list's
|
||||
// padding no longer supplies one.
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: PluriLayout.titleHorizontal,
|
||||
),
|
||||
child: _FilaChipsGrupos(
|
||||
grupos: gruposVisibles,
|
||||
favoritos: favoritos,
|
||||
seleccionado: seleccionEfectiva,
|
||||
onSeleccionar:
|
||||
(id) => setState(() => _grupoSeleccionadoId = id),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
footer: Padding(
|
||||
padding: const EdgeInsets.only(top: 4),
|
||||
// Issue 3 (feedback-pruebas): card tier (16, matching every other
|
||||
// screen's dashed CTA) now that the list's own padding no longer
|
||||
// supplies it, plus t4:234's 8px gap above the CTA
|
||||
// (PluriLayout.compactGap) instead of the previous unwired literal
|
||||
// 4 -- the ONLY state of this screen with a nonzero top gap before
|
||||
// its own content used a value that matched neither this screen's
|
||||
// own empty-state branch nor the prototype.
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
PluriLayout.horizontal,
|
||||
PluriLayout.compactGap,
|
||||
PluriLayout.horizontal,
|
||||
0,
|
||||
),
|
||||
child: _CtaEmisoraPersonalizada(
|
||||
onTap: _abrirFormularioEmisoraPersonalizada,
|
||||
),
|
||||
@@ -244,14 +272,24 @@ class _PantallaFavoritosState extends State<PantallaFavoritos> {
|
||||
_onReorder(filtrados, favoritos, oldIndex, newIndex),
|
||||
children: [
|
||||
for (var i = 0; i < filtrados.length; i++)
|
||||
_FilaFavorito(
|
||||
// Issue 3 (feedback-pruebas): row tier (12), not card tier -- the
|
||||
// key moves to this wrapper (ReorderableListView identifies each
|
||||
// child by its own top-level key) since FilaEmisoraPlana rows are
|
||||
// documented (audit 4.3) as flat, background-less rows, the same
|
||||
// tier Buscar's results list already uses for the same widget.
|
||||
Padding(
|
||||
key: ValueKey(filtrados[i].uuid),
|
||||
index: i,
|
||||
emisora: filtrados[i],
|
||||
grupos: gruposVisibles,
|
||||
grupoActual: gruposVisibles.firstWhere(
|
||||
(g) => g.id == filtrados[i].grupoFavoritosId,
|
||||
orElse: () => gruposVisibles.first,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: PluriLayout.rowHorizontal,
|
||||
),
|
||||
child: _FilaFavorito(
|
||||
index: i,
|
||||
emisora: filtrados[i],
|
||||
grupos: gruposVisibles,
|
||||
grupoActual: gruposVisibles.firstWhere(
|
||||
(g) => g.id == filtrados[i].grupoFavoritosId,
|
||||
orElse: () => gruposVisibles.first,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -343,7 +381,6 @@ class _FilaChipsGrupos extends StatelessWidget {
|
||||
|
||||
class _FilaFavorito extends StatelessWidget {
|
||||
const _FilaFavorito({
|
||||
super.key,
|
||||
required this.index,
|
||||
required this.emisora,
|
||||
required this.grupos,
|
||||
|
||||
Reference in New Issue
Block a user