My problem is similar to the Flutter: keyboard disappears immediately when editing my text fields. I have tried all answers from the mentioned above article but nothing made a difference. I realized that the pushReplacementNamed "fixed" the problem.
If I open the screen with Navigator.of(context).pushReplacementNamed(routeName) everything works properly. If I open the screen with Navigator.of(context).pushNamed(routeName) and touch the TextFormField, the keyboard appears and then instantly disappears.
As for the test code I have put a lonely TextField on the page to observe the same behavior. I couldn't make it work with pushNamed. I am using Flutter version 3.10.2, Dart version 3.0.2.
Does anyone knows why or how to make it work?