问题描述
如何使形状(或与此有关的任何小工具)重叠在手机屏幕的两侧?
到目前为止,这是我的代码:
Container(
width: 900.0,height: 900.0,decoration: new Boxdecoration(
color: Colors.orange,shape: BoxShape.circle,),
不,我没有说要增加1000的大小,而是保持不变
解决方法
添加具有适当的Transform
属性的scale
小部件,并删除height
中的width
和Container
。
Transform.scale(
scale: 1.7,child: Container(
decoration: new BoxDecoration(
color: Colors.orange,shape: BoxShape.circle,),)
,
我刚刚修改了答案。
Transform.scale(
scale: 1.4,child: Center(
child: Container(
width: 900.0,height: 900.0,decoration: new BoxDecoration(
color: Colors.orange,)