1

Currently we are using Flutter in an Android device that has a phisical keyboard, when we input data in a textfield we use the phisical keyboard, but the soft keyboard appears anyway and gets in the way hiding the information in the screen the user needs to see while typing.

There is currently the option keyboardType.none, but when using it dissables the textfield and we cannot input data, not even with the phisical keyboard, we need an option to disable the soft-keyboard but that allow us to use the phisical one.

thanks.

vinod
  • 9
  • 7
  • Does this answer your question? [How to hide soft input keyboard on flutter after clicking outside TextField/anywhere on screen?](https://stackoverflow.com/questions/51652897/how-to-hide-soft-input-keyboard-on-flutter-after-clicking-outside-textfield-anyw) – Ruchit Mar 15 '22 at 07:14
  • @Ruchit In this answer, I can able to hide the keyboard but my problem is I want to input value from the device's own keyboard. When the soft keyboard is hidden I can't able input values. – vinod Mar 15 '22 at 07:35
  • This is a bug in the Flutter SDK with an open issue already on their GitHub repository. Please check this issue out: https://github.com/flutter/flutter/issues/44681 – Vandad Nahavandipoor Mar 15 '22 at 09:13

1 Answers1

0

In a singlechildscrollview,you can use intrinsicHeight,i am showing the pseudo code for it,hope it helps.

Scaffold(

body: LayoutBuilder(

builder: (context, constraint) {

  child: SingleChildScrollView(

    child: ConstrainedBox(

      constraints: BoxConstraints(minHeight: constraint.maxHeight),

      child: IntrinsicHeight(

        child: Column(

          // your content (Text, Container, TextField, ...)
        )
      )
    )
  )
}))

Using this, when you focus on the Text Field and the keyboard is displayed, the Text Field will be scrolled to visible position above the keyboard.you can say it like auto scrolling to avoid blocking the view of text field

Ke1212
  • 89
  • 9