-
Notifications
You must be signed in to change notification settings - Fork 72
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
Unexpected image cropping in WoltModalSheetPage heroImage #125
Comments
@motucraft hey dude, im having problem recreating the same , getting some error at |
@Drugjudy |
@motucraft This is expected. When you check the source code, you will see that the hero image has animation as the scrolling starts. The image scale animation is from 1.1 to 1.0. It looks like this is something that effects your case. We assumed that 0.1 would not hurt. Can we learn about your case, and understand why it is critical to have exact same width so that I can forward this to our motion designer? final double scale =
WoltLayoutTransformationUtils.calculateTransformationValue(
startValue: 1.1,
endValue: 1.0,
rangeInPx: heroImageHeight - topBarHeight - 8,
progressInRangeInPx: currentScrollPosition,
); |
@ulusoyca ![]() In relation to this, I previously commented on a similar issue here: #105 (comment)
At that time, I was advised to use heroImage and heroImageHeight. |
@motucraft By coincidence we have the same problem at Wolt 😮💨 We will fix this very soon. |
Has this issue been scheduled for a fix? |
@motucraft We have been super busy at Wolt with building a design system and library. I am aiming to start working on small PRs including this one tomorrow. Aiming the release for next week. |
Thanks. I appreciate the hard work and look forward to the upcoming fixes. |
@motucraft this is merged now and published part of 0.5.0 |
Bug report
Describe the bug
An image displayed as the heroImage within a WoltModalSheetPage is unexpectedly cropped around the edges. This issue does not occur when the same image is displayed elsewhere in the application, such as within a Column widget, where it appears correctly without cropping.
Steps to reproduce
Steps to reproduce the behavior:
Sample Code
pubspec.yaml
Expected behavior
The expectation is that the heroImage displayed in the WoltModalSheetPage should show the entire image without any cropping
Additional context
The text was updated successfully, but these errors were encountered: