07-21-2023, 09:54 PM
Flutter has already provides `CircleAvatar` widget for it.
Container(
width: 100,
child: CircleAvatar(
radius: 50,
backgroundImage: ExactAssetImage('assets/images/restaurant.jpg'),
),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.red,
width: 4.0,
),
),
),
Container(
width: 100,
child: CircleAvatar(
radius: 50,
backgroundImage: ExactAssetImage('assets/images/restaurant.jpg'),
),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.red,
width: 4.0,
),
),
),