xxxxxxxxxx
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.8),
spreadRadius: 10,
blurRadius: 5,
offset: Offset(0, 7), // changes position of shadow
),
],
),
xxxxxxxxxx
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),
)
xxxxxxxxxx
Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.4),
spreadRadius: 2,
blurRadius: 8,
),
],
),
),
xxxxxxxxxx
BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
)
xxxxxxxxxx
boxShadow: [
BoxShadow(
color: Colors.redAccent,
offset: Offset(0.0, 1.0), //(x,y)
blurRadius: 3.0,
),
],
xxxxxxxxxx
Container(
height: 200, /// Change height and width as per your need.
width: 200,
child: Container(
color: Colors.red
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
),
),
xxxxxxxxxx
Card(
elevation: 8,
child: Container(width: 100, height: 100, color: Colors.blue),
),