Cascader constructor
const
Cascader({
- Key? key,
- bool allowClear = true,
- bool autoFocus = false,
- bool bordered = true,
- bool changeOnSelect = false,
- List<
String> defaultValue = const [], - bool disabled = false,
- Widget displayBuilder(
- String label,
- List<
CascaderOption> selectedOptions
- Widget dropdownBuilder(
- Widget? expandIcon,
- CascaderTrigger expandTrigger = CascaderTrigger.click,
- Map? fieldNames,
- Widget getPopupContainer()?,
- void loadData(
- List<
CascaderOption> selectedOptions
- List<
- int? maxTagCount,
- Widget? maxTagPlaceholder,
- Widget notFoundContent = const Text('Not Found'),
- bool? open,
- List<
CascaderOption> options = const [], - String placeholder = '请选择',
- Alignment placement = Alignment.bottomLeft,
- ShowSearch? showSearch,
- CascaderSize size = CascaderSize.middle,
- CascaderStatus? status,
- Widget? suffixIcon,
- Widget tagBuilder()?,
- List<
String> ? value, - void onChange(
- String value,
- List<
CascaderOption> selectedOptions
- void onPopupVisibleChange(
- String value
- bool? multiple,
- String? searchValue,
- void onSearch(
- 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);