Repository navigation
Conversation
setValue clamped the requested value and then formatted it with the configured number of decimals. A NaN or infinite value was written into the text field, and rounding could push a clamped value past a fractional bound (max: 0.29 with decimals: 1 accepted 0.3). Ignore non-finite values, round before validating, and drop a step whose rounded value falls outside [min, max]. onSubmitted now receives the already-rounded value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
setValue(NaN/±inf)wroteNaNinto the field. Rounding todecimalscould push a value past a fractional bound:max: 0.29with one decimal accepted 0.3.Fix
Ignore non-finite values. Round first, then reject a result outside [min, max].
Behavior
onSubmittedreceives the rounded value, as before. With an inconsistent bound such asmax: 0.29anddecimals: 1, the arrows stop at 0.2.Tests
non-finite programmatic steps are ignored,step rounding never escapes fractional bounds.#110 → #111 → #112 → #113 → #114 are stacked on this one, in that order.
CI on
maincurrently fails in the Android example build and the publish dry-run; it goes green with #102.