DropDown constructor

DropDown({
  1. Key? key,
  2. required List<DropDownItem> itemsData,
  3. String title = "",
  4. required double width,
  5. double? height,
  6. String hintText = "",
  7. TextStyle? titleStyle,
  8. TextStyle? hintStyle,
  9. TextStyle? textStyle,
  10. Color? borderColor,
  11. Color? color,
  12. Alignment align = Alignment.centerLeft,
  13. EdgeInsetsGeometry padding = EdgeInsets.zero,
  14. int flex = 1,
  15. bool expands = false,
  16. double? borderWith,
  17. double? radius,
  18. Color? hoverColor,
  19. Color? dropdownColor,
  20. required void onChange(
    1. 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;
}