Cascader constructor

const Cascader({
  1. Key? key,
  2. bool allowClear = true,
  3. bool autoFocus = false,
  4. bool bordered = true,
  5. bool changeOnSelect = false,
  6. List<String> defaultValue = const [],
  7. bool disabled = false,
  8. Widget displayBuilder(
    1. String label,
    2. List<CascaderOption> selectedOptions
    )?,
  9. Widget dropdownBuilder(
    1. List<Widget> menus
    )?,
  10. Widget? expandIcon,
  11. CascaderTrigger expandTrigger = CascaderTrigger.click,
  12. Map? fieldNames,
  13. Widget getPopupContainer()?,
  14. void loadData(
    1. List<CascaderOption> selectedOptions
    )?,
  15. int? maxTagCount,
  16. Widget? maxTagPlaceholder,
  17. Widget notFoundContent = const Text('Not Found'),
  18. bool? open,
  19. List<CascaderOption> options = const [],
  20. String placeholder = '请选择',
  21. Alignment placement = Alignment.bottomLeft,
  22. ShowSearch? showSearch,
  23. CascaderSize size = CascaderSize.middle,
  24. CascaderStatus? status,
  25. Widget? suffixIcon,
  26. Widget tagBuilder()?,
  27. List<String>? value,
  28. void onChange(
    1. String value,
    2. List<CascaderOption> selectedOptions
    )?,
  29. void onPopupVisibleChange(
    1. String value
    )?,
  30. bool? multiple,
  31. String? searchValue,
  32. void onSearch(
    1. String search
    )?,
})

Implementation

const Cascader(
    {Key? key,
    this.allowClear = true,
    this.autoFocus = false,
    this.bordered = true,
    this.changeOnSelect = false,
    this.defaultValue = const [],
    this.disabled = false,
    this.displayBuilder,
    this.dropdownBuilder,
    this.expandIcon,
    this.expandTrigger = CascaderTrigger.click,
    this.fieldNames,
    this.getPopupContainer,
    this.loadData,
    this.maxTagCount,
    this.maxTagPlaceholder,
    this.notFoundContent = const Text('Not Found'),
    this.open,
    this.options = const [],
    this.placeholder = '请选择',
    this.placement = Alignment.bottomLeft,
    this.showSearch,
    this.size = CascaderSize.middle,
    this.status,
    this.suffixIcon,
    this.tagBuilder,
    this.value,
    this.onChange,
    this.onPopupVisibleChange,
    this.multiple,
    this.searchValue,
    this.onSearch})
    : super(key: key);