flutter card(卡片布局)

2019-02-19  本文已影响0人  CQ_TYL

Card 摘要:

class _home extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _homeState();
  }
}
class _homeState extends State<_home> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
      appBar: new AppBar(
        title: Text("title"),
        centerTitle: true,
      ),
      body: new Card(
        elevation: 4.0,//阴影
        color: Colors.grey,//背景色
        child: new Container(
          color: Colors.lightBlue,
          width: 200.0,
          height: 200.0,

        ),
      )
    );
  }
}
上一篇下一篇

猜你喜欢

热点阅读