DropDownWidget constructor

DropDownWidget({
  1. Key? key,
  2. double? width,
  3. required List<DropDownWidgetItem> data,
  4. dynamic onChanged(
    1. DropDownWidgetItem item,
    2. int indexSelected
    )?,
  5. int? indexSelected,
  6. DropDownExpandType dropDownExpandType = DropDownExpandType.down,
  7. double height = 49,
  8. int countItemExpandList = DropDownWidgetConstants.countItemExpandDefault,
  9. String? label,
  10. TextStyle? labelStyle,
  11. bool showLabelInList = false,
  12. String? labelValueDefault,
  13. Color backgroundColor = Colors.white,
  14. Color backgroundListColor = Colors.white,
  15. Color? borderColor,
  16. bool forceChangeIndex = false,
  17. bool showArrow = true,
})

Implementation

DropDownWidget({
  Key? key,
  this.width,
  required this.data,
  this.onChanged,
  this.indexSelected,
  this.dropDownExpandType = DropDownExpandType.down,
  this.height = 49,
  this.countItemExpandList = DropDownWidgetConstants.countItemExpandDefault,
  this.label,
  this.labelStyle,
  this.showLabelInList = false,
  this.labelValueDefault,
  this.backgroundColor = Colors.white,
  this.backgroundListColor = Colors.white,
  this.borderColor,
  this.forceChangeIndex = false,
  this.showArrow = true,
})  : assert(
        data.isNotEmpty,
        'A non-null data must be provided to a list widget.',
      ),
      super(key: key);