-
Notifications
You must be signed in to change notification settings - Fork 17
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
Range slider #1723
base: main
Are you sure you want to change the base?
Range slider #1723
Conversation
I also see a PR #1725 related to more customizations in simple Silder widget. Since we would want the maximum similar customizations, should i wait for the that to merge and then use those here as well? |
'initialValue': (value) => | ||
_controller.value = Utils.optionalDouble(value) ?? 0, | ||
'initialValue': (value) => _controller.value = | ||
Utils.getRangeValues(value) ?? const RangeValues(0, 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getter implementation for RangeValues
needs to expose the individual start
and end
values since returning only the RangeValues object doesn't allow direct access to these values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally did not do that. Since we are using RangeValue for for both, a user can get start or end value through value
.
A thing we can do instead is add another getter in value
which returns single value if start === end.
} | ||
} | ||
: null, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the duplicate code which can be converted to method and use them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved whole onChanged function to a separate function
Ticket #1580
Example code