AnimatedDropdownSearch constructor

const AnimatedDropdownSearch({
  1. Key? key,
  2. required List<String> data,
  3. required dynamic onSelected(
    1. String val
    )?,
  4. String? hint,
  5. dynamic onSelectedMultiple(
    1. List<String> values
    )?,
  6. TextStyle? hintStyle,
  7. TextStyle? optionTextStyle,
  8. Color? selectedHighlightColor,
  9. bool? enableSearch,
  10. double? maxHeightForOptions,
  11. Color? scrollPercentageColorIndicator,
  12. InputBorder? border,
  13. int? minCharactersToHighlight,
  14. bool? shouldHighlightMatchedText,
  15. Color? matchedTextHighlightColor,
  16. bool? enableAdaptivePositioning,
  17. bool shouldAnimate = true,
  18. TextEditingController? searchController,
  19. FocusNode? searchFocusNode,
  20. Color? fillColor,
  21. bool filled = true,
  22. Alignment optionsAlignment = Alignment.topCenter,
  23. double? width,
  24. Color? overlayBackgroundColor,
  25. Color? cursorColor,
  26. double? cursorHeight,
  27. double? cursorWidth,
  28. Color? highlghtedTextColor,
  29. Color optionTileColor = Colors.white,
})

Implementation

const AnimatedDropdownSearch({
  super.key,
  required this.data,
  required this.onSelected,
  this.hint,
  this.onSelectedMultiple,
  this.hintStyle,
  this.optionTextStyle,
  this.selectedHighlightColor,
  this.enableSearch,
  this.maxHeightForOptions,
  this.scrollPercentageColorIndicator,
  this.border,
  this.minCharactersToHighlight,
  this.shouldHighlightMatchedText,
  this.matchedTextHighlightColor,
  this.enableAdaptivePositioning,
  this.shouldAnimate = true,
  this.searchController,
  this.searchFocusNode,
  this.fillColor,
  this.filled = true,
  this.optionsAlignment = Alignment.topCenter,
  this.width,
  this.overlayBackgroundColor,
  this.cursorColor,
  this.cursorHeight,
  this.cursorWidth,
  this.highlghtedTextColor,
  this.optionTileColor = Colors.white,
})  : assert(onSelectedMultiple == null,
          'onSelectedMultiple is only allowed in the multiple selection constructor.'),
      canSelectMultiple = false,
      showSelectedOptions = false;