-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Added TabBar.splashFactory, TabBarTheme.splashFactory,overlayColor #96252
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. 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. |
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. LGTM.
|
||
|
||
@immutable | ||
class _LerpColors implements MaterialStateProperty<Color?> { |
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.
Interesting. I wonder if this might make a good candidate for a static function on MaterialStateProperty
that could be used with any type.
@@ -54,6 +54,21 @@ RenderParagraph _iconRenderObject(WidgetTester tester, IconData icon) { | |||
} | |||
|
|||
void main() { | |||
test('TabBarTheme copyWith, ==, hashCode, defaults', () { |
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. Funny that we didn't have this test already.
This PR failed a couple of internal tests that had configured InkWell.overlayColor with a Will break out the InkWell changes into a separate PR. |
@HansMuller I'm not super familiar with the material design spec but the PR looks good to me! I thought I'd mention that setting the highlightColor to transparent in the nearest |
7f105e9
to
0e44552
Compare
Adds a splashFactory property to TabBar and adds splashFactory and overlayColor properties to TabBarTheme.
This enables defeating ink splashes by specifying
splashFactory: NoSplash.splashFactory
. The overlay color can be now be overridden for the pressed state, as well as the hovered and focused states (as before). For example, to create a TabBar that does not draw ink splashes, and only draws the default focused state highlight:Fixes #86661