I don't want the keyboard to display for my Text field in Flutter

Viewed 405

I'm building a calculator and for that I want a text field in flutter which will just give me a space where I can type but using the on screen button I have created. I don't want the keyboard to pop up I just want the cursor so that the user can edit the given text anyway possible How to do that ?

2 Answers

to hide keyboard and keep the cursor visible, set readOnly to true and showCursor to true

here how :-

TextFormField(
showCursor: true,
readOnly: true),

You do not need to create a TextField, just use text and update the string of the text on each tap of the button. You can do that using StatefulWidget, it's simple. I did that.

Related