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
CupertinoSpinBox initialValue not resetting #7
Comments
Could you help me to understand the problem by providing a short example snippet that illustrates the problem? |
Thxs for getting back to me. Hopefully below I’ve shown you what the issue is.
Initial value is properly set to “1"
Console log of the print statement showing the initalValue given to the spin box correctly, which is 1
Then when the spin box associated with the column “Caution” is set to zero (0) the initialValue for spin box under column “Time” should be 0 as well. The value being based to the “Time” spin box is 0, as shown in the console log below, but the screen/UI never refreshes with the new value past to it.
… On Dec 15, 2020, at 6:33 PM, J-P Nurmi ***@***.***> wrote:
Could you help me to understand the problem by providing a short example snippet that illustrates the problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AABKLCSMCZIRNRF4IEMKYT3SU7W3TANCNFSM4U3ERTJQ>.
|
Found a solution. I added the Key parameter with a UniqueKey, to the widget holding the spinbox. Now when the value is reset in the other widget, the results are as expected.
… On Dec 15, 2020, at 6:33 PM, J-P Nurmi ***@***.***> wrote:
Could you help me to understand the problem by providing a short example snippet that illustrates the problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AABKLCSMCZIRNRF4IEMKYT3SU7W3TANCNFSM4U3ERTJQ>.
|
I'll take it that the problem was solved. Let me know if you think there's something that should be changed in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good day, I'm using 2 cupertinospinboxs. Both allow for individual "spins". When the 1st spinner is set to 0 (zero), the 2nd widget is expected to be reset to 0 as well. The underlaying data source is managed by Provider and ChangeNotifier. I console print out the value of initialValue for both spinners and see that the initial build is correct for both initialValues. When the 1st spinner is set to 0, the console print shows the 2nd spinner's initialValue is the expected 0 value but the displayed value remains at the current value, ie not getting reset.
Not sure if this is an issue specific to your script so Im still researching for a solution but was hoping you may have a solution/correction or workaround.
Thank you for your time.
The text was updated successfully, but these errors were encountered: