I was able to solve the spacing issue by wrapping each of the Radio
widgets in a SizedBox
and gave them a height lower than the devTools was showing me is their size (which was 48). I gave them a height of 30 and it works.
Here's a pic:
And here's the code:
Expanded(
flex: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(
height: 30,
child: Radio<Era>(
value: Era.ad,
groupValue: _era,
onChanged: (Era? value) {
setState(() {
_era = value;
});
},
),
),
const Text(
'A.D.',
style: TextStyle(fontSize: 10.0),
),
],
),
Row(
children: [
SizedBox(
height: 30,
child: Radio<Era>(
value: Era.bc,
groupValue: _era,
onChanged: (Era? value) {
setState(() {
_era = value;
});
},
),
),
const Text(
'B.C.',
style: TextStyle(fontSize: 10.0),
),
],
),
]),
)
]),