DropdownList constructor

const DropdownList({
  1. Key? key,
  2. double? width,
  3. double height = 38,
  4. Color borderColor = const Color(0x60e4e4e4),
  5. double borderWidth = 0,
  6. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(4)),
  7. BorderRadius dialogBorderRadius = const BorderRadius.only(topLeft: Radius.circular(4), topRight: Radius.circular(4)),
  8. Color backgroundColor = Colors.white,
  9. List<Color> buttonBackgroundColors = const [Color(0xff1afa29), Color(0xff1afa29)],
  10. List<Color> buttonDisableBackgroundColors = const [Color(0x661afa29), Color(0x661afa29)],
  11. Color buttonIconColor = const Color(0x99333333),
  12. Color dialogBackgroundColor = Colors.white,
  13. required List<ListItem> items,
  14. String? title,
  15. Color? titleColor,
  16. double? titleSize,
  17. Widget? submit,
  18. String? submitText,
  19. Color? submitTextColor,
  20. double? submitTextSize,
  21. BorderRadiusGeometry submitBorderRadius = const BorderRadius.all(Radius.circular(5)),
  22. Color? submitBackgroundColor,
  23. bool isPreSelect = true,
  24. bool isMultiSelect = false,
  25. required dynamic selectCall(
    1. List<ListItem> selectItems
    ),
  26. String hintText = "",
  27. String leastSelectHintText = "",
  28. String defaultValue = "",
  29. dynamic buildCall(
    1. DropdownListController controller
    )?,
  30. bool enable = true,
  31. EdgeInsetsGeometry padding = const EdgeInsets.only(left: 6, right: 4),
  32. AlignmentGeometry alignment = Alignment.center,
  33. FontWeight? fontWeight,
  34. Color? listSplitLineColor,
  35. double itemHeight = 42,
  36. double? itemTextSize,
  37. Color? itemTextColor,
  38. Widget? multiSelectIcon,
  39. Widget? multiUnSelectIcon,
  40. Widget? singleSelectIcon,
  41. Widget? singleUnSelectIcon,
  42. IconData? buttonArrowUpIcon,
  43. IconData? buttonArrowDownIcon,
})

Implementation

const DropdownList({
  Key? key,
  this.width,
  this.height = 38,
  this.borderColor = const Color(0x60e4e4e4),
  this.borderWidth = 0,
  this.borderRadius = const BorderRadius.all(Radius.circular(4)),
  this.dialogBorderRadius = const BorderRadius.only(topLeft: Radius.circular(4), topRight: Radius.circular(4)),
  this.backgroundColor = Colors.white,
  this.buttonBackgroundColors = const [Color(0xff1afa29), Color(0xff1afa29)],
  this.buttonDisableBackgroundColors = const [Color(0x661afa29), Color(0x661afa29)],
  this.buttonIconColor = const Color(0x99333333),
  this.dialogBackgroundColor = Colors.white,
  required this.items,
  this.title,
  this.titleColor,
  this.titleSize,
  this.submit,
  this.submitText,
  this.submitTextColor,
  this.submitTextSize,
  this.submitBorderRadius = const BorderRadius.all(Radius.circular(5)),
  this.submitBackgroundColor,
  this.isPreSelect = true,
  this.isMultiSelect = false,
  required this.selectCall,
  this.hintText = "",
  this.leastSelectHintText = "",
  this.defaultValue = "",
  this.buildCall,
  this.enable = true,
  this.padding = const EdgeInsets.only(left: 6, right: 4),
  this.alignment = Alignment.center,
  this.fontWeight,
  this.listSplitLineColor,
  this.itemHeight = 42,
  this.itemTextSize,
  this.itemTextColor,
  this.multiSelectIcon,
  this.multiUnSelectIcon,
  this.singleSelectIcon,
  this.singleUnSelectIcon,
  this.buttonArrowUpIcon,
  this.buttonArrowDownIcon,
}) : super(key: key);