美文网首页
2020-05-12 Flutter Card

2020-05-12 Flutter Card

作者: rub1cky | 来源:发表于2020-05-12 21:47 被阅读0次

构造函数

const Card({
    Key key,
    this.color, // 背景色
    this.shadowColor, // 阴影颜色
    this.elevation, // 景深
    this.shape, //  用来设置border-radius
    this.borderOnForeground = true, // 外部边框
    this.margin, // 和其他组件距离
    this.clipBehavior,
    this.child, // 内部子项
    this.semanticContainer = true,
  }) 

Demo

截屏2020-05-12 下午9.47.41.png
Card(
            color: Colors.grey,
            shadowColor: Colors.green[200],
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(14.0))),
              margin: EdgeInsets.all(30),
            elevation: 20,
            borderOnForeground: false,
              clipBehavior: Clip.antiAlias,
            child: Container(child: Text("Card Title"),)
          )

相关文章

网友评论

      本文标题:2020-05-12 Flutter Card

      本文链接:https://www.haomeiwen.com/subject/imzinhtx.html