OptimusSearch<T> class
An input field with a dropdown menu. items are displayed in the dropdown and could be filtered to show only matching items.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- OptimusSearch
Constructors
-
OptimusSearch({Key? key, String? label, String placeholder = '', TextStyle? placeholderStyle, TextEditingController? controller, ValueSetter<
String> ? onTextChanged, required List<OptimusDropdownTile< items, bool isUpdating = false, bool isEnabled = true, bool isRequired = false, required ValueSetter<T> >T> onChanged, Widget? leading, Widget? trailing, Widget? helperMessage, String? error, OptimusWidgetSize size = OptimusWidgetSize.large, bool readOnly = false, bool? showCursor, Widget? prefix, Widget? suffix, FocusNode? focusNode, bool shouldCloseOnInputTap = false, bool isClearEnabled = false, Grouper<T> ? groupBy, GroupBuilder? groupBuilder}) -
const
Properties
-
Caption text to be displayed below the search field. Typically a Text
widget.
final
- controller → TextEditingController?
-
Text text editing controller.
final
- error → String?
-
Error text to be displayed below the search field. Typically a Text.
Will replace the caption if both are provided.
final
- focusNode → FocusNode?
-
Custom focus node to be used by the search field.
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
- helperMessage → Widget?
-
Secondary caption text to be displayed on the right of the search field.
Typically a Text widget.
final
- isClearEnabled → bool
-
Controls the visibility of the clear button.
final
- isEnabled → bool
-
Whether the search field is enabled.
final
- isRequired → bool
-
Whether the search field is required.
final
- isUpdating → bool
-
Whether the search field is in updating state. If true, the loading
indicator will be displayed.
final
-
items
→ List<
OptimusDropdownTile< T> > -
List of items to be displayed in the dropdown.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
Label of the search field.
final
- leading → Widget?
-
A leading widget to be displayed before the search field. Typically an
Icon widget.
final
-
onChanged
→ ValueSetter<
T> -
Callback for when the value was selected.
final
-
onTextChanged
→ ValueSetter<
String> ? -
Callback for when the text in the search field changes.
final
- placeholder → String
-
Placeholder of the search field.
final
- placeholderStyle → TextStyle?
-
The style to use for the placeholder text.
final
- prefix → Widget?
-
A prefix widget to be displayed before the search field, but after the
leading widget. Typically a Text widget.
final
- readOnly → bool
-
Whether the text can be changed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldCloseOnInputTap → bool
-
Controls whether the dropdown should close when the input is tapped.
final
- showCursor → bool?
-
Whether to show cursor.
final
- size → OptimusWidgetSize
-
Size of the search field.
final
- suffix → Widget?
-
A suffix widget to be displayed after the search field. Typically a
Text widget.
final
- trailing → Widget?
-
A trailing widget to be displayed after the search field. Typically an
Icon widget. Will be displayed after the suffix widget.
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}) → 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