SingleItemDropper<T> constructor

const SingleItemDropper<T>({
  1. Key? key,
  2. required List<ItemDropperItem<T>> items,
  3. ItemDropperItem<T>? selectedItem,
  4. required ItemDropperItemCallback<T> onChanged,
  5. String? hintText,
  6. Widget popupItemBuilder(
    1. BuildContext,
    2. ItemDropperItem<T>,
    3. bool
    )?,
  7. required double width,
  8. bool enabled = true,
  9. bool showKeyboard = false,
  10. ItemDropperItem<T>? onAddItem(
    1. String searchText
    )?,
  11. void onDeleteItem(
    1. ItemDropperItem<T> item
    )?,
  12. GlobalKey<State<StatefulWidget>>? inputKey,
  13. double maxDropdownHeight = SingleSelectConstants.kDefaultMaxDropdownHeight,
  14. double elevation = ItemDropperConstants.kDropdownElevation,
  15. bool showScrollbar = true,
  16. double scrollbarThickness = ItemDropperConstants.kDefaultScrollbarThickness,
  17. TextStyle? fieldTextStyle,
  18. TextStyle? popupTextStyle,
  19. TextStyle? popupGroupHeaderStyle,
  20. double? itemHeight,
  21. BoxDecoration? fieldDecoration,
  22. bool showDropdownPositionIcon = true,
  23. bool showDeleteAllIcon = true,
  24. ItemDropperLocalizations? localizations,
})

Implementation

const SingleItemDropper({
  super.key,
  required this.items,
  this.selectedItem,
  required this.onChanged,
  this.hintText,
  this.popupItemBuilder,
  required this.width,
  this.enabled = true,
  this.showKeyboard = false,
  this.onAddItem,
  this.onDeleteItem,
  this.inputKey,
  this.maxDropdownHeight = SingleSelectConstants.kDefaultMaxDropdownHeight,
  this.elevation = ItemDropperConstants.kDropdownElevation,
  this.showScrollbar = true,
  this.scrollbarThickness = ItemDropperConstants.kDefaultScrollbarThickness,
  this.fieldTextStyle,
  this.popupTextStyle,
  this.popupGroupHeaderStyle,
  this.itemHeight,
  this.fieldDecoration,
  this.showDropdownPositionIcon = true,
  this.showDeleteAllIcon = true,
  this.localizations,
});