FormeFluentComboBox<T extends Object> constructor
FormeFluentComboBox<T extends Object> ({
- Key? key,
- String? name,
- T? initialValue,
- FormeAsyncValidator<
T?> ? asyncValidator, - Duration? asyncValidatorDebounce,
- AutovalidateMode? autovalidateMode,
- FormeFieldDecorator<
T?> ? decorator, - bool enabled = true,
- FocusNode? focusNode,
- FormeFieldInitialized<
T?> ? onInitialized, - FormeFieldSetter<
T?> ? onSaved, - FormeFieldStatusChanged<
T?> ? onStatusChanged, - int? order,
- bool quietlyValidate = false,
- bool readOnly = false,
- bool requestFocusOnUserInteraction = true,
- FormeFieldValidationFilter<
T?> ? validationFilter, - FormeValidator<
T?> ? validator, - bool autofocus = false,
- Widget? disabledPlaceholder,
- int elevation = 8,
- Color? focusColor,
- Widget icon = const Icon(FluentIcons.chevron_down),
- Color? iconDisabledColor,
- Color? iconEnabledColor,
- double iconSize = 10,
- bool isExpanded = false,
- List<
ComboBoxItem< ? items,T> > - ValueChanged<
T?> ? onChanged, - VoidCallback? onTap,
- Widget? placeholder,
- Color? popupColor,
- ComboBoxBuilder? selectedItemBuilder,
- TextStyle? style,
- T? value,
Implementation
FormeFluentComboBox({
super.key,
super.name,
super.initialValue,
super.asyncValidator,
super.asyncValidatorDebounce,
super.autovalidateMode,
super.decorator,
super.enabled = true,
super.focusNode,
super.onInitialized,
super.onSaved,
super.onStatusChanged,
super.order,
super.quietlyValidate = false,
super.readOnly = false,
super.requestFocusOnUserInteraction = true,
super.validationFilter,
super.validator,
this.autofocus = false,
this.disabledPlaceholder,
this.elevation = 8,
this.focusColor,
this.icon = const Icon(FluentIcons.chevron_down),
this.iconDisabledColor,
this.iconEnabledColor,
this.iconSize = 10,
this.isExpanded = false,
this.items,
this.onChanged,
this.onTap,
this.placeholder,
this.popupColor,
this.selectedItemBuilder,
this.style,
this.value,
}) : super.allFields(builder: (state) {
return ComboBox<T>(
items: items,
selectedItemBuilder: selectedItemBuilder,
value: state.value,
placeholder: placeholder,
disabledPlaceholder: disabledPlaceholder,
onTap: onTap,
elevation: elevation,
style: style,
icon: icon,
iconDisabledColor: iconDisabledColor,
iconEnabledColor: iconEnabledColor,
iconSize: iconSize,
isExpanded: isExpanded,
focusColor: focusColor,
focusNode: state.focusNode,
autofocus: autofocus,
popupColor: popupColor,
onChanged: state.readOnly
? null
: (value) {
state.didChange(value);
state.requestFocusOnUserInteraction();
},
);
});