shadow behind container flutter code example
Example 1: flutter add shadow to container
Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.8),
spreadRadius: 10,
blurRadius: 5,
offset: Offset(0, 7), // changes position of shadow
),
],
),
child: Image.asset(chocolateImage),
)
Example 2: flutter shadow container
Card(
elevation: 8,
child: Container(width: 100, height: 100, color: Colors.blue),
),