validateRadioGroup static method

String? validateRadioGroup(
  1. String? selectedKey, {
  2. String fieldName = 'option',
})

Implementation

static String? validateRadioGroup(
    String? selectedKey, {
      String fieldName = 'option',
    }) {
  if (selectedKey == null || selectedKey.isEmpty) {
    return 'Please select $fieldName';
  }
  return null;
}