flutter card custom shape code example
Example 1: shape property of card in flutter
Card(
elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: ListTile(),
)
Example 2: custom card shape flutter
Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
child: Text(
'Card with circular border',
textScaleFactor: 1.2,
),
),
Card(
shape: BeveledRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
child: Text(
'Card with Beveled border',
textScaleFactor: 1.2,
),
),
Card(
shape: StadiumBorder(
side: BorderSide(
color: Colors.black,
width: 2.0,
),
),
child: Text(
'Card with Beveled border',
textScaleFactor: 1.2,
),
),