feat(app): register the saved-schedule list under Settings at /schedules

This commit is contained in:
2026-10-22 10:16:45 +01:00
parent dc9faeb018
commit 2139e21041
9 changed files with 233 additions and 3 deletions
@@ -0,0 +1,47 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'settings_keys.dart';
import 'settings_theme.dart';
/// The Settings entry to the saved-schedule list.
///
/// The row only opens the route; the list's own controller performs the single
/// `list_schedules` read, exactly like the Templates entry.
const String settingsSchedulesLabel = 'Browse schedules';
const String settingsSchedulesSecondary =
'Saved run configurations for every pipeline.';
class SettingsSchedulesSection extends StatelessWidget {
const SettingsSchedulesSection({super.key, required this.onOpen});
final VoidCallback onOpen;
@override
Widget build(BuildContext context) {
if (usesCupertinoControls(context)) {
return CupertinoListSection.insetGrouped(
margin: EdgeInsets.zero,
children: <Widget>[
CupertinoListTile(
key: SettingsKeys.schedules,
title: const Text(settingsSchedulesLabel),
subtitle: const Text(settingsSchedulesSecondary),
trailing: const CupertinoListTileChevron(),
onTap: onOpen,
),
],
);
}
return Card(
margin: EdgeInsets.zero,
child: ListTile(
key: SettingsKeys.schedules,
title: const Text(settingsSchedulesLabel),
subtitle: const Text(settingsSchedulesSecondary),
trailing: const Icon(Icons.chevron_right),
onTap: onOpen,
),
);
}
}