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

[ios] Multiple Rebuild issue on 2.10.5 and 3.0.1 when opening keyboard #41

Open
marctan opened this issue Jun 3, 2022 · 10 comments · May be fixed by #54
Open

[ios] Multiple Rebuild issue on 2.10.5 and 3.0.1 when opening keyboard #41

marctan opened this issue Jun 3, 2022 · 10 comments · May be fixed by #54
Labels
bug Something isn't working p1

Comments

@marctan
Copy link

marctan commented Jun 3, 2022

Hello, there's an issue with flutter 2.10.5 when opening keyboard and using responsive_builder. It will call build and didChangeDependencies multiple times. This is not happening in 2.8.1.

2.8 video below:

v2.8.mov

2.10.5 and 3.0.1 video below

v2.10.5.mov

You can use this sample demo:
https://github.com/marctan/demo_rebuild
@FilledStacks

@Eimen2018 Eimen2018 added the bug Something isn't working label Aug 9, 2022
@Eimen2018
Copy link
Collaborator

@marctan how about 3.0.5?

@tsquillario
Copy link

Seems like this is similar to #49

@FilledStacks
Copy link
Owner

@marctan We use the "natural" flutter rebuild path. I know the build function also does this for the keyboard, dialogs, bottom sheets and notifications / minimise.

I'll see if it's any different from base flutter, if it is I'll make an adjustment if I can update the functionality.

@kydav
Copy link

kydav commented Mar 24, 2023

This is actually causing some issues, I don't think the version of flutter has much to do with it. I had thought it was the version of flutter but realized after switching around some things that it was actually updating Responsive_builder from 0.5.0 to 0.6.4 that caused some issues for us. The interesting part is that I don't see this in flutter beta channel current version.

You can see that when I use ScreenTypeLayout.builder for this widget, and try to use the system keyboard it opens quickly and closes. If I create the widget without any responsive builder it works just fine:

This is without Responsive builder
https://user-images.githubusercontent.com/10816342/227561282-c02a4be7-5bd4-483b-8890-97f351ea0887.mov

This is with Responsive Builder
https://user-images.githubusercontent.com/10816342/227561432-49f11674-3980-4b2a-819a-4506930377d3.mov

Updating to add that with the upgrade, we also went from using the ScreenTypeLayout() to the ScreenTypeLayout.builder()

So adding more info as I discover it. It appears that going back to ScreenTypeLayout() fixes the issue. Also interesting to note that just using: getDeviceType(MediaQuery.of(context).size) causes the same rebuilding issue that causes the keyboard to open and close.

@h4h13
Copy link

h4h13 commented Mar 25, 2023

This is actually causing some issues, I don't think the version of flutter has much to do with it. I had thought it was the version of flutter but realized after switching around some things that it was actually updating Responsive_builder from 0.5.0 to 0.6.4 that caused some issues for us. The interesting part is that I don't see this in flutter beta channel current version.

You can see that when I use ScreenTypeLayout.builder for this widget, and try to use the system keyboard it opens quickly and closes. If I create the widget without any responsive builder it works just fine:

This is without Responsive builder https://user-images.githubusercontent.com/10816342/227561282-c02a4be7-5bd4-483b-8890-97f351ea0887.mov

This is with Responsive Builder https://user-images.githubusercontent.com/10816342/227561432-49f11674-3980-4b2a-819a-4506930377d3.mov

Updating to add that with the upgrade, we also went from using the ScreenTypeLayout() to the ScreenTypeLayout.builder()

So adding more info as I discover it. It appears that going back to ScreenTypeLayout() fixes the issue. Also interesting to note that just using: getDeviceType(MediaQuery.of(context).size) causes the same rebuilding issue that causes the keyboard to open and close.

I had dug through this because I'm also facing the issue, for my understanding when the system keyboard opens the widget rebuilds because the screen size changes, why it happens pub uses MediaQuery so any changes to MediaQuery changes to widget

Thanks for confirm will roll back to previous version

@FilledStacks
Copy link
Owner

Thanks for confirming this I'll look into it. I wonder what could be causing this. I appreciate the details and updating the issue.

@h4h13
Copy link

h4h13 commented Mar 30, 2023

IDK how to put that code in collapsable let me if it helps

@FilledStacks
Copy link
Owner

@h4h13 I don't know what the above logs are for.

@h4h13
Copy link

h4h13 commented Mar 31, 2023

Ignore thought it would help you to work on that media query bug

@FilledStacks
Copy link
Owner

Thanks. I appreciate the additional info, I'll tend to this as soon as I get past some of the course creation hurdles we're facing right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants