android - Flutter Android App 挂起,同时在 TextField 中输入点(。)
问题描述
我有一个非常简单的适用于 Android 的 Flutter App,有以下课程。应用程序挂起,只要我在 TextField 中键入一个点字符,然后是文本。
例如:文卡塔。
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
TextEditingController emailIdController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: TextField(
autofocus: false,
keyboardType: TextInputType.emailAddress,
decoration: InputDecoration(
prefixIcon: Icon(Icons.email),
hintText: "Email Address",
labelText: 'Email Address',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(50),
)),
controller: emailIdController,
),
)
)
);
}
}
我正在使用带有最新固件的三星 m10s 手机。它运行的是 Android 9.0 版。对于此手机上安装的其他应用程序,未出现此类问题。所以,我认为 TextField 使用中的一些问题或 Flutter SDK 中的问题。
这是 Flutter 版本信息
Flutter 1.15.22-pre.32 • channel master • https://github.com/flutter/flutter.git
Framework • revision fd8b65e1bd (10 days ago) • 2020-03-15 23:26:01 -0400
Engine • revision 3e02f3bec9
Tools • Dart 2.8.0 (build 2.8.0-dev.14.0 eff5548a68)
VS Code 终端开始连续打印错误。粘贴在前几行错误的下方。感谢,如果我能得到任何解决问题的建议。
D/ViewRootImpl@eb77dbe[MainActivity]( 1753): ViewPostIme pointer 0
D/ViewRootImpl@eb77dbe[MainActivity]( 1753): ViewPostIme pointer 1
D/InputMethodManager( 1753): SSI - flag : 0 Pid : 1753 view : com.example.sample
D/InputMethodManager( 1753): prepareNavigationBarInfo() DecorView@5e90c72[MainActivity]
D/InputMethodManager( 1753): getNavigationBarColor() -855310
V/InputMethodManager( 1753): Starting input: tba=com.example.sample
ic=io.flutter.plugin.editing.InputConnectionAdaptor@9b32b88 mNaviBarColor -855310
mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager( 1753): startInputInner - Id : 0
I/InputMethodManager( 1753): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport( 1753): Input channel constructed: fd=101
D/InputTransport( 1753): Input channel destroyed: fd=93
D/InputMethodManager( 1753): prepareNavigationBarInfo() DecorView@5e90c72[MainActivity]
D/InputMethodManager( 1753): getNavigationBarColor() -855310
解决方案
也许尝试另一个发布渠道?https://github.com/flutter/flutter/wiki/Flutter-build-release-channels
编辑:也许也可以在那里提交一份包含您的发现的错误报告。;)
推荐阅读
- java - 当我选择收藏图像时,然后向上滚动并自动选择多个图像
- xml - 如何读取 xml 节点并替换 groovy 脚本中的节点值?
- javascript - 添加javascript数字没有效果
- swift - SwiftUI - 为图像的一个边缘添加边框
- alexa - 语音 Alexa 智能家居错误响应消息是什么?
- javascript - JavaScript:加载.txt文件并拆分后数组末尾的空元素
- android-studio - 颤振在 android studio 上是否支持 ios 或 iphone?
- scala - 如何从镶木地板文件中删除第一行?
- python - 内置函数“all”和“any”的行为
- reactjs - 在 Ant Design 示例表单中显示初始表单