Skip to content

Reset missing deprecation for ScrollbarThemeData.copyWith(showTrackOnHover) - #111706

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
Piinks:fixTrackHoverDep
Sep 16, 2022
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
Piinks:fixTrackHoverDep

Conversation

@Piinks

@Piinks Piinks commented Sep 15, 2022

Copy link
Copy Markdown
Contributor

Found this while completing an audit for the next batch of deprecations to be removed from the framework.

Scrollbar and ScrollbarThemeData showTrackOnHover is deprecated, but the later .copyWith was not notated for it. This adds the deprecation notation and resets the clock for the bunch.

It also adds a dart fix for this deprecation.

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 this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Piinks Piinks added c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. c: tech-debt Technical debt, code quality, testing, etc. labels Sep 15, 2022
@flutter-dashboard flutter-dashboard Bot added the p: material_ui material_ui package in flutter/packages label Sep 15, 2022
// Changes made in https://github.com/flutter/flutter/pull/111706
Scrollbar scrollbar = Scrollbar(trackVisibility: true);
bool nowShowing = scrollbar.trackVisibility;
ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(trackVisibility: nowShowing);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

trackVisibility in ScrollbarThemeData is type of MaterialStateProperty<bool?>?, can this fix works well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's not a 100% fix, but we did the same transformation for isAlwaysShown ➡️ thumbVisibility.

In general, if we can point folks in the right direction, I think it's helpful. :)

@xu-baolin xu-baolin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 16, 2022
@auto-submit
auto-submit Bot merged commit f0b0b28 into flutter:master Sep 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 17, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 17, 2022
auto-submit Bot pushed a commit that referenced this pull request Mar 13, 2024
)

This PR is to remove deprecated `Scrollbar.showTrackOnHover` and `ScrollbarThemeData.showTrackOnHover`.

These parameters are made obsolete in #111706.
Part of #143956
chunhtai pushed a commit to chunhtai/packages that referenced this pull request Jun 12, 2026
…180)

This PR is to remove deprecated `Scrollbar.showTrackOnHover` and `ScrollbarThemeData.showTrackOnHover`.

These parameters are made obsolete in flutter/flutter#111706.
Part of flutter/flutter#143956
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. c: tech-debt Technical debt, code quality, testing, etc. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants