当前位置:   article > 正文

Flutter中的 AspectRatio(aspectRatio: 1/2),组件和Card组件_flutter chewie aspectratio一直是1

flutter chewie aspectratio一直是1

1:AspectRatio组件,可以控制子元素在父亲元素中的宽高比,让子元素布局和显示更加完美:

 AspectRatio(aspectRatio: 1/2,child:Container()),child属性对应的container组件相对于在它的父组件中显示宽高比例为 1:2

2:Card组件,类似于卡片效果,周边有阴影的那种效果,配合listview中的listile使用做列表效果,用法:

Card()

属性如下:

this.color,

this.shadowColor,

this.elevation,

this.shape,

this.borderOnForeground = true,

this.margin,

this.clipBehavior,

this.child,

this.semanticContainer = true,

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/227303
推荐阅读
相关标签
  

闽ICP备14008679号