-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add ActionButtonIconsData for overriding action icons #118229
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
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
This isn't entirely conventional but it's close. I would have expected an ActionIconTheme and ActionIconThemeData. If you moved all of the action buttons and icons to action_buttons.dart you could probably factor out some common implementation into private classes. |
… common implementation
|
@HansMuller, I've refactored the code as per your suggestions. If it looks good then I can write tests for them. |
|
This appears to be headed in a good direction. Two things:
|
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 looks good, just a few minor issues plus some tests. Ideally an example (with a test) would be included as well.
| @@ -0,0 +1,174 @@ | |||
| // Copyright 2014 The Flutter Authors. All rights reserved. | |||
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 file should be called action_icons_theme.dart
This adds the ability to override the back button, close button, drawer button, and end drawer button icons. This also adds CloseButtonIcon, DraweButton, DrawerButtonIcon, EndDrawerButton, and EndDrawerButtonIcon.
Fixes #117578
Fixes #107646
Pre-launch Checklist
///).Example Gist
Example for overriding action icons using ActionButtonIconsData in ThemeData
Screenshots
Customized
Default