-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add enabled property to CheckboxlistTile #102314
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
Add enabled property to CheckboxlistTile #102314
Conversation
QuncCccccc
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.
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.
nit: I think maybe double slash // here would be better? Got some hints from Style Guide for Flutter:)
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.
Thanks done
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 doesn't really match the standard format for Flutter class comments. See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#dartdoc-specific-requirements
This feature is supposed to work like the ListTile version, so you could use that as a model: https://api.flutter.dev/flutter/material/ListTile/enabled.html
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.
done
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.
I suppose this could be: enabled ?? false : null : onChanged
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.
Thanks for the review, Probably you meant
enabled ?? false ? null : onChangedBut, this wouldn't work for a case when enabled is true.
When enabled is true onChanged would be null. For this API I think onChanged should be enabled (non null) only when enabled is true.
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.
We probably want to pass null when enabled is false. In this case, this might work:
(enabled ?? true) ? onChanged :null
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.
NICE
|
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 Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Can someone please check why the docs-linux test is failing ?
|
Co-authored-by: Aman Verma <[email protected]>
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
| final Widget control = Checkbox( | ||
| value: value, | ||
| onChanged: onChanged, | ||
| onChanged: enabled ?? true ? onChanged : null , |
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.
NICE
Adds enabled property to CheckboxListTile.
Fixes: #102219
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.