-
Notifications
You must be signed in to change notification settings - Fork 476
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
Infinite rendering object size and a way to know its actual native size #104
Comments
Hi @yjoo9317, The FlareActor widget doesn't have any intrinsic size of its own (although we could look into adding that as an option). The fit property is used in combination with the dimensions of the space allotted to the FlareActor. Right now the FlareActor does need to be inside of a sized widget. So 1. is true, 2. we don't currently provide the intrinsic size but we could modify the FlareActor to do this and/or determine this from a property like useIntrinsicSize or something. Some examples of how Fit will work:
Another example:
|
Hi @luigi-rosso So then, |
Right now, yes. But we've been thinking of a few different things to help with this. One of them is allowing the artboard size to be used as the intrinsic size of the FlareActor which means you won't have to specify a container, and the other is to allow you to specify the artboard (by name) to use if you have a file with multiple artboards. |
I don't want it to be Q&A session.
|
No problem, this kind of feedback is really helpful for us. We know we still have a long way to go with improving our documentation/tutorials/etc, and this helps us know what to focus on.
One other thing I realized, you can actually specify the name of a node to be used in place of the artboard bounds. For example, you could make a rectangle and call it "SizeRectangle". Then you can supply the name "SizeRectangle" to the FlareActor via the boundsNode property. This is helpful if you want to change the area that gets aligned by the fit/alignment properties. |
another dumb questions.
|
This loads a Flare file from an asset bundle. The important lines are the ones below:
|
Thanks @luigi-rosso One question though, underlying
|
Thanks for the help. |
I’ll take a look at you’re other question soon! Sorry I haven’t been able to look yet. |
There might be an opportunity to report back the read size earlier, but it would still likely be async as we try to push the heavy read operation to a separate isolate. It's similar to reading an image, you won't know the size until you've loaded it. Let me see if there's a way to change FlareActor to use its own intrinsic size. |
@yjoo9317, give this a try: Point your flare_flutter to the branch intrinsic_size_experiment in your pubspec:
Then simply tell your FlareActor to use the artboard size:
|
Wow.. will try soon. Thanks. |
Looks like I am having a path issue here. Rings any bell? From the other branch, it is just
|
Oh yeah let me fix that up... |
Ok try changing the pubspec to this now:
That goes to the latest tree in intrinsic_size_experiment which now points to the repo instead of using a relative path. |
@luigi-rosso |
I've been playing and struggling with flare component for a while.
I am not sure how the size in artboard works.
I thought the size in artboard would matter since it has
fit
property along. But some how but it didn't seem it does.So I am a bit confused how
fit
property in the actor actually works.It seems like Flareactor is regarded as flexible widget without any dimension even though it knows the size of artboard.
For example, if I put the flareactor in Fittebox, then it gets infinite size unless the FlareActor was contained in a container with BOTH width and height defined.
If I want to use flare's native size( i.e., artboard size) to go with less scaling process, then I have to build at least once to know its artboard size.
2) Is there a correct way to do that other than building once?
The text was updated successfully, but these errors were encountered: