【问题标题】:Flutter Android App hangs, while typing dot(.) in TextFieldFlutter Android App 挂起,同时在 TextField 中输入点(。)
【发布时间】:2020-03-25 15:26:59
【问题描述】:

我有一个非常简单的适用于 Android 的 Flutter 应用程序,其中包含以下课程。应用程序挂起,只要我在 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

【问题讨论】:

标签: android flutter


【解决方案1】:

也许尝试其他发布渠道? https://github.com/flutter/flutter/wiki/Flutter-build-release-channels

编辑:也许也可以提交一份错误报告,其中包含您的发现。 ;)

【讨论】:

  • 在稳定频道工作。此外,在最新版本中,此问题已得到修复。
猜你喜欢
  • 1970-01-01
  • 2021-10-06
  • 2022-08-16
  • 2021-04-01
  • 2022-01-25
  • 2020-10-09
  • 2022-07-13
  • 1970-01-01
  • 2019-09-02
相关资源
最近更新 更多