Flutter Radio background is transparent by default, is it possible to change it?
I can wrap with container and set background container color. However, the radio has a padding for hover color, so there is a padding between container background and radio button. I can hardcode container size but it is not good solution.
Container(
width: 20,
height: 20,
decoration: BoxDecoration(color: Colors.orange, shape: BoxShape.circle),
child: Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: Colors.white
),
child: Radio(
value: gender,
activeColor: Colors.white,
groupValue: _gender,
onChanged: (Gender value) {
setState(() {
_gender = value;
});
}))),