SelectValueOption<T> constructor

SelectValueOption<T>({
  1. required SelectValueController<T> selectValueController,
  2. Widget builder(
    1. BuildContext context,
    2. T value,
    3. T? selectedValue,
    4. void onChange(
      1. T?
      )?,
    )?,
  3. required List<T> values,
  4. Color? backgroundColor,
  5. double? borderRadius,
  6. String label = '',
  7. TextStyle? labelStyle,
  8. bool? showBorder = true,
  9. Color? borderColor,
  10. EdgeInsets? padding,
  11. 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(),
            ),
          );
}