OptimizedSearchField constructor

const OptimizedSearchField({
  1. required void onChanged(
    1. String text
    )?,
  2. required String? labelText,
  3. required List<String> dropDownList,
  4. ButtonStyle? itemStyle,
  5. EdgeInsets listPadding = const EdgeInsets.symmetric(vertical: 16),
  6. double? itemsSpace,
  7. double menuMaxHeight = 400,
  8. EdgeInsets menuMargin = const EdgeInsets.only(top: 4, bottom: 8),
  9. BoxDecoration? menuDecoration,
  10. Clip listClipBehavior = Clip.hardEdge,
  11. Icon fieldActiveIcon = const Icon(Icons.close),
  12. Icon fieldInactiveIcon = const Icon(Icons.arrow_drop_down),
  13. Key? key,
  14. TextStyle? itemTextStyle,
  15. Key? textFieldKey,
  16. bool? showErrorText,
  17. String? errorText,
  18. TextEditingController? controller,
  19. FocusNode? focusNode,
  20. String? description,
  21. bool? isRequired,
  22. Widget customTextField({
    1. required TextEditingController controller,
    2. required FocusNode focusNode,
    3. required GlobalKey<State<StatefulWidget>> key,
    4. required void onChanged(
      1. String
      )?,
    5. required void onSubmitted(
      1. String
      )?,
    6. required Widget suffixIcon,
    7. required Key? textFieldKey,
    })?,
  23. InputDecoration? fieldDecoration,
  24. Widget? fieldSuffixIcon,
  25. bool usePrototype = true,
  26. List<TextInputFormatter>? fieldInputFormatters,
  27. FutureOr<Iterable<String>> optionsBuilder(
    1. TextEditingValue
    )?,
  28. TextStyle? labelTextStyle,
  29. OptionsViewOpenDirection optionsViewOpenDirection = OptionsViewOpenDirection.down,
  30. TextEditingValue? initValue,
  31. Widget listItem({
    1. required int index,
    2. required bool isEnabled,
    3. required Key? key,
    4. required void onPressed(),
    5. required String value,
    })?,
  32. Key? listKey,
  33. Key? listItemKey,
  34. double? listCacheExtent,
  35. bool listAddSemanticIndexes = true,
  36. ScrollController? listController,
  37. String? listRestorationId,
  38. int? listSemanticChildCount,
  39. DragStartBehavior listDragStartBehavior = DragStartBehavior.start,
  40. ScrollPhysics? listPhysics,
  41. bool? listPrimary,
  42. Key? fieldIconKey,
  43. Widget menuList({
    1. required Widget item(
      1. int index
      ),
    2. required int length,
    })?,
  44. bool useFindChildIndexCallback = true,
})

Implementation

const OptimizedSearchField({
  required this.onChanged,
  required this.labelText,
  required this.dropDownList,
  this.itemStyle,
  this.listPadding = const EdgeInsets.symmetric(vertical: 16),
  this.itemsSpace,
  this.menuMaxHeight = 400,
  this.menuMargin = const EdgeInsets.only(top: 4, bottom: 8),
  this.menuDecoration,
  this.listClipBehavior = Clip.hardEdge,
  this.fieldActiveIcon = const Icon(Icons.close),
  this.fieldInactiveIcon = const Icon(Icons.arrow_drop_down),
  super.key,
  this.itemTextStyle,
  this.textFieldKey,
  this.showErrorText,
  this.errorText,
  this.controller,
  this.focusNode,
  this.description,
  this.isRequired,
  this.customTextField,
  this.fieldDecoration,
  this.fieldSuffixIcon,
  this.usePrototype = true,
  this.fieldInputFormatters,
  this.optionsBuilder,
  this.labelTextStyle,
  this.optionsViewOpenDirection = OptionsViewOpenDirection.down,
  this.initValue,
  this.listItem,
  this.listKey,
  this.listItemKey,
  this.listCacheExtent,
  this.listAddSemanticIndexes = true,
  this.listController,
  this.listRestorationId,
  this.listSemanticChildCount,
  this.listDragStartBehavior = DragStartBehavior.start,
  this.listPhysics,
  this.listPrimary,
  this.fieldIconKey,
  this.menuList,
  this.useFindChildIndexCallback = true,
});