【问题标题】:A Flutter TextField and Google Indic Keyboard related problemFlutter TextField 和 Google Indic Keyboard 相关问题
【发布时间】:2020-11-16 15:48:43
【问题描述】:

我是Flutter 的新手,我正在构建一个支持Malayalam 语言的应用程序。我使用 Google 印度语键盘测试了 TextField 马拉雅拉姆语条目。 TextField 设置为将textInputAction 作为换行符。虽然该操作在英语中运行良好,但当我切换到 Malayalam 时,换行符不起作用。

TextField(
  controller: _postController,
  textInputAction: TextInputAction.newline,
  maxLength: 16384,
  maxLines: 10,
  decoration: InputDecoration.collapsed(
    hintText: 'Write something here...',
  ),
)

我在 印度语键盘 中找不到任何可以修复它的设置。 我的大多数用户更喜欢 Google 印度语键盘。我被卡住了,应用程序的目的被打败了! 请帮忙...

【问题讨论】:

    标签: android flutter keyboard indic


    【解决方案1】:

    尝试将keyboardType设置为TextInputType.multiline

    TextField(
      controller: _postController,
      textInputAction: TextInputAction.newline,
      maxLength: 16384,
      maxLines: 10,
      keyboardType: TextInputType.multiline,
      decoration: InputDecoration.collapsed(
        hintText: 'Write something here...',
      ),
    )
    

    【讨论】:

    • 那行得通。你拯救了我的一天。想知道为什么它适用于英语。
    • 确保在所有多行字段中添加keyboardType
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-02-16
    • 2022-01-18
    • 2011-08-04
    • 2018-06-13
    • 2021-03-22
    • 2023-02-10
    • 2020-04-16
    相关资源
    最近更新 更多