DropDown constructor
DropDown({
- Key? key,
- required List<
DropDownItem> itemsData, - String title = "",
- required double width,
- double? height,
- String hintText = "",
- TextStyle? titleStyle,
- TextStyle? hintStyle,
- TextStyle? textStyle,
- Color? borderColor,
- Color? color,
- Alignment align = Alignment.centerLeft,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
- int flex = 1,
- bool expands = false,
- double? borderWith,
- double? radius,
- Color? hoverColor,
- Color? dropdownColor,
- required void onChange(
- String value
Implementation
DropDown(
{super.key,
required this.itemsData,
this.title = "",
required this.width,
double? height,
this.hintText = "",
TextStyle? titleStyle,
TextStyle? hintStyle,
TextStyle? textStyle,
this.borderColor,
this.color,
this.align = Alignment.centerLeft,
this.padding = EdgeInsets.zero,
this.flex = 1,
this.expands = false,
this.borderWith,
this.radius,
this.hoverColor,
Color? dropdownColor,
required this.onChange})
: _titleStyle = titleStyle ?? Get.find<AppFonts>().small3(isBold: true),
_textStyle = textStyle ?? Get.find<AppFonts>().small3(),
_hintStyle = hintStyle ??
Get.find<AppFonts>()
.small3(color: Get.find<AppColors>().btnTextColor),
_dropdownColor = dropdownColor ?? Get.find<AppColors>().btnColor,
_height = height ??
((textStyle ?? Get.find<AppFonts>().small3()).fontSize! * 2);