You can solve this problem by setting resizeToAvoidBottomInset: false in Scaffold() .
Try setting focus on the four text fields by selecting them, and then select "UNFOCUS" to see what happens when the current FocusManager. primaryFocus is unfocused.
I have the following TextFormField
:
TextFormField(
focusNode: inputFocusNode,
keyboardType: TextInputType.multiline,
maxLines: null,
minLines: 3,
)
When the textfield is on focus, the keyboard appears. When the phone back button is pressed, the keyboard disappears however the cursor on the textfield still remains.
I know you can use FocusScope.of(context).unfocus()
to remove the cursor or unfocus. However there doesn't seem to be a direct way to detect the keyboard dismissal without getting a package
How do I address this issue?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With