mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-03 07:20:57 +10:00
Prefer GestureDetector over Listener for right-click in routing sheet
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
@@ -536,14 +535,10 @@ class _RoutingSheetBodyState extends State<_RoutingSheetBody> {
|
|||||||
l10n.routing_deliveryCounts(record.successCount, record.failureCount),
|
l10n.routing_deliveryCounts(record.successCount, record.failureCount),
|
||||||
];
|
];
|
||||||
|
|
||||||
return Listener(
|
return GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onPointerDown: PlatformInfo.isDesktop && hasBytes
|
onSecondaryTapUp: PlatformInfo.isDesktop && hasBytes
|
||||||
? (event) {
|
? (_) => _showPathDetail(context, connector, contact, record.pathBytes)
|
||||||
if (event.buttons & kSecondaryMouseButton != 0) {
|
|
||||||
_showPathDetail(context, connector, contact, record.pathBytes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: null,
|
: null,
|
||||||
child: Card(
|
child: Card(
|
||||||
margin: const EdgeInsets.symmetric(vertical: 4),
|
margin: const EdgeInsets.symmetric(vertical: 4),
|
||||||
|
|||||||
Reference in New Issue
Block a user