Flutter TextFormField geting blank when keyboard is hide. Transform your StatelessWidget to a Stateful one, it’ll do the job. The problem is that by declaring the TextEditingController in a StatelessWidget, it’ll be ‘reset-ted’ as the build function of the widget is called:
class U extends StatefullWidget
class _UState extends State<U>
final TextEditingController controller = TextEditingController();
Widget build(..) => TextField(controller: controller)
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.