FCCDropdownList<T> constructor

const FCCDropdownList<T>({
  1. Key? key,
  2. String? labelText,
  3. T? value,
  4. List<DropdownMenuItem<T>>? items,
  5. ValueChanged<T?>? onChanged,
  6. FormFieldValidator<T>? validator,
  7. bool readOnly = false,
  8. Color? fillColor,
  9. double? fontSize,
  10. FontWeight? fontWeight,
  11. String? fontFamily,
  12. Color? textColor,
  13. TextStyle? style,
  14. TextAlign? textAlign,
  15. String? helperText,
  16. String? hintText,
  17. bool required = false,
  18. String? requiredMessage,
  19. bool use3DEffect = true,
  20. bool isPill = false,
  21. bool enableFocusEffect = true,
  22. String? tooltip,
  23. String? semanticLabel,
  24. bool isSearchable = false,
  25. String? searchPlaceholder,
  26. Duration searchDebounce = const Duration(milliseconds: 250),
  27. Future<List<DropdownMenuItem<T>>> asyncItemsFetcher(
    1. String query
    )?,
  28. String searchTextResolver(
    1. T value
    )?,
  29. bool showClearButton = false,
  30. List<FCCDropdownGroup<T>>? groups,
  31. Widget itemBuilder(
    1. BuildContext context,
    2. T value,
    3. bool isSelected
    )?,
  32. bool pinSelectedOnTop = false,
  33. bool autoFlipDropdown = true,
  34. double maxDropdownHeight = 260.0,
})

Implementation

const FCCDropdownList({
  super.key,
  this.labelText,
  this.value,
  this.items,
  this.onChanged,
  this.validator,
  this.readOnly = false,
  this.fillColor,
  this.fontSize,
  this.fontWeight,
  this.fontFamily,
  this.textColor,
  this.style,
  this.textAlign,
  this.helperText,
  this.hintText,
  this.required = false,
  this.requiredMessage,
  this.use3DEffect = true,
  this.isPill = false,
  this.enableFocusEffect = true,
  this.tooltip,
  this.semanticLabel,

  // NEW
  this.isSearchable = false,
  this.searchPlaceholder,
  this.searchDebounce = const Duration(milliseconds: 250),
  this.asyncItemsFetcher,
  this.searchTextResolver,
  this.showClearButton = false,
  this.groups,
  this.itemBuilder,
  this.pinSelectedOnTop = false,
  this.autoFlipDropdown = true,
  this.maxDropdownHeight = 260.0,
});