liyufengrex / flutter_scan_gun

flutter:usb 即插款扫码枪通用方案。(适用各平台,不会触发键盘唤起,不会触发中文乱码)
BSD 3-Clause "New" or "Revised" License
26 stars 9 forks source link

初始化TextInputBinding报错 #9

Open Steven-Yung opened 1 year ago

Steven-Yung commented 1 year ago

按照文档要求,在runAPP之前初始化TextInputBinding();运行APP报错 Flutter环境:Flutter (Channel stable, 3.7.12, on macOS 12.6.5 21G531 darwin-x64, locale zh-Hans-CN) 代码如下:

image

console log:

image
liyufengrex commented 1 year ago

试试把 TextInputBinding(); 放在 if-else 外面,即main方法体内的第一句。