How to change checkbox border-color in flutter? By default, it is showing black but I want it in grey.
You can change TextField border color in Flutter, by adding style to the TextField widget. Basically, you provide the styling instructions by using the InputDecoration widget.
To change the color and width of Container's border, use its decoration property. Set decoration property with BoxDecoration() object. Set the border property of BoxDecoration() object, with required color and width as per your applications specifications.
Use this:
Checkbox(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(2.0),
),
side: MaterialStateBorderSide.resolveWith(
(states) => BorderSide(width: 1.0, color: Colors.red),
),
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With