From b81ecdf31851728d6820681589ca6c1575dc938d Mon Sep 17 00:00:00 2001 From: open-trade Date: Sat, 28 Nov 2020 15:56:25 +0800 Subject: [PATCH] not sure if fix first image and clipboard/keyboard issue --- flutter_hbb/lib/remote_page.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flutter_hbb/lib/remote_page.dart b/flutter_hbb/lib/remote_page.dart index 73c022f88..595a91930 100644 --- a/flutter_hbb/lib/remote_page.dart +++ b/flutter_hbb/lib/remote_page.dart @@ -41,6 +41,7 @@ class _RemotePageState extends State { @override void initState() { super.initState(); + _value = ' ' * 1000; FFI.connect(widget.id); WidgetsBinding.instance.addPostFrameCallback((_) { SystemChrome.setEnabledSystemUIOverlays([]); @@ -55,9 +56,9 @@ class _RemotePageState extends State { void dispose() { _focusNode.dispose(); super.dispose(); - FFI.close(); _interval.cancel(); _timer?.cancel(); + FFI.close(); dismissLoading(); SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); Wakelock.disable(); @@ -163,9 +164,9 @@ class _RemotePageState extends State { _timer = Timer(Duration(milliseconds: 30), () { SystemChrome.setEnabledSystemUIOverlays( SystemUiOverlay.values); - _focusNode.requestFocus(); SystemChannels.textInput .invokeMethod('TextInput.show'); + _focusNode.requestFocus(); }); }); }),