WU15 shipped PantallaGrabaciones (the recordings library: storage bar, recording rows, the "..." Rename/Share/Delete menu) fully tested but reachable from nowhere in the app - a gap flagged in WU15's own apply-progress notes, not fixed there since it needed a design decision rather than a guess. Coordinator ruling applied: the approved mockup's "Ajustes > Grabaciones" screen depicts the library, not the folder/size settings form. So the GRABACIONES Y MUSICA group's "Grabaciones" row in pantalla_ajustes.dart now opens PantallaGrabaciones instead of PantallaAjustesGrabaciones. The settings form is not dropped - it stays reachable, now from within the library via a settings icon in its PluriPushScaffold actions, matching the existing pantalla_ajustes_timer_sueno.dart "Add" action precedent for a real capability living in the header. One new ARB key (en/es only, per precedent): recordingsLibrarySettingsTooltip. Tests: 604 -> 605 (one scenario re-targeted in pantalla_ajustes_test.dart, one new scenario in pantalla_grabaciones_test.dart, which needed the same ListTile-ink-assertion suppression helper WU3a/WU3b established since it now pushes a ListTile-bearing settings screen). flutter analyze unchanged at 1 pre-existing info. Recorded in tasks.md as WU15b - not part of the original 18-unit plan, added here to close the gap WU15 flagged.
204 lines
6.8 KiB
Dart
204 lines
6.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../l10n/gen/app_localizations.dart';
|
|
import '../widgets/pluri_icon.dart';
|
|
import '../widgets/pluri_layout.dart';
|
|
import '../widgets/pluri_premium_widgets.dart';
|
|
import '../widgets/pluri_push_scaffold.dart';
|
|
import 'ajustes/pantalla_ajustes_backup.dart';
|
|
import 'ajustes/pantalla_ajustes_ecualizador.dart';
|
|
import 'ajustes/pantalla_ajustes_emisora_preferida.dart';
|
|
import 'ajustes/pantalla_ajustes_emisoras_personalizadas.dart';
|
|
import 'ajustes/pantalla_ajustes_grupos_favoritos.dart';
|
|
import 'ajustes/pantalla_ajustes_idioma.dart';
|
|
import 'ajustes/pantalla_ajustes_info.dart';
|
|
import 'ajustes/pantalla_ajustes_musica_local.dart';
|
|
import 'ajustes/pantalla_ajustes_orden_listas.dart';
|
|
import 'ajustes/pantalla_ajustes_salida_audio.dart';
|
|
import 'ajustes/pantalla_ajustes_timer_sueno.dart';
|
|
import 'ajustes/widgets/fila_ajuste.dart';
|
|
import 'pantalla_grabaciones.dart';
|
|
|
|
class PantallaAjustes extends StatelessWidget {
|
|
const PantallaAjustes({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final l10n = AppLocalizations.of(context);
|
|
|
|
return ListView(
|
|
padding: PluriLayout.pageListPadding,
|
|
children: [
|
|
PluriScreenHeader(
|
|
title: l10n.settingsTitle,
|
|
subtitle: l10n.settingsSubtitle,
|
|
glyph: PluriIconGlyph.settings,
|
|
trailing: PluriStatusPill(
|
|
icon: Icons.security_rounded,
|
|
label: l10n.settingsSafeStatus,
|
|
),
|
|
),
|
|
const Padding(
|
|
padding: PluriLayout.pageContentPadding,
|
|
child: _AjustesContent(),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|
|
/// Design ADR-3: the Settings root is grouped nav rows only — each
|
|
/// [FilaAjuste] pushes its own detail screen via `PluriPushScaffold.push`,
|
|
/// carrying zero inline controls. All 12 sections are now decomposed across
|
|
/// WU3a (AUDIO, EMISORAS) and WU3b (GRABACIONES Y MÚSICA, APLICACIÓN); sleep
|
|
/// timer and backup/restore stay reachable throughout — nothing was dropped.
|
|
class _AjustesContent extends StatelessWidget {
|
|
const _AjustesContent();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final l10n = AppLocalizations.of(context);
|
|
|
|
return Column(
|
|
children: [
|
|
GrupoAjustes(
|
|
titulo: l10n.settingsGroupAudioTitle,
|
|
filas: [
|
|
FilaAjuste(
|
|
icon: Icons.equalizer_rounded,
|
|
titulo: l10n.equalizerTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesEcualizador(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.devices_rounded,
|
|
titulo: l10n.advancedEqSectionTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesSalidaAudio(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.bedtime_rounded,
|
|
titulo: l10n.timerSectionTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesTimerSueno(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 12),
|
|
GrupoAjustes(
|
|
titulo: l10n.settingsGroupStationsTitle,
|
|
filas: [
|
|
FilaAjuste(
|
|
icon: Icons.playlist_add_check_circle_rounded,
|
|
titulo: l10n.favoriteGroupsTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesGruposFavoritos(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.radio_rounded,
|
|
titulo: l10n.preferredStationTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesEmisoraPreferida(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.add_circle_outline_rounded,
|
|
titulo: l10n.customStationsTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesEmisorasPersonalizadas(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.sort_rounded,
|
|
titulo: l10n.stationOrderTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesOrdenListas(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 12),
|
|
GrupoAjustes(
|
|
titulo: l10n.settingsGroupRecordingsTitle,
|
|
filas: [
|
|
FilaAjuste(
|
|
icon: Icons.radio_button_checked_rounded,
|
|
titulo: l10n.recordingsSectionTitle,
|
|
// WU15b: this row opens the recordings LIBRARY
|
|
// (PantallaGrabaciones), matching the approved mockup's
|
|
// "Ajustes > Grabaciones" screen. The folder/size settings
|
|
// form (PantallaAjustesGrabaciones) is still reachable, but
|
|
// now from within the library via its own settings action.
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaGrabaciones(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.library_music_outlined,
|
|
titulo: l10n.localMusicSectionTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesMusicaLocal(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 12),
|
|
GrupoAjustes(
|
|
titulo: l10n.settingsGroupApplicationTitle,
|
|
filas: [
|
|
FilaAjuste(
|
|
icon: Icons.language_rounded,
|
|
titulo: l10n.languageSectionTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesIdioma(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.backup_outlined,
|
|
titulo: l10n.backupSectionTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesBackup(),
|
|
),
|
|
),
|
|
FilaAjuste(
|
|
icon: Icons.info_outline_rounded,
|
|
titulo: l10n.infoSectionTitle,
|
|
onTap:
|
|
() => PluriPushScaffold.push(
|
|
context,
|
|
(_) => const PantallaAjustesInfo(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|