Cannot provide both a color and a decoration To provide both, use "decoration: BoxDecoration(color: color)" in flutter.

How to fix error Cannot provide both a color and a decoration To provide both, use "decoration: BoxDecoration(color: color)":-


This error happens when in the container we add color and boxdecoration both, like this


and the error displayed in the emulator like this.


and the solution is to remove the color from the container and add in boxDecoration like displayed in the below image.


after this, your problem is solved.

For more information on packages, widgets and solutions take a dive into the flutterStuff.

Post a Comment

Previous Post Next Post

Contact Form