BaseMultiSearchField<T extends Object> class

A base multi-select search field widget with customizable options.

Inheritance

Constructors

BaseMultiSearchField.new({required void onSelected(String text)?, required String labelText, required List<T> dropDownList, required List<T>? values, required void removeEvent(T value)?, required Widget item(T element), required FutureOr<Iterable<T>> optionsBuilder(TextEditingValue), required String getItemText(T value)?, String? errorText, bool? showErrorText, double selectListSpacing = 8, double selectListItemSpacing = 8, double selectListItemRunSpacing = 8, double menuMaxHeight = 400, EdgeInsets menuMargin = const EdgeInsets.only(top: 4, bottom: 8), EdgeInsets listPadding = const EdgeInsets.symmetric(vertical: 16), Clip listClipBehavior = Clip.hardEdge, Icon fieldActiveIcon = const Icon(Icons.close), Icon fieldInactiveIcon = const Icon(Icons.arrow_drop_down), bool usePrototype = true, Key? textFieldKey, bool? isRequired, Key? key, List<Widget>? trailingList, Icon? unfocusSuffixIcon, double? suffixIconPadding, FocusNode? focusNode, int? errorMaxLines, String? description, T? allElements, BoxDecoration? menuDecoration, double? itemsSpace, ButtonStyle? itemStyle, InputDecoration? fieldDecoration, Widget? fieldSuffixIcon, Widget customTextField({required TextEditingController controller, required FocusNode focusNode, required GlobalKey<State<StatefulWidget>> key, required void onChanged(String)?, required void onSubmitted(String)?, required Widget suffixIcon, required Key? textFieldKey})?, Widget selectedWidget(T value)?, int? selectedItemMaxLines, ButtonStyle? selectedItemStyle, TextStyle? selectedItemTextStyle, Clip? selectedItemClipBehavior, Widget? selectedItemIcon, double? selectedItemSpacing, TextAlign? selectedItemTextAlign, TextOverflow? selectedItemTextOverflow, List<TextInputFormatter>? fieldInputFormatters, TextEditingController? controller, TextStyle? labelTextStyle, OptionsViewOpenDirection optionsViewOpenDirection = OptionsViewOpenDirection.down, Widget listButtonItem({required int index, required bool isEnabled, required Key? key, required void onPressed(), required T value})?, double? listCacheExtent, bool listAddSemanticIndexes = true, ScrollController? listController, String? listRestorationId, int? listSemanticChildCount, DragStartBehavior listDragStartBehavior = DragStartBehavior.start, ScrollPhysics? listPhysics, bool? listPrimary, Key? fieldIconKey, Widget menuList({required Widget item(int index), required int length})?, Key? listKey, Key? listItemKey, Key? selectedListKey, Key? selectedListItemKey, bool useFindChildIndexCallback = true})
const

Properties

allElements → T?
final
controller TextEditingController?
final
customTextField Widget Function({required TextEditingController controller, required FocusNode focusNode, required GlobalKey<State<StatefulWidget>> key, required void onChanged(String)?, required void onSubmitted(String)?, required Widget suffixIcon, required Key? textFieldKey})?
final
description String?
final
final
errorMaxLines int?
final
errorText String?
final
fieldActiveIcon Icon
final
fieldDecoration InputDecoration?
final
fieldIconKey Key?
final
fieldInactiveIcon Icon
final
fieldInputFormatters List<TextInputFormatter>?
final
fieldSuffixIcon Widget?
final
focusNode FocusNode?
final
getItemText String Function(T value)?
final
hashCode int
The hash code for this object.
no setterinherited
isRequired bool?
final
item Widget Function(T element)
final
itemsSpace double?
final
itemStyle ButtonStyle?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelText String
final
labelTextStyle TextStyle?
final
listAddSemanticIndexes bool
final
listButtonItem Widget Function({required int index, required bool isEnabled, required Key? key, required void onPressed(), required T value})?
final
listCacheExtent double?
final
listClipBehavior Clip
final
listController ScrollController?
final
listDragStartBehavior DragStartBehavior
final
listItemKey Key?
final
listKey Key?
final
listPadding EdgeInsets
final
listPhysics ScrollPhysics?
final
listPrimary bool?
final
listRestorationId String?
final
listSemanticChildCount int?
final
final
Custom list widget
final
final
final
onSelected → void Function(String text)?
final
optionsBuilder FutureOr<Iterable<T>> Function(TextEditingValue)
final
optionsViewOpenDirection OptionsViewOpenDirection
final
removeEvent → void Function(T value)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItemClipBehavior Clip?
final
selectedItemIcon Widget?
final
selectedItemMaxLines int?
final
selectedItemSpacing double?
final
selectedItemStyle ButtonStyle?
final
selectedItemTextAlign TextAlign?
final
selectedItemTextOverflow TextOverflow?
final
selectedItemTextStyle TextStyle?
final
selectedListItemKey Key?
final
selectedListKey Key?
final
selectedWidget Widget Function(T value)?
final
selectListItemRunSpacing double
final
selectListItemSpacing double
final
selectListSpacing double
final
showErrorText bool?
final
suffixIconPadding double?
final
textFieldKey Key?
final
trailingList List<Widget>?
final
unfocusSuffixIcon Icon?
final
useFindChildIndexCallback bool
Whether to use the find child index callback
final
usePrototype bool
final
values List<T>?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BaseMultiSearchField<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