-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Tap on button behind snack bar defined by margin #127959
Conversation
why not also let the developer choose the hitTestBehavior parameter himself? #114810 - like here |
Because I don't want to have to know that I have to put in a I can do this behavior: widget.hitTestBehavior ?? widget.margin != null
? HitTestBehavior.deferToChild
: HitTestBehavior.opaque, |
I too think it would be great to update the PR this way. |
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.
A few minor comments on the tests code.
I added it. |
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.
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 👍 Good call adding the hitTestBehavior parameter as well.
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.
@lsaudon Thanks for you patience, just another step left to polish the comments.
If the margin is used, set the `HitTestBehavior` to `deferToChild`. *List which issues are fixed by this PR. You must list at least one issue.* flutter#78537 flutter#114810 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
…rThemeData.insetPadding is not null (#148568) The PR changes the default value of hitTestBehavior in snack bars to `HitTestBehavior.deferToChild` when snackBarTheme.insetPadding is not null, so that widgets behind snack bars affected by the value set to insetPadding, remain interactive even while a snack bar is visible. This PR can be considered as an extension to what have been done in PR #127959 which fixes the same problem but for individual snack bars with margin not being null. This PR works on the theme level. *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* #148566
…rThemeData.insetPadding is not null (flutter#148568) The PR changes the default value of hitTestBehavior in snack bars to `HitTestBehavior.deferToChild` when snackBarTheme.insetPadding is not null, so that widgets behind snack bars affected by the value set to insetPadding, remain interactive even while a snack bar is visible. This PR can be considered as an extension to what have been done in PR flutter#127959 which fixes the same problem but for individual snack bars with margin not being null. This PR works on the theme level. *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* flutter#148566
If the margin is used, set the
HitTestBehavior
todeferToChild
.List which issues are fixed by this PR. You must list at least one issue.
#78537
#114810
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.