flutter display a card code example

Example 1: dart card outline

Card(
  shape: RoundedRectangleBorder(
    borderRadius: BorderRadius.circular(40), // if you need this
    side: BorderSide(
      color: Colors.grey.withOpacity(0.2),
      width: 1,
    ),
  ),
  child: Container(
    color: Colors.white,
    width: 200,
    height: 200,
  ),
)

Example 2: flutter card

Card(
  child: Column(
    mainAxisSize: MainAxisSize.min,
    children: [
      const ListTile(
        leading: Icon(Icons.check),
        title: Text('TITLE'),
        subtitle: Text('SUBTITLE'),
      ),
      ButtonBar(
        children: [
          FlatButton(
            child: const Text('BTN1'),
            onPressed: () {/* ... */},
          ),
          FlatButton(
            child: const Text('BTN2'),
            onPressed: () {/* ... */},
          ),
        ],
      ),
    ],
  ),
);

Tags:

Misc Example