easyRadioOf<T> function
Widget
easyRadioOf<T>({
- required List<
T> items, - T? value,
- ValueChanged<
T?> ? onChanged, - String itemLabel(
- T
- String? label,
Creates a radio button group.
items - The list of items to display.
value - The currently selected value.
onChanged - Callback when an item is selected.
itemLabel - Function to convert an item to a string label.
label - Optional label for the radio group.
Implementation
Widget easyRadioOf<T>({
required List<T> items,
T? value,
ValueChanged<T?>? onChanged,
String Function(T)? itemLabel,
String? label,
}) {
return _easyLabelWrapper(
label: label,
child: EasyRadioGroup<T>(
items: items,
value: value,
onChanged: onChanged,
labelBuilder: null,
itemBuilder: (context, item, selected) =>
_defaultItemBuilder(context, item, selected, itemLabel),
),
);
}