I am Trying to change the color in checkbox, but not getting the color, it showing the default color. If anyone know how it change the border color, please share..
This is the Actual code:
Checkbox(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
side: BorderSide(
color: Colors.blue,
width: 1.1,
),
),
),
But it showing default color
CodePudding user response:
Simply, this should do:
Checkbox(
fillColor: MaterialStateProperty.all(Colors.blue),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),
value: false,
onChanged: (bool? value) {...},
),
Also Refer to This Video for helpful info
I'd advise you to play with the following parameters
overlayColor
SplashRadius
side
It will help you better understand the Checkbox
widget.
So, there you go. Problem Solved! Happy Coding!