flutter card使用

//关键代码

 

 new Card(
        elevation: 15.0,  //设置阴影
        shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(14.0))),  //设置圆角
        child: new Column(  // card只能有一个widget,但这个widget内容可以包含其他的widget
          children: [
            new ListTile(
              title: new Text('标题',
                  style: new TextStyle(fontWeight: FontWeight.w500)),
              subtitle: new Text('子标题'),
              leading: new Icon(
                Icons.restaurant_menu,
                color: Colors.blue[500],
              ),
            ),
            new Divider(),
            new ListTile(
              title: new Text('内容一',
                  style: new TextStyle(fontWeight: FontWeight.w500)),
              leading: new Icon(
                Icons.contact_phone,
                color: Colors.blue[500],
              ),
            ),
            new ListTile(
              title: new Text('内容二'),
              leading: new Icon(
                Icons.contact_mail,
                color: Colors.blue[500],
              ),
            ),
          ],
        ),
        ),

你可能感兴趣的:(flutter card使用)