add timeline
Some checks failed
Release / meta (push) Successful in 9s
Release / linux-build (push) Failing after 6m22s
Release / android-build (push) Failing after 14m39s
Release / release-dev (push) Has been skipped
Release / release-master (push) Has been skipped

This commit is contained in:
2025-12-15 16:02:21 +00:00
parent da70dce369
commit 80c315866f
6 changed files with 745 additions and 1 deletions

View File

@@ -574,6 +574,12 @@ class _TractionPageState extends State<TractionPage> {
icon: const Icon(Icons.info_outline),
label: const Text('Details'),
),
const SizedBox(width: 8),
TextButton.icon(
onPressed: () => _openTimeline(loco),
icon: const Icon(Icons.timeline),
label: const Text('Timeline'),
),
const Spacer(),
if (widget.selectionMode)
TextButton.icon(
@@ -692,6 +698,14 @@ class _TractionPageState extends State<TractionPage> {
return (background, foreground);
}
void _openTimeline(LocoSummary loco) {
final label = '${loco.locoClass} ${loco.number}'.trim();
context.push(
'/traction/${loco.id}/timeline',
extra: {'label': label},
);
}
Future<void> _showLocoInfo(LocoSummary loco) async {
await showModalBottomSheet(
context: context,