代码格式:
Container( margin: EdgeInsets.all(6.0), //'6.0'为外边距宽度,根据调整大小,4边等宽 )
EdgeInsets可选参数:
EdgeInsets.fromLTRB(this.left, this.top, this.right, this.bottom) 示例 margin: EdgeInsets.fromLTRB(2, 2, 2, 4),
可分别设置4边宽度,按顺序为分别为左,上,右,下
EdgeInsets.only({ this.left = 0.0, this.top = 0.0, this.right = 0.0, this.bottom = 0.0, }); margin: EdgeInsets.only(top: 1,left: 2,bottom: 3,right: 4),
Ed4 N 2geInsets.only传递一个数组,可根据需要设置指定外边距,顺序可自由排列
参数 | |
top | 上边距 |
left | 左边距 |
right | 右边距 |
bottom | 下边距 |
© 版权声明
文章所提到的资源为网上收集,仅供学习交流使用,如造成侵权请联系删除。
THE END
暂无评论内容