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(
    {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);