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
I'm trying to fit a FlareActor to its parent by width, which I can by providing a fit of BoxFit.contain and setting the sizeFromArtboard parameter to true. The size of the rendered art is correct, but the widget takes up much more vertical space than necessary. It seems like it should be possible for the FlareActor to size itself such that it fills up constraints as much as possible, while maintaining its native aspect ratio. Is this already supported?
The text was updated successfully, but these errors were encountered:
Hey @doppio, yes you can do that! You'd want sizeFromArtboard to be false in this case and set fit to BoxFit.contain. That'll take up the full size of the parent and then scale down whichever side exceeds the boundaries based on the aspect. If you specifically want to fit the width, try setting fit to BoxFit.width instead, but note that the height may bleed if the aspect of the artboard is inverted from that of the container. Take a peek at https://api.flutter.dev/flutter/painting/BoxFit-class.html for more details.
Hello!
I'm trying to fit a FlareActor to its parent by width, which I can by providing a fit of BoxFit.contain and setting the sizeFromArtboard parameter to true. The size of the rendered art is correct, but the widget takes up much more vertical space than necessary. It seems like it should be possible for the FlareActor to size itself such that it fills up constraints as much as possible, while maintaining its native aspect ratio. Is this already supported?
The text was updated successfully, but these errors were encountered: