change showActions to pop
This commit is contained in:
parent
434850ed0d
commit
7f9826a710
@ -153,23 +153,6 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
body: GestureDetector(
|
body: GestureDetector(
|
||||||
onLongPressStart: (details) {
|
|
||||||
var x = details.globalPosition.dx;
|
|
||||||
var y = details.globalPosition.dy;
|
|
||||||
print('long press');
|
|
||||||
() async {
|
|
||||||
var value = await showMenu(
|
|
||||||
context: context,
|
|
||||||
position:
|
|
||||||
RelativeRect.fromLTRB(x + 20, y + 20, x + 20, y + 20),
|
|
||||||
items: [
|
|
||||||
PopupMenuItem<String>(child: Text('Test'), value: 'mode'),
|
|
||||||
],
|
|
||||||
elevation: 8.0,
|
|
||||||
);
|
|
||||||
if (value == 'mode') {}
|
|
||||||
}();
|
|
||||||
},
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FFI.tap();
|
FFI.tap();
|
||||||
},
|
},
|
||||||
@ -421,28 +404,25 @@ void showOptions(BuildContext context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showActions(BuildContext context) {
|
void showActions(BuildContext context) {
|
||||||
showAlertDialog(
|
final size = MediaQueryData.fromWindow(ui.window).size;
|
||||||
context,
|
final x = 150.0;
|
||||||
(setState) => Tuple3(
|
final y = size.height;
|
||||||
null,
|
() async {
|
||||||
Column(mainAxisSize: MainAxisSize.min, children: [
|
var value = await showMenu(
|
||||||
ListTile(
|
context: context,
|
||||||
onTap: () {
|
position: RelativeRect.fromLTRB(x, y, x, y),
|
||||||
Navigator.pop(context);
|
items: [
|
||||||
|
PopupMenuItem<String>(
|
||||||
|
child: Text('Insert Ctrl + Alt + Del'), value: 'cad'),
|
||||||
|
PopupMenuItem<String>(child: Text('Insert Lock'), value: 'lock'),
|
||||||
|
],
|
||||||
|
elevation: 8.0,
|
||||||
|
);
|
||||||
|
if (value == 'cad') {
|
||||||
FFI.setByName('ctrl_alt_del');
|
FFI.setByName('ctrl_alt_del');
|
||||||
},
|
}
|
||||||
title: Text('Insert Ctrl + Alt + Del'),
|
if (value == 'lock') {
|
||||||
),
|
FFI.setByName('lock_screen');
|
||||||
ListTile(
|
}
|
||||||
onTap: () {
|
}();
|
||||||
Navigator.pop(context);
|
|
||||||
FFI.setByName('lock_screen');
|
|
||||||
},
|
|
||||||
title: Text('Insert Lock'),
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
null),
|
|
||||||
() async => true,
|
|
||||||
true,
|
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user