CLDropdown<T extends Object> constructor

const CLDropdown<T extends Object>({
  1. Key? key,
  2. required Widget itemBuilder(
    1. BuildContext,
    2. T
    ),
  3. required String valueToShow(
    1. T
    ),
  4. required String hint,
  5. Future<(List<T>, Object?)> asyncSearchCallback({
    1. Map<String, dynamic>? orderBy,
    2. int? page,
    3. int? perPage,
    4. Map<String, dynamic>? searchBy,
    })?,
  6. Future<List<T>> syncSearchCallback(
    1. String
    )?,
  7. List<T> items = const [],
  8. String? searchColumn,
  9. required bool isMultiple,
  10. required List<T> selectedValues,
  11. dynamic onSelectItem(
    1. T?
    )?,
  12. int length = 10,
  13. List<FormFieldValidator<String>>? validators,
  14. bool isEnabled = true,
  15. dynamic onSelectItems(
    1. List<T>
    )?,
  16. dynamic onClearItem()?,
  17. Color? fillColor,
  18. bool isCompact = false,
})

Implementation

const CLDropdown({
  super.key,
  required this.itemBuilder,
  required this.valueToShow,
  required this.hint,
  this.asyncSearchCallback,
  this.syncSearchCallback,
  this.items = const [],
  this.searchColumn,
  required this.isMultiple,
  required this.selectedValues,
  this.onSelectItem,
  this.length = 10,
  this.validators,
  this.isEnabled = true,
  this.onSelectItems,
  this.onClearItem,
  this.fillColor,
  this.isCompact = false,
});