DropdownList constructor
const
DropdownList({
- Key? key,
- double? width,
- double height = 38,
- Color borderColor = const Color(0x60e4e4e4),
- double borderWidth = 0,
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(4)),
- BorderRadius dialogBorderRadius = const BorderRadius.only(topLeft: Radius.circular(4), topRight: Radius.circular(4)),
- Color backgroundColor = Colors.white,
- List<
Color> buttonBackgroundColors = const [Color(0xff1afa29), Color(0xff1afa29)], - List<
Color> buttonDisableBackgroundColors = const [Color(0x661afa29), Color(0x661afa29)], - Color buttonIconColor = const Color(0x99333333),
- Color dialogBackgroundColor = Colors.white,
- required List<
ListItem> items, - String? title,
- Color? titleColor,
- double? titleSize,
- Widget? submit,
- String? submitText,
- Color? submitTextColor,
- double? submitTextSize,
- BorderRadiusGeometry submitBorderRadius = const BorderRadius.all(Radius.circular(5)),
- Color? submitBackgroundColor,
- bool isPreSelect = true,
- bool isMultiSelect = false,
- required dynamic selectCall(),
- String hintText = "",
- String leastSelectHintText = "",
- String defaultValue = "",
- dynamic buildCall(
- DropdownListController controller
- bool enable = true,
- EdgeInsetsGeometry padding = const EdgeInsets.only(left: 6, right: 4),
- AlignmentGeometry alignment = Alignment.center,
- FontWeight? fontWeight,
- Color? listSplitLineColor,
- double itemHeight = 42,
- double? itemTextSize,
- Color? itemTextColor,
- Widget? multiSelectIcon,
- Widget? multiUnSelectIcon,
- Widget? singleSelectIcon,
- Widget? singleUnSelectIcon,
- IconData? buttonArrowUpIcon,
- 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);