SelectValueOption<T> constructor
SelectValueOption<T> ({
- required SelectValueController<
T> selectValueController, - Widget builder(
- BuildContext context,
- T value,
- T? selectedValue,
- void onChange(
- T?
- required List<
T> values, - Color? backgroundColor,
- double? borderRadius,
- String label = '',
- TextStyle? labelStyle,
- bool? showBorder = true,
- Color? borderColor,
- EdgeInsets? padding,
- Widget? icon,
Implementation
SelectValueOption({
required this.selectValueController,
this.builder,
required this.values,
this.backgroundColor,
this.borderRadius,
this.label = '',
this.labelStyle,
this.showBorder = true,
this.borderColor,
this.padding,
this.icon,
}) {
builder = builder ??
(
BuildContext context,
T value,
T? selectedValue,
void Function(T?)? onChanged,
) =>
RadioListTile<T>(
visualDensity: const VisualDensity(horizontal: -4.0),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
value: value,
groupValue: selectedValue,
onChanged: onChanged,
title: Text(
value.toString(),
),
);
}