-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Switch: Add an interactive example
#103045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
HansMuller
left a comment
There was a problem hiding this 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.
|
@HansMuller |
d40143e to
e4021ec
Compare
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
This pull request is not suitable for automatic merging in its current state.
|
|
cc: @guidezpl |
* `Switch`: Add an interactive examples * Update docs * Update doc
fixes #103037
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.