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(
{Key? key,
required this.itemsData,
this.title = "",
required this.width,
this.height,
this.hintText = "",
this.titleStyle,
this.hintStyle,
this.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,
this.dropdownColor,
required this.onChange})
: super(key: key) {
titleStyle ??= Get.find<AppFonts>().S(isBold: true);
textStyle ??= Get.find<AppFonts>().S();
hintStyle ??=
Get.find<AppFonts>().S(color: Get.find<AppColors>().btnTextColor);
dropdownColor ??= Get.find<AppColors>().btnColor;
height ??= textStyle!.fontSize! * 2;
}