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

How can I change the datetime value by setState #103

Open
svsno1 opened this issue Oct 20, 2020 · 2 comments
Open

How can I change the datetime value by setState #103

svsno1 opened this issue Oct 20, 2020 · 2 comments

Comments

@svsno1
Copy link

svsno1 commented Oct 20, 2020

I used the initialValue but it only worked the first time. When I setState((){ }) and pass a different value, it doesn't change.

@aldycool
Copy link

aldycool commented Jul 5, 2021

I think once you've rendered this, the initialValue cannot be changed (even using setState). I do a workaround by substituting the widget with a Container() first before the value is ready.

@leonardo2204
Copy link

@aldycool would you mind to share some code?

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

3 participants