I would like to have radio button lighter (less wide circle) when it’s in unselected state, is there some way to change it? The first picture is what I have. The second one is what I would like to have.
This is my code:
RadioListTile(
controlAffinity: ListTileControlAffinity.trailing,
title: Text('Active'),
value: OfferStatus.active,
groupValue: OfferStatus.inactive,
onChanged: (value) {},
),
2
Answers
nika
fillColor: MaterialStateProperty.all(const Color.fromARGB(255, 224, 224, 224))
Have a nice coding 🙂
Not directly, no. The
Radio
widget is surprisingly limited when it comes to what you’re able to directly theme. However, since yourRadio
will inevitably be in aStatefulWidget
, you could toggle the visibility of theRadio
entirely and render whatever widget you want. Alternatively, could could use aStack
widget to overlay another widget on top of theRadio
. Finally, you could use aShaderMask
to overlay something. I can’t give you the exact code, but it would look something like this:Obviously, this particular shader would draw a gradient, but you could use it to draw whatever you want.