Add right-click support to routing sheet path history rows

This commit is contained in:
Eric Poulsen
2026-06-13 19:46:00 -07:00
parent a1e6f6967c
commit 1c183d7e67
+11 -1
View File
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../connector/meshcore_connector.dart'; import '../connector/meshcore_connector.dart';
import '../utils/platform_info.dart';
import '../helpers/path_helper.dart'; import '../helpers/path_helper.dart';
import '../l10n/l10n.dart'; import '../l10n/l10n.dart';
import '../models/contact.dart'; import '../models/contact.dart';
@@ -534,7 +535,15 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
l10n.routing_deliveryCounts(record.successCount, record.failureCount), l10n.routing_deliveryCounts(record.successCount, record.failureCount),
]; ];
return Card( return Listener(
onPointerDown: PlatformInfo.isDesktop && hasBytes
? (event) {
if (event.buttons == 2) {
_showPathDetail(context, connector, contact, record.pathBytes);
}
}
: null,
child: Card(
margin: const EdgeInsets.symmetric(vertical: 4), margin: const EdgeInsets.symmetric(vertical: 4),
child: ListTile( child: ListTile(
enabled: hasBytes, enabled: hasBytes,
@@ -585,6 +594,7 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
_showPathDetail(context, connector, contact, record.pathBytes) _showPathDetail(context, connector, contact, record.pathBytes)
: null, : null,
), ),
),
); );
} }