BaseDropdown<T> constructor

const BaseDropdown<T>({
  1. Key? key,
  2. List<DropDownModel<T>> initData = const [],
  3. DropDownModel<T>? selectedValue,
  4. String? labelText,
  5. String? hintText,
  6. dynamic onOptionSelected(
    1. DropDownModel<T>?
    )?,
  7. String? validator(
    1. DropDownModel<T>?
    )?,
  8. DropdownDecoration? decoration,
  9. Widget? arrowWidget,
  10. DropdownType dropdownType = DropdownType.expandable,
  11. bool disabled = false,
  12. Future<List<DropDownModel<T>>>? asyncInitData,
  13. bool closeOnTapOutside = true,
})

Implementation

const BaseDropdown({
  super.key,
  this.initData = const [],
  this.selectedValue,
  this.labelText,
  this.hintText,
  this.onOptionSelected,
  this.validator,
  this.decoration,
  this.arrowWidget,
  this.dropdownType = DropdownType.expandable,
  this.disabled = false,
  this.asyncInitData,
  this.closeOnTapOutside = true,
}) : assert(initData.length == 0 || asyncInitData == null,
          "initData and asyncInitData cannot be provided at the same time");