OptimusSelectInput<T> class

Select allows users to enter or select one or multiple options from the list of available options.

The list opens as a dropdown menu, and it is available in many variations. This select component is most commonly found in form patterns.

Inheritance

Constructors

OptimusSelectInput({Key? key, String? label, String placeholder = '', T? value, required List<OptimusDropdownTile<T>> items, required ValueBuilder<T> builder, bool isEnabled = true, bool isRequired = false, Widget? leading, Widget? prefix, Widget? trailing, Widget? suffix, Widget? caption, Widget? secondaryCaption, String? error, OptimusWidgetSize size = OptimusWidgetSize.large, required ValueSetter<T> onChanged, TextEditingController? controller, ValueSetter<String>? onTextChanged, FocusNode? focusNode, bool? readOnly, bool showLoader = false, Widget? emptyResultPlaceholder, OptimusDropdownEmbeddedSearch? embeddedSearch, Grouper<T>? groupBy, GroupBuilder? groupBuilder, bool multiselect = false, List<T>? selectedValues})
const

Properties

builder ValueBuilder<T>
final
caption Widget?
Serves as a helper text for informative or descriptive purposes.
final
controller TextEditingController?
final
embeddedSearch OptimusDropdownEmbeddedSearch?
An embedded search field that can be used to filter the list of items. Will be displayed as a part of the dropdown menu. If the controller or onTextChanged is provided, the embedded search will not be used. Instead the search will be a part of the input field.
final
emptyResultPlaceholder Widget?
A widget that is displayed when the list of items is empty. If not provided the dropdown will not be displayed.
final
error String?
final
focusNode FocusNode?
final
groupBuilder GroupBuilder?
A builder that would create a group header. If not provided the OptimusDropdownGroupSeparator widget will be used.
final
groupBy Grouper<T>?
A function that would retrieve value for the grouping.
final
hashCode int
The hash code for this object.
no setterinherited
isEnabled bool
final
isRequired bool
final
items List<OptimusDropdownTile<T>>
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String?
Describes the purpose of the select field.
final
leading Widget?
final
multiselect bool
If enabled, you can select multiple items at the same time. State of the selected items is managed outside this widget and has to be set in selectedValues.
final
onChanged ValueSetter<T>
final
onTextChanged ValueSetter<String>?
final
placeholder String
final
prefix Widget?
final
readOnly bool?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryCaption Widget?
final
selectedValues List<T>?
List of selected values. Would be omitted if the multiselect is disabled.
final
showLoader bool
final
size OptimusWidgetSize
final
suffix Widget?
final
trailing Widget?
final
value → T?
final

Methods

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