page_flip_builder icon indicating copy to clipboard operation
page_flip_builder copied to clipboard

Keyboard dismiss when focus on textfield

Open kmyiu7 opened this issue 4 years ago • 1 comments

When I put a textfield as a child if page_flip_builder, the keyboard automatically dismiss every time I focus on it. Meanwhile, the keyboard work fine when I remove the Key of page_flip_builder (however, I cannot control flipping action). I am not sure if AnimationController has some conflicts with the Textfield. See anyone has some idea about it.

The following is my sample code

PageFlipBuilder( key: pageFlipKey, frontBuilder: () => Container( child: TextField(), ), backBuilder: () => Container( child: TextField(), ), flipAxis: Axis.horizontal, maxTilt: 0.003, maxScale: 0.2, onFlipComplete: (isFrontSide) => print('isFrontSide: $isFrontSide'), );

kmyiu7 avatar May 17 '21 06:05 kmyiu7

@kmyiu7 Have you tried wrapping each TextField inside a custom StatefulWidget and giving it a global key?

See this video for more info on working with keys:

https://www.youtube.com/watch?v=kn0EOS-ZiIc

bizz84 avatar Jun 11 '21 08:06 bizz84