radioOption method

Widget radioOption(
  1. String label,
  2. int value
)

Implementation

Widget radioOption(String label, int value) {
  return Row(
    children: <Widget>[
      Radio<int>(
        value: value,
        groupValue: selected,
        onChanged: widget.readOnly ? null : onchange
      ),
      if (widget.label != null)
        Expanded(
          child: InkWell(
            onTap: widget.readOnly
                ? null
                : () {
                    onchange(value);
                  },
            child: Text(label),
          ),
        ),
    ],
  );
}