'how to align radio box text expand scroll to downward
Radio Box i want
so this what radio box and the text align i want to make, but this is what i get and i don't find any solution what else to do to change it to be like the first image
My Radio Box
Container(
child: Column(
children: termsOption.map(
(e) {
var index = termsOption.indexOf(e);
return Container(
margin: EdgeInsets.fromLTRB(0, 8, 0, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
color: Colors.grey,
height: 0,
child: Radio(
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
value: index,
groupValue: radioValue,
onChanged: (value) {
print(e['value']);
setState(() {
radioValue = value;
});
},
),
),
SizedBox(width: 5),
Expanded(
child: Text(
e['value'],
style: TextStyle(
color: Colors.black,
),
),
),
],
),
);
},
).toList(),
),
),
Solution 1:[1]
You just need update
crossAxisAlignment: CrossAxisAlignment.center,
with
crossAxisAlignment: CrossAxisAlignment.start,
and also instead of
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
write
margin: EdgeInsets.fromLTRB(0, 8, 0, 0),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | M Karimi |


