Select constructor
Select({
- String? label,
- String? name,
- Object? value,
- String? placeholder,
- List<
SelectOption> options = const [], - bool required = false,
- bool disabled = false,
- InputVariant variant = InputVariant.outline,
- ComponentSize size = ComponentSize.md,
- String? error,
- FormErrors? errors,
- String? helpText,
- String? className,
- Map<
String, Object?> props = const {}, - Map<
String, Object?> selectProps = const {}, - Map<
String, Object?> style = const {}, - Map<
String, Object?> selectStyle = const {}, - DartStyle? dartStyle,
- DartStyle? selectDartStyle,
- void onChanged(
- Object event
Creates a select field.
Implementation
Select({
String? label,
String? name,
Object? value,
String? placeholder,
List<SelectOption> options = const [],
bool required = false,
bool disabled = false,
InputVariant variant = InputVariant.outline,
ComponentSize size = ComponentSize.md,
String? error,
FormErrors? errors,
String? helpText,
String? className,
Map<String, Object?> props = const {},
Map<String, Object?> selectProps = const {},
Map<String, Object?> style = const {},
Map<String, Object?> selectStyle = const {},
DartStyle? dartStyle,
DartStyle? selectDartStyle,
void Function(Object event)? onChanged,
}) : super(
'div',
props: fieldWrapperProps(
props: props,
className: className,
dartStyle: dartStyle,
style: style,
),
children: _children(
label: label,
name: name,
value: value,
placeholder: placeholder,
options: options,
required: required,
disabled: disabled,
variant: variant,
size: size,
error: resolveFieldError(name: name, error: error, errors: errors),
helpText: helpText,
selectProps: selectProps,
selectStyle: selectStyle,
selectDartStyle: selectDartStyle,
onChanged: onChanged,
),
);