I have a Radio list tile in which I am setting the gender(male, female and other). Initially, the list tile is checked on 'male'. can I put it to be initially unchecked so the user can check it by himself?
Container(
width: 400
height: 200
RadioListTile<Gender?>(
title: Text(
radioLabel == Gender.man
? 'MR.': radioLabel ==Gender.women
? 'Ms.': 'other',
),
value: radioLabel,
groupValue: widget.Gender.value,
onChanged: (Gender? value) {
if (value != null) {
setState(() {
widget.Gender.value = value;
});
}
},
),
)
On initial state, you can decide to choose a radio item or not choose any of them using via
groupValue.You can try here