Repository navigation
[material_ui] Fix floating-point rounding errors for discrete Slider and RangeSlider - #13022
Merged
auto-submit[bot] merged 3 commits intoSep 28, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses floating-point rounding errors in the Slider and RangeSlider components by updating the _lerp methods to correctly handle discrete divisions. It also includes a changelog entry and new widget tests to verify the fix. The reviewer recommends adding value.isFinite checks to the _lerp methods to prevent potential UnsupportedError crashes in production when processing non-finite values.
QuncCccccc
approved these changes
Sep 28, 2026
QuncCccccc
left a comment
Contributor
There was a problem hiding this comment.
LGTM with some comments for tests. Thanks!
…and RangeSlider Fixes floating-point rounding errors when calculating values for discrete `Slider` and `RangeSlider`. Ports flutter/flutter#187393 to `material_ui`. Fixes flutter/flutter#39510
hannah-hyj
force-pushed
the
material-slider-discrete-rounding
branch
from
September 28, 2026 21:51
b706b60 to
bd4dff6
Compare
Member
Author
|
comments resolved |
pull Bot
pushed a commit
to g-star1024/flutter
that referenced
this pull request
Sep 29, 2026
…er#193507) flutter/packages@ba0364a...3c6ce59 2026-09-29 [email protected] [cupertino_icons] Migrate to `cupertino_ui` (flutter/packages#12649) 2026-09-29 [email protected] Manual roll Flutter from 4fcd90b to c5a061b (222 revisions) (flutter/packages#13060) 2026-09-28 [email protected] Enable Built-in Kotlin in all Flutter Android Plugin Example Apps (flutter/packages#12883) 2026-09-28 [email protected] Enable Built-in Kotlin for `interactive_media_ads` (flutter/packages#12912) 2026-09-28 [email protected] [google_maps_flutter] Adopt Pigeon's Kotlin 'suspend' support (flutter/packages#12980) 2026-09-28 [email protected] [material_ui] Fix floating-point rounding errors for discrete Slider and RangeSlider (flutter/packages#13022) 2026-09-28 [email protected] [google_sign_in] PR 4/4 Convert the Pigeon host API from Objective-C to Swift (flutter/packages#12658) 2026-09-28 [email protected] [google_maps_flutter] Disable flaky web tests blocking latest flutter -> packages roll (flutter/packages#13047) 2026-09-28 [email protected] [material_ui] Add fontFeatures and fontVariations to TextTheme.apply() (flutter/packages#12879) 2026-09-28 [email protected] [in_app_purchase_storekit] Disable flaky tests blocking latest flutter -> packages roll (flutter/packages#13048) 2026-09-28 [email protected] Sync release-material_ui-1.5.0 to main (flutter/packages#13051) 2026-09-28 [email protected] Sync release-go_router-18.0.2 to main (flutter/packages#13050) 2026-09-28 [email protected] [google_fonts] Migrate to material_ui & cupertino_ui (flutter/packages#13006) 2026-09-28 [email protected] [go_router_builder] Reland material_ui migration (flutter/packages#12995) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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.
Fixes floating-point rounding errors when calculating values for discrete
SliderandRangeSlider.Ports flutter/flutter#187393 to
material_ui.Fixes flutter/flutter#39510
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2