MultiSearchField class
A widget that provides a multi-select search field with dropdown options.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MultiSearchField
Constructors
-
MultiSearchField.new({required String? labelText, required List<
String> dropDownList, required void removeEvent(String value)?, required List<String> ? values, required void onSelected(String text)?, required Widget fieldSuffixIcon({required VoidCallback onCloseIconTap, required VoidCallback onlyCloseMenu})?, double selectListSpacing = 8, double selectListItemSpacing = 8, double selectListItemRunSpacing = 8, EdgeInsets listPadding = const EdgeInsets.symmetric(vertical: 16), Clip listClipBehavior = Clip.hardEdge, bool usePrototype = true, Key? textFieldKey, Key? key, bool? showErrorText, String? errorText, int? errorMaxLines, String? description, String? allElements, bool? isRequired, TextStyle? itemTextStyle, double? itemsSpace, ButtonStyle? itemStyle, InputDecoration? fieldDecoration, int? selectedItemMaxLines, ButtonStyle? selectedItemStyle, TextStyle? selectedItemTextStyle, Clip? selectedItemClipBehavior, Widget? selectedItemIcon, double? selectedItemSpacing, TextAlign? selectedItemTextAlign, TextOverflow? selectedItemTextOverflow, Widget customTextField({required TextEditingController controller, required FocusNode focusNode, required GlobalKey<State< key, required void onChanged(String)?, required void onSubmitted(String)?, required Widget? suffixIcon, required Key? textFieldKey})?, List<StatefulWidget> >TextInputFormatter> ? fieldInputFormatters, TextEditingController? controller, FocusNode? focusNode, TextStyle? labelTextStyle, OptionsViewOpenDirection optionsViewOpenDirection = OptionsViewOpenDirection.down, Widget listButtonItem({required int index, required bool isEnabled, required Key? key, required void onPressed(), required String value})?, double? listCacheExtent, bool listAddSemanticIndexes = true, ScrollController? listController, String? listRestorationId, int? listSemanticChildCount, DragStartBehavior listDragStartBehavior = DragStartBehavior.start, ScrollPhysics? listPhysics, bool? listPrimary, Key? fieldIconKey, Key? listKey, Key? listItemKey, Key? selectedListKey, Key? selectedListItemKey, Widget selectedWidget(String value)?, bool useFindChildIndexCallback = true}) -
const
Properties
- allElements → String?
-
All elements text
final
- controller → TextEditingController?
-
Controller for the search field
final
-
customTextField
→ Widget Function({required TextEditingController controller, required FocusNode focusNode, required GlobalKey<
State< key, required void onChanged(String)?, required void onSubmitted(String)?, required Widget? suffixIcon, required Key? textFieldKey})?StatefulWidget> > -
Custom text field widget
final
- description → String?
-
Description for the search field
final
-
dropDownList
→ List<
String> -
List of dropdown items
final
- errorMaxLines → int?
-
Maximum number of lines for the error text
final
- errorText → String?
-
Error text for the search field
final
- fieldDecoration → InputDecoration?
-
Decoration for the search field
final
- fieldIconKey → Key?
-
final
-
fieldInputFormatters
→ List<
TextInputFormatter> ? -
Input formatters for the search field
final
- fieldSuffixIcon → Widget Function({required VoidCallback onCloseIconTap, required VoidCallback onlyCloseMenu})?
-
Suffix icon for the search field
final
- focusNode → FocusNode?
-
Focus node for the search field
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRequired → bool?
-
Whether the search field is required
final
- itemsSpace → double?
-
Space between items in the list
final
- itemStyle → ButtonStyle?
-
Style for the items
final
- itemTextStyle → TextStyle?
-
Style for the dropdown items
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelText → String?
-
Label text for the search field
final
- labelTextStyle → TextStyle?
-
Style for the label text
final
- listAddSemanticIndexes → bool
-
final
- listButtonItem → Widget Function({required int index, required bool isEnabled, required Key? key, required void onPressed(), required String value})?
-
Custom list item widget
final
- listCacheExtent → double?
-
final
- listClipBehavior → Clip
-
Clip behavior for the list
final
- listController → ScrollController?
-
final
- listDragStartBehavior → DragStartBehavior
-
final
- listItemKey → Key?
-
final
- listKey → Key?
-
final
- listPadding → EdgeInsets
-
Padding for the list inside the menu
final
- listPhysics → ScrollPhysics?
-
final
- listPrimary → bool?
-
final
- listRestorationId → String?
-
final
- listSemanticChildCount → int?
-
final
-
Decoration for the menu
final
-
Custom list widget
final
-
Margin for the menu
final
-
Maximum height for the menu
final
- onSelected → void Function(String text)?
-
Callback for text change
final
- optionsViewOpenDirection → OptionsViewOpenDirection
-
Direction for the options view
final
- removeEvent → void Function(String value)?
-
Callback for removing an item
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedItemClipBehavior → Clip?
-
Clip behavior for the selected item
final
- selectedItemIcon → Widget?
-
Icon for the selected item
final
- selectedItemMaxLines → int?
-
Maximum number of lines for the selected item
final
- selectedItemSpacing → double?
-
Spacing for the selected item
final
- selectedItemStyle → ButtonStyle?
-
Style for the selected item
final
- selectedItemTextAlign → TextAlign?
-
Text alignment for the selected item
final
- selectedItemTextOverflow → TextOverflow?
-
Text overflow for the selected item
final
- selectedItemTextStyle → TextStyle?
-
Text style for the selected item
final
- selectedListItemKey → Key?
-
final
- selectedListKey → Key?
-
final
- selectedWidget → Widget Function(String value)?
-
final
- selectListItemRunSpacing → double
-
Run spacing between items in the list
final
- selectListItemSpacing → double
-
Spacing between items in the list
final
- selectListSpacing → double
-
Spacing between selected items
final
- showErrorText → bool?
-
Whether to show the error text
final
- textFieldKey → Key?
-
Key for the text field
final
- useFindChildIndexCallback → bool
-
Whether to use the find child index callback
final
- usePrototype → bool
-
Whether to use the prototype
final
-
values
→ List<
String> ? -
List of selected values
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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