简体   繁体   English

一个 Flutter TextField 和 Google Indic Keyboard 相关问题

[英]A Flutter TextField and Google Indic Keyboard related problem

I am new to Flutter and am building an app that supports Malayalam language.我是Flutter的新手,正在构建一个支持Malayalam语的应用程序。 I test the TextField Malayalam entry using Google Indic Keyboard.我使用 Google 印度语键盘测试了TextField马拉雅拉姆语条目。 The TextField is set to take textInputAction as newline. TextField 设置为将textInputAction作为换行符。 While the action works fine in English, the newline does not work when I switch to Malayalam .虽然该操作在英语中运行良好,但当我切换到Malayalam时,换行符不起作用。

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

I could not find any setting in the Indic Keyboard that could fix it.我在印度语键盘中找不到任何可以修复它的设置。 Most of my users prefer Google Indic Keyboard .我的大多数用户更喜欢Google Indic Keyboard I am stuck and the very purpose of the app is defeated.我被卡住了,应用程序的目的被打败了。 Please Help...请帮忙...

Try setting keyboardType as TextInputType.multiline尝试将 keyboardType 设置为 TextInputType.multiline

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM