-
Notifications
You must be signed in to change notification settings - Fork 28.6k
BoxDecoration doesn't respect repeatX/repeatY when fitWidth/fitHeight is used. #117183
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
Comments
I've done some debugging, and I believe I've narrowed down the culprit to a bug in the |
Thanks for the report and the fix. Running code sample, seeing same behavior as reported on both versions. stable, master flutter doctor -v
|
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 |
Steps to Reproduce
flutter run
on the code sampleExpected results:
Since the source image has a wider aspect ratio than the
BoxDecoration
, andfitWidth
is used in combination withrepeatY
, I would expect the image to be repeated vertically, like this:Actual results:
Instead the image is drawn only once:
(Note that if
BoxFit.fitWidth
is changed toBoxFit.contain
, then I get the expected behaviour in this example. ButBoxFit.contain
only fits the width if the source image has a wider aspect ratio than theBoxDecoration
; I want to fit the width regardless of the aspect ratios).A similar problem exists between
fitHeight
andrepeatX
(though to see it you'll have to modify the aspect ratios in my example program).Code sample
The text was updated successfully, but these errors were encountered: