Rounded Corners Image in Flutter
Use ClipRRect
it will work perfectly
ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Image.network(
subject['images']['large'],
height: 150.0,
width: 100.0,
),
)
You can also use CircleAvatar
, which comes with flutter
CircleAvatar(
radius: 20,
backgroundImage: NetworkImage('https://via.placeholder.com/140x100')
)
Using ClipRRect
you need to hardcode BorderRadius
, so if you need complete circular stuff, use ClipOval
instead.
ClipOval(
child: Image.network(
"image_url",
height: 100,
width: 100,
fit: BoxFit.cover,
),
),