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

new option: forceOnChanged #10

Closed
wants to merge 2 commits into from
Closed

Conversation

boeledi
Copy link
Contributor

@boeledi boeledi commented Apr 29, 2018

No description provided.

@MarcinusX
Copy link
Owner

First, let's merge #9. Then please update your branch to current master so I will be able to build it. :)

@MarcinusX
Copy link
Owner

I've tried to run your changes on Example app with decimal dialog.
After I scroll to 99 decimal and then integer to the maximum, app crashes.

To be honest, right now I am not sure what feature do you feel is actually missing. From what I can see, right now app notifies about changes even if selected value is initial value.

@boeledi
Copy link
Contributor Author

boeledi commented May 7, 2018

I did not experience any crash (I am running on Windows). However, in order to have the samples work and compile on my machine, I had to apply many changes to the android / graddle configuration

To answer your question, you are right that the application notifies if selected value is the initial value if and only if you apply a setState() on every change.

onChanged: (newValue) =>
                    setState(() => _currentValue = newValue)),

This forces the whole widget to repaint but not this widget alone but also the widgets of the tree. Now, if you do not want to systematically repaint, you are not notified (due to the comparison). Now, it is up to you to decide, of course.

@MarcinusX
Copy link
Owner

Ok, I think I understand now, we can check how it works but first, we need to get rid of this bug.
I've updated your branch so you don't have to change anything except adding forceOnChanged in the decimal example.

@MarcinusX
Copy link
Owner

Well, I'm closing the pull request for now, feel free to resubmit if needed.

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.

None yet

2 participants