build method
Build the radio group and send it back to the calling method.
Implementation
@override
Widget build(BuildContext context) {
// If the orientation of the radio button list is vertical, do this.
if (widget.orientation == RadioGroupOrientation.vertical) {
return Column(
mainAxisSize: MainAxisSize.min,
children: _verticalRadioListBuilder(),
);
} else {
// Otherwise, the orientation is horizontal; so, do this.
return Wrap(
alignment:
widget.decoration?.horizontalAlignment ?? WrapAlignment.center,
spacing: widget.decoration?.spacing ?? 0.0,
runSpacing: widget.decoration?.runSpacing ?? 0.0,
children: [
for (final T currValue in widget.values)
IntrinsicWidth(
child: _radioItemBuilder(currValue),
),
],
);
}
}