Keep TextField keyboard open after AnimatedSwitcher switch?

Viewed 71

I am use AnimatedSwitcher for switch between 2 widget:

AnimatedSwitcher(
  duration: const Duration(milliseconds: 200),
  child:
  toggle
      ? TextField()
      : otherWidget(),

Problem is when AnimatedSwitcher switch away from Textfield it dismiss keyboard even if user have already click on it and open keyboard.

How to keep the keyboard open even if the widget changes in AnimatedSwitcher?

0 Answers
Related