当前位置:网站首页>The way that flutter makes the keyboard disappear (forwarding from the dependent window)
The way that flutter makes the keyboard disappear (forwarding from the dependent window)
2022-06-25 09:43:00 【Moon Spring】
Link to the original text : Forwarding self dependent window
In general , Add a gesture to the outermost layer , Click execute :
FocusScope.of(context).requestFocus(FocusNode());
Two general cases , If it's in H5 page , One more layer of interaction , At this time, the above method does not take effect , Then try the following method , It should be noted that , Here we need to follow H5 Interact , need H5 call Flutter Layer method ,
H5 call Flutter The method of requires the following settings :
WebView(
javascriptChannels: <JavascriptChannel>[
_hideKeyboardJavascriptChannel(context)
].toSet(),
)
JavascriptChannel _hideKeyboardJavascriptChannel(BuildContext context) {
return JavascriptChannel(
name: " This is with H5 Interactively customized Channel name ",
onMessageReceived: (JavascriptMessage message) {
SystemChannels.textInput.invokeMethod('TextInput.hide');
});
}
边栏推荐
- 力扣-104. 二叉树的最大深度
- Lvs-dr mode single network segment case
- [competition -kab micro entrepreneurship competition] KAB National College Students' micro entrepreneurship action participation experience sharing (including the idea of writing the application form)
- Etcd教程 — 第四章 Etcd集群安全配置
- 测试开发工程师
- How to make a self-made installer and package the program to generate an installer
- CYCA少儿形体礼仪 乐清市培训成果考核圆满落幕
- How do dating applets make millions a year? What is the profit model?
- x86电脑上下载debian的arm64的包
- Summarize two methods of configuring pytorch GPU environment
猜你喜欢
汇付国际为跨境电商赋能:做合规的跨境支付平台!
C语言刷题随记 —— 猴子吃桃
Applet cloud development joint table data query and application in cloud function
[zufe school competition] difficulty classification and competition suggestions of common competitions in the school (taking Zhejiang University of Finance and economics as an example)
Solution to the problem of repeated startup of esp8266
CYCA 2022少儿形体礼仪初级师资班 深圳总部站圆满结束
Format analysis and explanation of wav file
Etcd教程 — 第四章 Etcd集群安全配置
Wechat official account can reply messages normally, but it still prompts that the service provided by the official account has failed. Please try again later
使用Navicat对比多环境数据库数据差异和结构差异,以及自动DML和DDL脚本
随机推荐
Download the arm64 package of Debian on X86 computer
Processing picture class library
汇付国际为跨境电商赋能:做合规的跨境支付平台!
Arduino bootloader burning summary
手机办理长城证券开户靠谱安全吗?
Notes on writing questions in C language -- monkeys eat peaches
Question B of the East China Cup: how to establish a population immune barrier against novel coronavirus?
可穿戴设备或将会泄露个人隐私
Applet cloud development joint table data query and application in cloud function
《JVM》对象内存分配的TLAB机制与G1中的TLAB流程
Atguigu---18-component
How to "transform" small and micro businesses (II)?
Cassava tree disease recognition based on vgg16 image classification
[MySQL learning notes 22] index
Neat Syntax Design of an ETL Language (Part 2)
Simple waterfall effect
x86电脑上下载debian的arm64的包
Study on correlation of pumpkin price and design of price prediction model based on BP neural network
Etcd教程 — 第四章 Etcd集群安全配置
CYCA少儿形体礼仪 乐清市培训成果考核圆满落幕