Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@clocksmith
Copy link
Contributor

#30390 was rolled back. This PR will re-roll it forward.

Description

This PR makes a number of changes to the visual appearance of material sliders:

  • Sizes/Shapes
    ** enabled thumb radius from 6 to 10
    ** disabled thumb radius from 4 to 10 with no gap
    ** default track shape is a rounded rect rather than a rect
    **
  • Colors
    ** all of the colors now use the new color scheme
    ** overlay opacity has been reduce from 16% to 12%
    ** value indicator text color now respects the indicator it is on by using onPrimary
    ** disabledThumb color no respects the surface it is on by using onSurface

The slider theme is also now constructed consistently with other theme objects within the ThemeData. By default, all values are null, and have default values that are resolved in the slider itself, rather than in the slider theme.

Related Issues

Closes #28706
Closes #30314
Closes #30315
Closes #30316
Closes #30317

Tests

No new tests were added, but many had to be updated to the new sizes and colors. Tests for default slider theme data property resolving were removed since the SliderThemeData no longer does that.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

@clocksmith clocksmith requested a review from HansMuller April 24, 2019 17:14
@clocksmith clocksmith merged commit 96f15c7 into flutter:master Apr 24, 2019
@clocksmith clocksmith deleted the slider-breaking-2 branch September 12, 2019 16:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.