An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
fix avoid chat window keyboard overlap ios
Sahil Yeole71dbf0fab28c
diff --git a/flutter/lib/common/widgets/overlay.dart b/flutter/lib/common/widgets/overlay.dartindex 89a4184db..bae1f7fc0 100644--- a/flutter/lib/common/widgets/overlay.dart+++ b/flutter/lib/common/widgets/overlay.dart@@ -389,28 +389,27 @@ class _IOSDraggableState extends State<IOSDraggable> with WidgetsBindingObserver_chatModel = widget.chatModel;_width = widget.width;_height = widget.height;-- WidgetsBinding.instance?.addObserver(this);}- @override- void dispose() {- WidgetsBinding.instance?.removeObserver(this);- super.dispose();- }-- @override- void didChangeMetrics() {- final currentVisible = MediaQuery.of(context).viewInsets.bottom != 0;+ checkKeyboard() {+ final bottomHeight = MediaQuery.of(context).viewInsets.bottom;+ final currentVisible = bottomHeight != 0;+ // saveif (!_keyboardVisible && currentVisible) {_saveHeight = _position.dy;- } else if (_lastBottomHeight > 0 && !currentVisible) {+ }++ // reset+ if (_lastBottomHeight > 0 && bottomHeight == 0) {setState(() {_position = Offset(_position.dx, _saveHeight);});- } else if (_keyboardVisible && currentVisible) {- final sumHeight = MediaQuery.of(context).viewInsets.bottom + _height;+ }++ // onKeyboardVisible+ if (_keyboardVisible && currentVisible) {+ final sumHeight = bottomHeight + _height;final contextHeight = MediaQuery.of(context).size.height;if (sumHeight + _position.dy > contextHeight) {final y = contextHeight - sumHeight;@@ -421,11 +420,12 @@ class _IOSDraggableState extends State<IOSDraggable> with WidgetsBindingObserver}_keyboardVisible = currentVisible;- _lastBottomHeight = MediaQuery.of(context).viewInsets.bottom;+ _lastBottomHeight = bottomHeight;}@overrideWidget build(BuildContext context) {+ checkKeyboard();return Stack(children: [Positioned(