HcDropdownSearch<T> class

Inheritance

Constructors

HcDropdownSearch({Key? key, FormFieldSetter<T>? onSaved, FormFieldValidator<T>? validator, AutovalidateMode? autoValidateMode = AutovalidateMode.disabled, ValueChanged<T?>? onChanged, List<T> items = const [], T? selectedItem, HcDropdownSearchOnFind<T>? asyncItems, HcDropdownSearchBuilder<T>? dropdownBuilder, HcDropDownDecoratorProps dropdownDecoratorProps = const HcDropDownDecoratorProps(), HcClearButtonProps clearButtonProps = const HcClearButtonProps(), HcDropdownButtonProps dropdownButtonProps = const HcDropdownButtonProps(), bool enabled = true, HcDropdownSearchFilterFunction<T>? filterFn, HcDropdownSearchItemAsString<T>? itemAsString, HcDropdownSearchCompareFunction<T>? compareFn, BeforeChange<T>? onBeforeChange, BeforePopupOpening<T>? onBeforePopupOpening, PopupProps<T> popupProps = const PopupProps.menu()})
HcDropdownSearch.multiSelection({Key? key, AutovalidateMode? autoValidateMode = AutovalidateMode.disabled, List<T> items = const [], HcDropdownSearchOnFind<T>? asyncItems, HcDropDownDecoratorProps dropdownDecoratorProps = const HcDropDownDecoratorProps(), HcClearButtonProps clearButtonProps = const HcClearButtonProps(), HcDropdownButtonProps dropdownButtonProps = const HcDropdownButtonProps(), bool enabled = true, HcDropdownSearchFilterFunction<T>? filterFn, HcDropdownSearchItemAsString<T>? itemAsString, HcDropdownSearchCompareFunction<T>? compareFn, List<T> selectedItems = const [], HcPopupPropsMultiSelection<T> popupProps = const HcPopupPropsMultiSelection.menu(), FormFieldSetter<List<T>>? onSaved, ValueChanged<List<T>>? onChanged, BeforeChangeMultiSelection<T>? onBeforeChange, BeforePopupOpeningMultiSelection<T>? onBeforePopupOpening, FormFieldValidator<List<T>>? validator, HcDropdownSearchBuilderMultiSelection<T>? dropdownBuilder})

Properties

asyncItems HcDropdownSearchOnFind<T>?
function that returns item from API
final
autoValidateMode AutovalidateMode?
Used to configure the auto validation of FormField and Form widgets.
final
clearButtonProps HcClearButtonProps
custom dropdown clear button icon properties
final
compareFn HcDropdownSearchCompareFunction<T>?
function that compares two object with the same type to detected if it's the selected item or not
final
to customize list of items UI
final
to customize list of items UI in MultiSelection mode
final
custom dropdown icon button properties
final
dropdown decoration props
final
enabled bool
enable/disable dropdownSearch
final
filterFn HcDropdownSearchFilterFunction<T>?
custom filter function
final
hashCode int
The hash code for this object.
no setterinherited
isMultiSelectionMode bool
define whatever we are in multi selection mode or single selection mode
final
itemAsString HcDropdownSearchItemAsString<T>?
customize the fields the be shown
final
items List<T>
offline items list
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onBeforeChange BeforeChange<T>?
callback executed before applying value change
final
onBeforeChangeMultiSelection BeforeChangeMultiSelection<T>?
callback executed before applying values changes
final
onBeforePopupOpening BeforePopupOpening<T>?
a callBack will be called before opening le popup if the callBack return FALSE, the opening of the popup will be cancelled
final
onBeforePopupOpeningMultiSelection BeforePopupOpeningMultiSelection<T>?
a callBack will be called before opening le popup if the callBack return FALSE, the opening of the popup will be cancelled
final
onChanged ValueChanged<T?>?
called when a new item is selected
final
onChangedMultiSelection ValueChanged<List<T>>?
called when a new items are selected
final
onSaved FormFieldSetter<T>?
An optional method to call with the final value when the form is saved via
final
onSavedMultiSelection FormFieldSetter<List<T>>?
An optional method to call with the final value when the form is saved via
final
popupProps HcPopupPropsMultiSelection<T>
custom props to single mode popup
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItem → T?
selected item
final
selectedItems List<T>
selected items
final
validator FormFieldValidator<T>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
final
validatorMultiSelection FormFieldValidator<List<T>>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() HcDropdownSearchState<T>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited