fix for iOS

This commit is contained in:
rustdesk 2022-04-18 11:46:36 +08:00
parent a348ba3d7e
commit cbc25547ba
3 changed files with 46 additions and 43 deletions

View File

@ -124,6 +124,7 @@ class PlatformFFI {
}
static invokeMethod(String method,[ dynamic arguments ]) async {
if (!isAndroid) return Future<bool>(() => false);
return await toAndroidChannel.invokeMethod(method,arguments);
}
}

View File

@ -244,48 +244,50 @@ class _ChatWindowOverlayState extends State<ChatWindowOverlay> {
left: _o.dx,
width: widget.windowWidth,
height: widget.windowHeight,
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: CustomAppBar(
onPanUpdate: (d) => changeOffset(d.delta),
appBar: Container(
color: MyTheme.accent50,
height: 50,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 15),
child: Text(
translate("Chat"),
style: TextStyle(
color: Colors.white,
fontFamily: 'WorkSans',
fontWeight: FontWeight.bold,
fontSize: 20),
)),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(
onPressed: () {
hideChatWindowOverlay();
},
icon: Icon(Icons.keyboard_arrow_down)),
IconButton(
onPressed: () {
hideChatWindowOverlay();
hideChatIconOverlay();
},
icon: Icon(Icons.close))
],
)
],
),
),
),
body: chatPage,
));
child: isIOS
? chatPage
: Scaffold(
resizeToAvoidBottomInset: false,
appBar: CustomAppBar(
onPanUpdate: (d) => changeOffset(d.delta),
appBar: Container(
color: MyTheme.accent50,
height: 50,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 15),
child: Text(
translate("Chat"),
style: TextStyle(
color: Colors.white,
fontFamily: 'WorkSans',
fontWeight: FontWeight.bold,
fontSize: 20),
)),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(
onPressed: () {
hideChatWindowOverlay();
},
icon: Icon(Icons.keyboard_arrow_down)),
IconButton(
onPressed: () {
hideChatWindowOverlay();
hideChatIconOverlay();
},
icon: Icon(Icons.close))
],
)
],
),
),
),
body: chatPage,
));
}
}

View File

@ -20,7 +20,7 @@ class ConnectionPage extends StatefulWidget implements PageShape {
final title = translate("Connection");
@override
final appBarActions = isWeb ? <Widget>[WebMenu()] : <Widget>[];
final appBarActions = !isAndroid ? <Widget>[WebMenu()] : <Widget>[];
@override
final scrollController = ScrollController();