return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Card(
clipBehavior: Clip.antiAliasWithSaveLayer,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20)),
child: Container(
height: 200,
width: 200,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/homepage.jpg',
),
alignment: FractionalOffset.topLeft,
fit: BoxFit.contain)),
),
),
],
),
),
);
There is another part of the image above that remains below. I want to fit the whole photo into a container with a height and width of 200.
2
Answers
See if this is what you wanted: