Moves the AUDIO group (Ecualizador, Salida de audio, Temporizador de
sueno) and the EMISORAS group (Grupos de favoritos, Emisora preferida,
Emisoras personalizadas, Orden de listas) out of pantalla_ajustes.dart
into 7 new lib/pantallas/ajustes/*.dart screens, each wrapped in
PluriPushScaffold. The root now reaches them through FilaAjuste rows
under two new GrupoAjustes cards (lib/pantallas/ajustes/widgets/
fila_ajuste.dart), per design ADR-3.
Verbatim-move rule applied throughout: only each section's panel header
(icon + title, sometimes a status chip) was removed, since the pushed
screen's own 56px header now carries the title. Two sections whose
header row carried a real action (Temporizador de sueno's "Add",
Grupos de favoritos' "Add list", Emisoras personalizadas' "Add") kept
that action in the body instead of dropping it.
size:exception (move-only diff, pre-recorded at design/tasks time):
34 files, ~4250 changed lines excluding the 13 auto-regenerated l10n
files (~90 more lines there) - higher than the 800-1000 estimate
because that estimate covered the 7 production screens but not the
matching 7 new test files (task 3a.2), one of which relocates ~10
pre-existing device-management test cases verbatim. Business logic is
untouched; app.dart's import of pantalla_ajustes.dart is unchanged.
Correction to tasks.md 3a.1/3a.8: those two lines describe the combined
WU3a+WU3b end state ("4 grouped nav lists", "<400 lines"), matching
design ADR-3's own aggregate blast-radius note - not a WU3a-only claim.
This commit converts only the 2 groups that are WU3a's job; the root
is 788 lines with 5 sections (Grabaciones, Musica local, Idioma,
Backup, Info) still inline, reachable, and unchanged, pending WU3b.
Two new ARB keys (settingsGroupAudioTitle, settingsGroupStationsTitle),
en/es only per the WU1 precedent - all 7 detail-screen titles reuse
existing keys. Discovered and worked around, without touching app
code: Directory.systemTemp hangs real dart:io writes in this sandbox,
and pumpAndSettle() cannot settle while a screen shows an indeterminate
CircularProgressIndicator - both are test-only concerns, documented
inline where hit.
Tests: 560 -> 579 (32 in this commit's scope, net +19 after retiring
13 relocated cases from the old combined pantalla_ajustes_test.dart).
flutter analyze: unchanged at 1 pre-existing info. git diff is empty
for navegacion_auto.dart, servicio_ecualizador.dart and
servicio_audio.dart; pantalla_alarma_sonando_dismiss_guard_test.dart
untouched.
68 lines
2.2 KiB
Dart
68 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../tema/pluriwave_theme.dart';
|
|
import '../../../widgets/pluri_glass_surface.dart';
|
|
|
|
/// Design ADR-3: the two nav-row primitives every Settings detail screen is
|
|
/// reached through. [GrupoAjustes] is a single [PluriGlassSurface] card
|
|
/// carrying a [PluriWaveTypography.eyebrowLabel] group heading and a list of
|
|
/// [FilaAjuste] rows, each pushing its detail screen via
|
|
/// `PluriPushScaffold.push`. Neither primitive owns any business logic or
|
|
/// provider read — they are pure navigation chrome, which is what keeps the
|
|
/// Settings root down to "grouped nav rows only".
|
|
class GrupoAjustes extends StatelessWidget {
|
|
const GrupoAjustes({super.key, required this.titulo, required this.filas});
|
|
|
|
/// Group heading, styled with [PluriWaveTypography.eyebrowLabel]. Authored
|
|
/// already in its display form — this style never applies `toUpperCase()`.
|
|
final String titulo;
|
|
|
|
final List<FilaAjuste> filas;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final type = context.pluriType;
|
|
return PluriGlassSurface(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(titulo, style: type.eyebrowLabel),
|
|
const SizedBox(height: 4),
|
|
for (var i = 0; i < filas.length; i++) ...[
|
|
if (i > 0) const Divider(height: 1),
|
|
filas[i],
|
|
],
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// A single Settings navigation row: icon, title, and a trailing chevron.
|
|
/// Tapping it is the row's only behaviour — it carries no switches, sliders
|
|
/// or text fields, which is what "zero inline controls" means at the root.
|
|
class FilaAjuste extends StatelessWidget {
|
|
const FilaAjuste({
|
|
super.key,
|
|
required this.icon,
|
|
required this.titulo,
|
|
required this.onTap,
|
|
});
|
|
|
|
final IconData icon;
|
|
final String titulo;
|
|
final VoidCallback onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final type = context.pluriType;
|
|
return ListTile(
|
|
contentPadding: EdgeInsets.zero,
|
|
leading: Icon(icon),
|
|
title: Text(titulo, style: type.cardTitle),
|
|
trailing: const Icon(Icons.chevron_right_rounded),
|
|
onTap: onTap,
|
|
);
|
|
}
|
|
}
|