Skip to content

Conversation

nero-angela
Copy link
Contributor

@nero-angela nero-angela commented Sep 2, 2020

Description

The SwitchListTile.adaptive should not have splash effect (on material) on iOS and macOS devices.
So, I wrapped ListTile with Theme widget, and set splashColor and highlightColor to transparent color only when _switchListTileType is _SwitchListTileType.adaptive and platform is iOS or macOS.

before after
before after
you can see the splash effect on iOS device you cannot see the splash effect on iOS device

Related Issues

Fixes #35399

Tests

I added the following a test:

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 read the Tree Hygiene wiki page, which explains my responsibilities.
  • 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

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Sep 2, 2020
@nero-angela
Copy link
Contributor Author

@LongCatIsLooong Would it be better to close this PR?

@LongCatIsLooong
Copy link
Contributor

LongCatIsLooong commented Sep 11, 2020

@nero-angela looks like we have an unfinished discussion in the issue thread (sorry for the delay), I think we should sort out whether it is the adaptive SwitchListTile that needs fixing or we should improve the API docs there.

@LongCatIsLooong
Copy link
Contributor

@nero-angela based on a recent discussion, SwitchListTile is indeed a material widget and the ink well is expected. I'll close this PR in favor of #69346. Feel free to reach out if you have more concerns/questions regarding this issue and thank you for contributing!

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.

SwitchListTile.adaptive has splash effect on iOS

3 participants