dialog back;menu long press
This commit is contained in:
parent
a3a93600cd
commit
f5160b60b6
@ -16,7 +16,6 @@ Future<Null> main() async {
|
|||||||
await a;
|
await a;
|
||||||
await b;
|
await b;
|
||||||
refreshCurrentUser();
|
refreshCurrentUser();
|
||||||
// EasyLoading.instance.loadingStyle = EasyLoadingStyle.light;
|
|
||||||
toAndroidChannelInit();
|
toAndroidChannelInit();
|
||||||
runApp(App());
|
runApp(App());
|
||||||
}
|
}
|
||||||
@ -33,26 +32,24 @@ class App extends StatelessWidget {
|
|||||||
ChangeNotifierProvider.value(value: FFI.canvasModel),
|
ChangeNotifierProvider.value(value: FFI.canvasModel),
|
||||||
],
|
],
|
||||||
child: MaterialApp(
|
child: MaterialApp(
|
||||||
navigatorKey: globalKey,
|
navigatorKey: globalKey,
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
title: 'RustDesk',
|
title: 'RustDesk',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: Colors.blue,
|
primarySwatch: Colors.blue,
|
||||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||||
),
|
),
|
||||||
home: !isAndroid ? WebHomePage() : HomePage(),
|
home: !isAndroid ? WebHomePage() : HomePage(),
|
||||||
navigatorObservers: [
|
navigatorObservers: [
|
||||||
FirebaseAnalyticsObserver(analytics: analytics),
|
FirebaseAnalyticsObserver(analytics: analytics),
|
||||||
FlutterSmartDialog.observer
|
FlutterSmartDialog.observer
|
||||||
],
|
],
|
||||||
builder: isAndroid
|
builder: FlutterSmartDialog.init(
|
||||||
? (_, child) {
|
builder: isAndroid
|
||||||
return AccessibilityListener(
|
? (_, child) => AccessibilityListener(
|
||||||
child: FlutterSmartDialog(child: child),
|
child: child,
|
||||||
);
|
)
|
||||||
}
|
: null)),
|
||||||
: FlutterSmartDialog.init(),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,17 +206,13 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
width: width,
|
width: width,
|
||||||
child: Card(
|
child: Card(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => {
|
onTap: !isDesktop ? () => connect('${p.id}') : null,
|
||||||
if (!isDesktop) {connect('${p.id}')}
|
onDoubleTap: isDesktop ? () => connect('${p.id}') : null,
|
||||||
},
|
|
||||||
onDoubleTap: () => {
|
|
||||||
if (isDesktop) {connect('${p.id}')}
|
|
||||||
},
|
|
||||||
onLongPressStart: (details) {
|
onLongPressStart: (details) {
|
||||||
var x = details.globalPosition.dx;
|
final x = details.globalPosition.dx;
|
||||||
var y = details.globalPosition.dy;
|
final y = details.globalPosition.dy;
|
||||||
this._menuPos = RelativeRect.fromLTRB(x, y, x, y);
|
_menuPos = RelativeRect.fromLTRB(x, y, x, y);
|
||||||
this.showPeerMenu(context, p.id);
|
showPeerMenu(context, p.id);
|
||||||
},
|
},
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
contentPadding: const EdgeInsets.only(left: 12),
|
contentPadding: const EdgeInsets.only(left: 12),
|
||||||
@ -231,11 +227,10 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
child: Icon(Icons.more_vert)),
|
child: Icon(Icons.more_vert)),
|
||||||
onTapDown: (e) {
|
onTapDown: (e) {
|
||||||
var x = e.globalPosition.dx;
|
final x = e.globalPosition.dx;
|
||||||
var y = e.globalPosition.dy;
|
final y = e.globalPosition.dy;
|
||||||
this._menuPos = RelativeRect.fromLTRB(x, y, x, y);
|
_menuPos = RelativeRect.fromLTRB(x, y, x, y);
|
||||||
},
|
},
|
||||||
onDoubleTap: () {},
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showPeerMenu(context, p.id);
|
showPeerMenu(context, p.id);
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user