Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard dismiss when focus on textfield #3

Open
kmyiu7 opened this issue May 17, 2021 · 1 comment
Open

Keyboard dismiss when focus on textfield #3

kmyiu7 opened this issue May 17, 2021 · 1 comment

Comments

@kmyiu7
Copy link

kmyiu7 commented May 17, 2021

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'),
);

@bizz84
Copy link
Owner

bizz84 commented Jun 11, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants