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

UI rebuild when check has primarry focus #24

Closed
datnguyennt opened this issue Jul 18, 2023 · 4 comments
Closed

UI rebuild when check has primarry focus #24

datnguyennt opened this issue Jul 18, 2023 · 4 comments

Comments

@datnguyennt
Copy link
Author

datnguyennt commented Jul 18, 2023

Hi, I have an issue when using your template, if I use this code

     if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) {
       FocusManager.instance.primaryFocus?.unfocus();
     }

The UI will rebuild when I tap inside and outside the text field. But if I only use
FocusManager.instance.primaryFocus?.unfocus();
without if statement, the keyboard hide and UI not rebuild. Could you help me explain why? Thank you!
Note: You can add a debugPrint on top of BlocProvider and inside a BlocBuilder to see it rebuild many time

@minhnt3
Copy link
Collaborator

minhnt3 commented Jul 21, 2023

@datnguyennt I could not reproduce this bug on Flutter 3.10.5. Could you give me a sample code to reproduce the issue? And please provide me with the result of the command flutter doctor

@minhnt3 minhnt3 closed this as completed Sep 11, 2023
@datnguyennt
Copy link
Author

Hi @minhnt3 sorry for the late reply but I've fixed the issue. I have some questions about Bloc and Flutter, Can I have your contact?

@minhnt3
Copy link
Collaborator

minhnt3 commented Sep 15, 2023

@datnguyennt Yes, you can connect to my LinkedIn account

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