Flutter Card使用


效果:
Flutter Card使用_第1张图片

代码:

      Card(
        elevation: 5,//阴影
        shape: const RoundedRectangleBorder(//形状
          //修改圆角
          borderRadius: BorderRadius.all(Radius.circular(10)),
        ),
        color: Colors.white, //颜色
        margin: EdgeInsets.all(20), //margin
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            const ListTile(
              leading: Icon(Icons.android),
              title: Text('标题'),
              subtitle: Text('副标题'),
              trailing: Icon(Icons.chevron_right),
            ),
            ButtonTheme.bar(
              // make buttons use the appropriate styles for cards
              child: ButtonBar(
                children: [
                  FlatButton(
                    child: const Text('选项一'),
                    onPressed: () {
                      /* ... */
                    },
                  ),
                  FlatButton(
                    child: const Text('选项二'),
                    onPressed: () {
                      /* ... */
                    },
                  ),
                ],
              ),
            ),
            Divider(),
            Padding(
              padding: EdgeInsets.all(20),
              child: Text("AAAAAAAAAAAA"),
            )
          ],
        ),
      ),


你可能感兴趣的:(Flutter,Card,flutter,Card,flutter,borderRadius)