From faa4c369569a3d1e5b1a47aa7fedd046508e5d15 Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 16 Nov 2023 23:08:09 +0800 Subject: [PATCH 1/2] fix, android_soft_keyboard_input, maybe flutter 3.13.* Signed-off-by: fufesou --- flutter/lib/mobile/pages/remote_page.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flutter/lib/mobile/pages/remote_page.dart b/flutter/lib/mobile/pages/remote_page.dart index 05bf433fe..485b6a2fd 100644 --- a/flutter/lib/mobile/pages/remote_page.dart +++ b/flutter/lib/mobile/pages/remote_page.dart @@ -448,7 +448,8 @@ class _RemotePageState extends State { height: 0, child: !_showEdit ? Container() - : TextFormField( + : Container( + child: TextFormField( textInputAction: TextInputAction.newline, autocorrect: false, enableSuggestions: false, @@ -459,7 +460,7 @@ class _RemotePageState extends State { // trick way to make backspace work always keyboardType: TextInputType.multiline, onChanged: handleSoftKeyboardInput, - ), + )), ), ]; if (showCursorPaint) { From 722c789448b0c8bfcb4f48d7c9216763b8871028 Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 16 Nov 2023 23:39:07 +0800 Subject: [PATCH 2/2] add comment Signed-off-by: fufesou --- flutter/lib/mobile/pages/remote_page.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flutter/lib/mobile/pages/remote_page.dart b/flutter/lib/mobile/pages/remote_page.dart index 485b6a2fd..89a59edaf 100644 --- a/flutter/lib/mobile/pages/remote_page.dart +++ b/flutter/lib/mobile/pages/remote_page.dart @@ -448,6 +448,9 @@ class _RemotePageState extends State { height: 0, child: !_showEdit ? Container() + // A container wrapper is needed here on some android devices for flutter 3.13.9, otherwise the focusNode will not work. + // But for flutter 3.10.*, the container wrapper is not needed. + // It maybe the flutter compatibility issue. : Container( child: TextFormField( textInputAction: TextInputAction.newline,