DropdownSearch<T> class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DropdownSearch
Constructors
-
DropdownSearch.new({Key? key, T? selectedItem, Mode mode = Mode.form, AutovalidateMode? autoValidateMode = AutovalidateMode.disabled, ValueChanged<
T?> ? onChanged, DropdownSearchOnFind<T> ? items, DropdownSearchBuilder<T> ? dropdownBuilder, DropdownSuffixProps suffixProps = const DropdownSuffixProps(), ClickProps clickProps = const ClickProps(), bool enabled = true, DropdownSearchFilterFn<T> ? filterFn, DropdownSearchItemAsString<T> ? itemAsString, DropdownSearchCompareFn<T> ? compareFn, BeforeChange<T> ? onBeforeChange, BeforePopupOpening<T> ? onBeforePopupOpening, PopupProps<T> popupProps = const PopupProps.menu(), FormFieldSetter<T> ? onSaved, FormFieldValidator<T> ? validator, DropDownDecoratorProps? decoratorProps}) -
DropdownSearch.multiSelection({Key? key, Mode mode = Mode.form, AutovalidateMode? autoValidateMode = AutovalidateMode.disabled, DropdownSearchOnFind<
T> ? items, DropdownSuffixProps suffixProps = const DropdownSuffixProps(), ClickProps clickProps = const ClickProps(), bool enabled = true, DropdownSearchFilterFn<T> ? filterFn, DropdownSearchItemAsString<T> ? itemAsString, DropdownSearchCompareFn<T> ? compareFn, List<T> selectedItems = const [], PopupPropsMultiSelection<T> popupProps = const PopupPropsMultiSelection.menu(), ScrollProps? selectedItemsScrollProps, ValueChanged<List< ? onChanged, BeforeChangeMultiSelection<T> >T> ? onBeforeChange, BeforePopupOpeningMultiSelection<T> ? onBeforePopupOpening, DropdownSearchBuilderMultiSelection<T> ? dropdownBuilder, FormFieldSetter<List< ? onSaved, FormFieldValidator<T> >List< ? validator, DropDownDecoratorProps? decoratorProps})T> > -
const
Properties
- autoValidateMode → AutovalidateMode?
-
Used to configure the auto validation of FormField and Form widgets.
final
- clickProps → ClickProps
-
dropdown click properties
final
-
compareFn
→ DropdownSearchCompareFn<
T> ? -
function that compares two object with the same type to detected if it's the selected item or not
final
- decoratorProps → DropDownDecoratorProps
-
dropdown decoration props
final
-
dropdownBuilder
→ DropdownSearchBuilder<
T> ? -
to customize list of items UI
final
-
dropdownBuilderMultiSelection
→ DropdownSearchBuilderMultiSelection<
T> ? -
to customize list of items UI in MultiSelection mode
final
- enabled → bool
-
enable/disable dropdownSearch
final
-
filterFn
→ DropdownSearchFilterFn<
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
→ DropdownSearchItemAsString<
T> ? -
customize the fields the be shown
final
-
items
→ DropdownSearchOnFind<
T> ? -
items/data
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mode → Mode
-
final
-
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
→ PopupPropsMultiSelection<
T> -
custom props to single mode popup
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedItems
→ List<
T> -
selected items
final
- selectedItemsScrollProps → ScrollProps?
-
scroll props for selected item on the dropdown.
example :
final
- suffixProps → DropdownSuffixProps
-
custom suffix widget props
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(
) → DropdownSearchState< 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, int wrapWidth = 65}) → 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