Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 颤振:如何居中倾斜的孩子_Flutter_Flutter Layout - Fatal编程技术网

Flutter 颤振:如何居中倾斜的孩子

Flutter 颤振:如何居中倾斜的孩子,flutter,flutter-layout,Flutter,Flutter Layout,我正在尝试设置图标按钮的背景色 这是我的密码 ClipOval( child: Container( height: 50.0, width: 50.0, color: Colors.white, child: IconButton(

我正在尝试设置
图标按钮的背景色

这是我的密码

ClipOval(
                    child: Container(
                      height: 50.0,
                      width: 50.0,
                      color: Colors.white,
                      child: IconButton(
                        color: Colors.green.withOpacity(0.8),
                        iconSize: 50.0,
                        icon: Icon(Icons.add_circle),
结果如下


如何使椭圆形
容器
图标按钮
大小相同且均居中?

您不需要使用
容器
宽度
高度
属性,因为您已经在
图标按钮
中使用了
图标大小
。在
容器中删除
i容器大小
宽度/高度

截图:


谢谢,我也到了,但我想避免戴白戒指。我想要绿色的按钮,加上白色的
ClipOval(
  child: Material(
    color: Colors.green,
    child: InkWell(
      onTap: () {},
      child: Icon(
        Icons.add,
        color: Colors.white,
        size: 50,
      ),
    ),
  ),
)