add loco legs panel
Some checks failed
Release / meta (push) Failing after 9s
Release / android-build (push) Has been skipped
Release / linux-build (push) Has been skipped
Release / release-dev (push) Has been skipped
Release / release-master (push) Has been skipped

This commit is contained in:
2025-12-17 14:42:31 +00:00
parent fa9773bcd1
commit e9a9e66e39
7 changed files with 389 additions and 160 deletions

View File

@@ -9,6 +9,7 @@ class TractionCard extends StatelessWidget {
required this.isSelected,
required this.onShowInfo,
required this.onOpenTimeline,
this.onOpenLegs,
this.onToggleSelect,
});
@@ -17,6 +18,7 @@ class TractionCard extends StatelessWidget {
final bool isSelected;
final VoidCallback onShowInfo;
final VoidCallback onOpenTimeline;
final VoidCallback? onOpenLegs;
final VoidCallback? onToggleSelect;
@override
@@ -93,6 +95,14 @@ class TractionCard extends StatelessWidget {
icon: const Icon(Icons.timeline),
label: const Text('Timeline'),
),
if (hasMileageOrTrips && onOpenLegs != null) ...[
const SizedBox(width: 8),
TextButton.icon(
onPressed: onOpenLegs,
icon: const Icon(Icons.view_list),
label: const Text('Legs'),
),
],
const Spacer(),
if (selectionMode && onToggleSelect != null)
TextButton.icon(