You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal to add margin to MaterialBanner constructor #118704
@darshankawar
THX, but i want to set a margin around the material banner and not only at the bottom this can done over the elevation.
The constructor not including the margin to override it at line 340.
The seems like a reasonable feature to add, so long as the defaults don't change. @HELL-i - would be interested in contributing a PR that adds this features (and tests it)?
@HELL-i I added the changes along with Widget Test. Additionally, I also added a margin in withAnimation method and Raised the PR #119005
cc: @Piinks@shihaohong
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
darshankawar commentedon Jan 19, 2023
@HELL-i
There's already a
marginproperty as I see here:flutter/packages/flutter/lib/src/material/banner.dart
Line 340 in d53cc4a
Can you try to make use of that and see if it helps in your case ?
HELL-i commentedon Jan 19, 2023
@darshankawar
THX, but i want to set a margin around the material banner and not only at the bottom this can done over the elevation.
The constructor not including the margin to override it at line 340.
flutter/packages/flutter/lib/src/material/banner.dart
Line 97 in d53cc4a
darshankawar commentedon Jan 19, 2023
I see, thanks for the insight. I'll treat this as a proposal to add
margintoMaterialBannerwidget.[-]MaterialBanner set outer margin[/-][+]Proposal to add `margin` to MaterialBanner constructor[/+]HELL-i commentedon Jan 19, 2023
THX
HansMuller commentedon Jan 19, 2023
The seems like a reasonable feature to add, so long as the defaults don't change. @HELL-i - would be interested in contributing a PR that adds this features (and tests it)?
hasnentai commentedon Jan 23, 2023
@HansMuller @darshankawar I would like to work on this issue
HELL-i commentedon Jan 23, 2023
@hasnentai @HansMuller
Here is a possible solution: master...HELL-i:flutter:master
hasnentai commentedon Jan 23, 2023
@HELL-i Cool I think this looks fine. Thanks for the update
HELL-i commentedon Jan 23, 2023
@hasnentai When i have time i will add widget tests and then i will create the PR.
hasnentai commentedon Jan 23, 2023
@HELL-i I added the changes along with Widget Test. Additionally, I also added a margin in
withAnimationmethod and Raised the PR #119005cc: @Piinks @shihaohong
github-actions commentedon Mar 3, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.