I am a newbie in flutter. I wanted to Align the radio buttons. i.e Radio button should be Aligned Column wise whatever the text is there.
I am using Column widget then Row Widget in it but getting the below result.
Code is here
Widget build(BuildContext context) {
return Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
children: [
Radio(value: 1, groupValue: 'null', onChanged: (index) {}),
Text('Radio button 1')
],
),
Row(
children: [
Radio(value: 1, groupValue: 'null', onChanged: (index) {}),
Text('Radio 2')
],
),
Row(
children: [
Radio(value: 1, groupValue: 'null', onChanged: (index) {}),
Text('Test')
],
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
children: [
Radio(value: 1, groupValue: 'null', onChanged: (index) {}),
Text('RB 1')
],
),
Row(
children: [
Radio(value: 1, groupValue: 'null', onChanged: (index) {}),
Text('Btn Radio 2')
],
),
Row(
children: [
Radio(value: 1, groupValue: 'null', onChanged: (index) {}),
Text('Rad 3')
],
),
],
),
],
),
);
}

