SDropdown constructor

const SDropdown({
  1. Key? key,
  2. required List<String> items,
  3. List<String> customItemsNamesDisplayed = const [],
  4. double? width,
  5. double? height,
  6. double? overlayHeight,
  7. double? overlayWidth,
  8. double? scale,
  9. String? selectedItem,
  10. String? initialItem,
  11. String? hintText,
  12. dynamic onChanged(
    1. String?
    )?,
  13. TextStyle? itemTextStyle,
  14. TextStyle? headerTextStyle,
  15. TextStyle? hintTextStyle,
  16. Map<String, TextStyle>? itemSpecificStyles,
  17. Color? closedFillColor,
  18. Color? expandedFillColor,
  19. Border? closedBorder,
  20. Border? expandedBorder,
  21. BorderRadius? closedBorderRadius,
  22. BorderRadius? expandedBorderRadius,
  23. EdgeInsets? closedHeaderPadding,
  24. EdgeInsets? expandedHeaderPadding,
  25. EdgeInsets? itemsListPadding,
  26. EdgeInsets? listItemPadding,
  27. ScrollController? itemsScrollController,
  28. bool excludeSelected = true,
  29. bool canCloseOutsideBounds = true,
  30. bool enabled = true,
  31. AlignmentGeometry? alignment,
  32. int maxLines = 1,
  33. Widget? suffixIcon,
  34. Widget? prefixIcon,
  35. String? validator(
    1. String?
    )?,
  36. bool validateOnChange = true,
  37. SDropdownDecoration? decoration,
  38. Color? headerExpandedColor,
  39. String? selectedItemText,
  40. SDropdownController? controller,
  41. int? autoScrollMaxFrameDelay,
  42. int? autoScrollEndOfFrameDelay,
  43. bool useKeyboardNavigation = true,
  44. FocusNode? focusNode,
  45. bool requestFocusOnInit = false,
})

Implementation

const SDropdown({
  super.key,
  required this.items,
  this.customItemsNamesDisplayed = const [],
  this.width,
  this.height,
  this.overlayHeight,
  this.overlayWidth,
  this.scale,
  this.selectedItem,
  this.initialItem,
  this.hintText,
  this.onChanged,
  this.itemTextStyle,
  this.headerTextStyle,
  this.hintTextStyle,
  this.itemSpecificStyles,
  this.closedFillColor,
  this.expandedFillColor,
  this.closedBorder,
  this.expandedBorder,
  this.closedBorderRadius,
  this.expandedBorderRadius,
  this.closedHeaderPadding,
  this.expandedHeaderPadding,
  this.itemsListPadding,
  this.listItemPadding,
  this.itemsScrollController,
  this.excludeSelected = true,
  this.canCloseOutsideBounds = true,
  this.enabled = true,
  this.alignment,
  this.maxLines = 1,
  this.suffixIcon,
  this.prefixIcon,
  this.validator,
  this.validateOnChange = true,
  this.decoration,
  this.headerExpandedColor,
  this.selectedItemText,
  this.controller,
  this.autoScrollMaxFrameDelay,
  this.autoScrollEndOfFrameDelay,
  this.useKeyboardNavigation = true,
  this.focusNode,
  this.requestFocusOnInit = false,
}) : assert(
        initialItem == null,
        'Use selectedItem instead of initialItem',
      );