Skip to content

Slider: add themeable mouse cursor#88425

Closed
jpnurmi wants to merge 3 commits intoflutter:masterfrom
jpnurmi:slider-theme-mouse-cursor
Closed

Slider: add themeable mouse cursor#88425
jpnurmi wants to merge 3 commits intoflutter:masterfrom
jpnurmi:slider-theme-mouse-cursor

Conversation

@jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Aug 18, 2021

Allow themes to override Slider's mouse cursor.

Partial fix to #88371

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Aug 18, 2021
@google-cla google-cla bot added the cla: yes label Aug 18, 2021
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just needs a small tweak.

@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good; please consider adding support for MaterialState.dragged.

///
/// If this property is null, [MaterialStateMouseCursor.clickable] will be used.
/// If null, then the value of [SliderThemeData.mouseCursor] is used. If that
/// is also null, then [MaterialStateMouseCursor.clickable] is used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though it's implicitly mentioned above, it would be helpful to include a "see also" section that points at MaterialStateMouseCursor

},
);
final Set<MaterialState> states = <MaterialState>{
if (!_enabled) MaterialState.disabled,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be useful to also include support for MaterialState.dragged, as Scrollbar does

@HansMuller
Copy link
Contributor

I'm closing this PR in favor of #96623 which is essentially the same changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants