简体   繁体   English

在渲染时更改 flutter 中的光晕形状和大小

[英]Change flare shape and size in flutter while rendering

I have a simple flare object (a slate or blackboard) that I want to use in my app.我有一个想要在我的应用程序中使用的简单耀斑 object(石板或黑板)。 The idea is to show some text in chalk on that blackboard.这个想法是在黑板上用粉笔显示一些文本。 I am struggling to find the correct size of that blackboard.我正在努力寻找正确尺寸的黑板。 I would like the blackboard to fill out most of the screen.我希望黑板填满大部分屏幕。 Therefore, I need to change the width or the height of the blackboard.因此,我需要更改黑板的宽度或高度。

I haven't found a solution for that though.我还没有找到解决方案。 Is it possible to change the width of the blackboard by the factor 2 and the height by factor 1.5 in flutter?是否可以在 flutter 中将黑板的宽度更改为 2 倍,将高度更改为 1.5 倍?

So, the easiest way for me to fill out the screen was to use the BoxFit.fill option.因此,我填写屏幕的最简单方法是使用 BoxFit.fill 选项。 Still haven't figured out though how to individually change the height and width of a flare in flutter.仍然没有弄清楚如何在 flutter 中单独更改耀斑的高度和宽度。

Expanded(
            child: Container(
              child: FlareActor(
                'assets/Slate.flr',
                artboard: 'MainArtboard',
                fit: BoxFit.fill,
                sizeFromArtboard: false,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM