Hi I was wondering if it was possible in flutter to programatically open up the keyboard as well as have the cursor and the textfield ready type straight away.
I already know how to pull up the keyboard
FocusScope.of(context).requestFocus(FocusNode());
But I also need to know how to make the textfield ready to type without the users having to tap the textfield. as in
Lets say I have a textfield:
TextField(
controller: textEditingController,
);
I would like to use code to the effect below so that the user dons't have to tap the textfield
textEditingController.openTextField()//Pseudo code
: Edit -----------------------------------
Bit bad of me but I forgot to add the focus node as a parameter on the textfield
Within your class add
final FocusNode _focusNode = FocusNode();
then add to textfield
TextField(
...
focusNode:_focusNode,
...
);
then call it by running
_focusNode.requestFocus();
