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 { static invokeMethod(String method,[ dynamic arguments ]) async {
if (!isAndroid) return Future<bool>(() => false);
return await toAndroidChannel.invokeMethod(method,arguments); return await toAndroidChannel.invokeMethod(method,arguments);
} }
} }

View File

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

View File

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