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
Image Widget: Displaying Image.asset with an explicit scale does not work #18679
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
zoechi commentedon Jun 22, 2018
Please add the output of
flutter doctorsir-boformer commentedon Jun 22, 2018
@zoechi I also just tested this with a real Android device with a pixel ratio of 2.0, same problem occurs
zoechi commentedon Jun 22, 2018
@Hixie
sir-boformer commentedon Jun 22, 2018
I'm not sure if the tag you set is correct. This is a problem of the core framework.
zoechi commentedon Jun 22, 2018
I wasn't sure. Could be a simple copy-paste error in
AssetImageor a serious issue in the engine.I added
enginesir-boformer commentedon Aug 29, 2018
Looking at this again, there is a simple workaround. Could be the intended behaviour.
Instead of:
just write:
And everything will work correctly. Flutter just uses the image path as-is when you set an explicit scale.
This should be mentioned explicitly in the documentation.
clarify how to display an image with a specific density
clarify how to display an image with a specific density (#21152)
github-actions commentedon Sep 2, 2021
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.