I am using Flutter to make a list of information about movies. Now I want the cover image on the left to be a rounded corners picture. I did the following, but it didn’t work. Thanks!
getItem(var subject) {
var row = Container(
margin: EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
Container(
width: 100.0,
height: 150.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8.0)),
color: Colors.redAccent,
),
child: Image.network(
subject['images']['large'],
height: 150.0,
width: 100.0,
),
),
],
),
);
return Card(
color: Colors.blueGrey,
child: row,
);
}
as follows
Use this Way in this circle image is also working + you have preloader also for network image:
Use ClipRRect it will resolve your problem.
Use
ClipRRect
it will work perfectlyTry This it works well.
For image use this
While for Asset Image use this
Using
ClipRRect
you need to hardcodeBorderRadius
, so if you need complete circular stuff, useClipOval
instead.