I want to draw a border around my container and have the background be colored.
Widget bodyWidget() {
return Container(
color: Colors.yellow,
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
),
child: Text("Flutter"),
);
}
But when I try this I get the error
Cannot provide both a color and a decoration
The color argument is just a shorthand for "decoration: new BoxDecoration(color: color)".
How is this solved?