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

chore(Rebuild) fix issue StatefulWidget not rebuild when parent update #103

Closed
wants to merge 3 commits into from

Conversation

trunghieuvn
Copy link

@trunghieuvn trunghieuvn commented Apr 5, 2021

Hi @duytq94
We need localize for this screen intro_slider.
but when I change language and rebuild this screen, it not change.

please review this issue.

@trunghieuvn
Copy link
Author

trunghieuvn commented Apr 13, 2021

Hi @duytq94 please take a look
thank you

@duytq94
Copy link
Owner

duytq94 commented Apr 14, 2021

Hi @trunghieuvn
Many thanks for your PR, I think we should find out why setState don't work instead of this work around solution.
Anyway, if I change styleSkipBtn not nameSkipBtn, does your solution working?

@trunghieuvn
Copy link
Author

Hi @duytq94

Currently widget not rebuild when parent set new value and rebuild

@duytq94
Copy link
Owner

duytq94 commented Apr 14, 2021

Are you mentioned about it's not rebuild when hot reload, maybe like these issue
#59
#30

@trunghieuvn
Copy link
Author

Yep, we need implement did update widget for statefull widget, make sure when parent change data and need rebuild.

@duytq94
Copy link
Owner

duytq94 commented Apr 15, 2021

So I think we should find out why it's not rebuild when parent update, using didUpdateWidget is just a work around.

@duytq94
Copy link
Owner

duytq94 commented Apr 15, 2021

And your code just check
if (oldWidget.nameSkipBtn != widget.nameSkipBtn) { ...
If others attribute (widthSkipBtn, namePrevBtn...) it doesn't work?

Copy link

@theifedayo theifedayo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for conflict and resolve

@trunghieuvn trunghieuvn closed this Oct 2, 2021
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

Successfully merging this pull request may close these issues.

3 participants