SearchDropdownFormField<T> constructor

const SearchDropdownFormField<T>({
  1. Key? key,
  2. required FormGroup form,
  3. required ListTile dropdownItemFn(
    1. T item,
    2. int position,
    3. bool focused,
    4. bool selected,
    5. dynamic onTap(),
    ),
  4. required Widget displayItemFn(
    1. T? item
    ),
  5. required Future<List<T>> findFn(
    1. String str
    ),
  6. bool filterFn(
    1. T item,
    2. String str
    )?,
  7. bool autoFocus = false,
  8. SearchDropdownEditingController<T>? controller,
  9. InputDecoration? decoration,
  10. Color? dropdownColor,
  11. void onChanged(
    1. T item
    )?,
  12. void onSaved(
    1. T?
    )?,
  13. double? dropdownHeight,
  14. TextStyle? searchTextStyle,
  15. Color? cursorColor,
  16. String emptyText = "No matching found!",
  17. String emptyActionText = 'Create new',
  18. Future<void> onEmptyActionPressed(
    1. String value
    )?,
  19. Widget? dropdownItemSeparator,
  20. bool selectedFn(
    1. T? item1,
    2. T? item2
    )?,
  21. void onFieldTap()?,
  22. required String formControlName,
  23. ShowErrorsFunction<T>? showErrors,
  24. bool enabled = true,
})

Implementation

const SearchDropdownFormField({
  Key? key,
  required this.form,
  required this.dropdownItemFn,
  required this.displayItemFn,
  required this.findFn,
  this.filterFn,
  this.autoFocus = false,
  this.controller,
  this.decoration,
  this.dropdownColor,
  this.onChanged,
  this.onSaved,
  this.dropdownHeight,
  this.searchTextStyle,
  this.cursorColor,
  this.emptyText = "No matching found!",
  this.emptyActionText = 'Create new',
  this.onEmptyActionPressed,
  this.dropdownItemSeparator,
  this.selectedFn,
  this.onFieldTap,
  required this.formControlName,
  this.showErrors,
  this.enabled = true,
}) : super(key: key);