FormeFluentComboBox<T extends Object> constructor

FormeFluentComboBox<T extends Object>({
  1. Key? key,
  2. String? name,
  3. T? initialValue,
  4. FormeAsyncValidator<T?>? asyncValidator,
  5. Duration? asyncValidatorDebounce,
  6. AutovalidateMode? autovalidateMode,
  7. FormeFieldDecorator<T?>? decorator,
  8. bool enabled = true,
  9. FocusNode? focusNode,
  10. FormeFieldInitialized<T?>? onInitialized,
  11. FormeFieldSetter<T?>? onSaved,
  12. FormeFieldStatusChanged<T?>? onStatusChanged,
  13. int? order,
  14. bool quietlyValidate = false,
  15. bool readOnly = false,
  16. bool requestFocusOnUserInteraction = true,
  17. FormeFieldValidationFilter<T?>? validationFilter,
  18. FormeValidator<T?>? validator,
  19. bool autofocus = false,
  20. Widget? disabledPlaceholder,
  21. int elevation = 8,
  22. Color? focusColor,
  23. Widget icon = const Icon(FluentIcons.chevron_down),
  24. Color? iconDisabledColor,
  25. Color? iconEnabledColor,
  26. double iconSize = 10,
  27. bool isExpanded = false,
  28. List<ComboBoxItem<T>>? items,
  29. ValueChanged<T?>? onChanged,
  30. VoidCallback? onTap,
  31. Widget? placeholder,
  32. Color? popupColor,
  33. ComboBoxBuilder? selectedItemBuilder,
  34. TextStyle? style,
  35. 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();
                },
        );
      });