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
Add a widget that applies an ImageFit type to its child widget #5830
using https://docs.flutter.io/flutter/painting/applyImageFit.html that'd be pretty easy
the short answer is, you create a RenderShiftedBox that is somewhat of a cross between RenderTransform and RenderPadding
that takes an ImageFit instead of an EdgeInset or Matrx4
it then has the child lay itself out unbounded, takes its size, passes that size to that function along with the current widget's size
and then figures the the transform you need to render the widget as per the result
that last part is the only tricky part i think
and yeah, we should totally make this a generic widget
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
abarth commentedon Sep 22, 2016
/cc @apwilson
Add FittedBox (#6029)
Roll engine to 95e91e3
Roll engine to 95e91e3 (#19716)
github-actions commentedon Sep 5, 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.