WFDropdown.singleSelection constructor Null safety

const WFDropdown.singleSelection(
  1. {Key? key,
  2. required List<WFDropdownItem> list,
  3. required dynamic onSingleItemListener(
    1. WFDropdownItem selectedItem
    )?,
  4. String? selectedId,
  5. String title = "",
  6. String labelText = "",
  7. String hintText = "",
  8. bool enabled = true,
  9. TextAlign textAlign = TextAlign.start,
  10. InputBorder border = const OutlineInputBorder(),
  11. bool searchBox = true,
  12. String searchBoxHintText = _searchHere,
  13. IconData prefixSearchBoxIcon = _icSearch,
  14. Color selectedBackgroundColor = Colors.black12,
  15. String negativeButtonText = _cancel,
  16. 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);