A Flutter TextField and Google Indic Keyboard related problem

207 Views Asked by At

I am new to Flutter and am building an app that supports Malayalam language. I test the TextField Malayalam entry using Google Indic Keyboard. The TextField is set to take textInputAction as newline. While the action works fine in English, the newline does not work when I switch to 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. I am stuck and the very purpose of the app is defeated! Please Help...

1

There are 1 best solutions below

2
On BEST ANSWER

Try setting keyboardType as TextInputType.multiline

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