Skip to content

Conversation

@TahaTesser
Copy link
Member

fixes #103037

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.

@flutter-dashboard flutter-dashboard bot added d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels May 4, 2022
@TahaTesser TahaTesser requested a review from guidezpl May 4, 2022 14:14
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 is a pretty elaborate example for such a simple component.

There's no harm in including a couple of switches in the example. A simple one might be what developers that want a quick copy-and-paste target are looking for. A more complex example, that demonstrates using MaterialStateProperty values would be helpful if there was some obvious motivations for the overrides (even just a comment explaining what's going on). It would also be helpful to show that a MaterialStateProperty can be used to override the color for just one state and, by returning null for the others, leave the defaults for the other states intact.

@TahaTesser
Copy link
Member Author

@HansMuller
That makes sense, I'm on it :)

@TahaTesser TahaTesser force-pushed the material_switch_example branch from d40143e to e4021ec Compare May 18, 2022 07:20
@TahaTesser TahaTesser requested review from HansMuller and guidezpl May 18, 2022 09:02
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.

LGTM

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • This pull request has changes requested by @guidezpl. Please resolve those before re-applying the label.

@TahaTesser
Copy link
Member Author

cc: @guidezpl

camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
* `Switch`: Add an interactive examples

* Update docs

* Update doc
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos 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.

Switch: Add an interactive example

4 participants