首页 > 解决方案 > 是否有可能在颤动中获得圆形图像的度数?

问题描述

在颤振中,我在下面的地图检查图片中进行了四舍五入的图像

https://i.stack.imgur.com/uQc1E.png

因此,我能够获得任何程度的图片,并在那时画一些东西。

如果您知道此问题的解决方案,请回答此问题。

标签: androidflutterflutter-layoutflutter-dependencies

解决方案


您可以通过用小部件包装小部件来旋转小Transform.rotate部件。

这是一个例子:

Transform.rotate(
  angle: 45, //change this value to rotate the child
  child: Container(
  height: 100,
  width: 50,
  color: Colors.red,
    ),
  ),

推荐阅读