card border radius code example

Example 1: how to give shape to card in flutter

Card(
  color: Colors.grey[900],
  shape: RoundedRectangleBorder(
    side: BorderSide(color: Colors.white70, width: 1),
    borderRadius: BorderRadius.circular(10),
  ),
  margin: EdgeInsets.all(20.0),
  child: Container(
    child: Column(
        children: <Widget>[
        ListTile(
            title: Text(
            'example',
            style: TextStyle(fontSize: 18, color: Colors.white),
            ),
        ),
        ],
    ),
  ),
),

Example 2: css rounded corners

/* Use border-radius property */

.class {
  border-radius: 5px;
}

.circle {
  border-radius: 50%;
}

Example 3: border radius css

border-radius: 5px; /* The corners will be round */

Tags:

Dart Example