const
WFDropdown.singleSelection(- {Key? key,
- required List<WFDropdownItem> list,
- required dynamic onSingleItemListener(
- WFDropdownItem selectedItem
)?,
- String? selectedId,
- String title = "",
- String labelText = "",
- String hintText = "",
- bool enabled = true,
- TextAlign textAlign = TextAlign.start,
- InputBorder border = const OutlineInputBorder(),
- bool searchBox = true,
- String searchBoxHintText = _searchHere,
- IconData prefixSearchBoxIcon = _icSearch,
- Color selectedBackgroundColor = Colors.black12,
- String negativeButtonText = _cancel,
- Color negativeButtonTextColor = Colors.red}
)
Implementation
const WFDropdown.singleSelection(
{Key? key,
required this.list,
required this.onSingleItemListener,
this.selectedId,
this.title = "",
this.labelText = "",
this.hintText = "",
this.enabled = true,
this.textAlign = TextAlign.start,
this.border = const OutlineInputBorder(),
this.searchBox = true,
this.searchBoxHintText = _searchHere,
this.prefixSearchBoxIcon = _icSearch,
this.selectedBackgroundColor = Colors.black12,
this.negativeButtonText = _cancel,
this.negativeButtonTextColor = Colors.red})
: selectedIds = null,
prefixSeparator = _has,
suffixSeparator = _comma,
positiveButtonText = _ok,
positiveButtonTextColor = Colors.black,
allSelection = false,
checkBoxActiveColor = Colors.black,
onMultipleItemListener = null,
_isMultiple = false,
super(key: key);