CAutocomplete<T extends Object> class
A widget that provides autocomplete functionality for a given list of options.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CAutocomplete
Constructors
-
CAutocomplete.bordered({Color? foregroundColor, CFieldDecoration decoration = const CFieldDecoration(), required List<
T> options, required String optionsValueToMatch(T option), required String displayStringForOption(T option), required void searchItems(), void onSelected(T option)?, String? initialValue, String? validator(String?)?, FocusNode? focusNode}) -
Creates a bordered autocomplete field.
factory
-
CAutocomplete.borderedFilled({Color? backgroundColor, Color? foregroundColor, LinearGradient? gradient, CFieldDecoration decoration = const CFieldDecoration(), required List<
T> options, required String optionsValueToMatch(T option), required String displayStringForOption(T option), required void searchItems(), void onSelected(T option)?, String? initialValue, String? validator(String?)?, FocusNode? focusNode}) -
Creates a bordered and filled autocomplete field.
factory
-
CAutocomplete.filled({Color? backgroundColor, Color? foregroundColor, LinearGradient? gradient, CFieldDecoration decoration = const CFieldDecoration(), required List<
T> options, required String optionsValueToMatch(T option), required String displayStringForOption(T option), required void searchItems(), void onSelected(T option)?, String? initialValue, String? validator(String?)?, FocusNode? focusNode}) -
Creates a filled autocomplete field.
factory
-
CAutocomplete.simple({Color? foregroundColor, CFieldDecoration decoration = const CFieldDecoration(), required List<
T> options, required String optionsValueToMatch(T option), required String displayStringForOption(T option), required void searchItems(), void onSelected(T option)?, String? initialValue, String? validator(String?)?, FocusNode? focusNode}) -
Creates a simple autocomplete field.
factory
Properties
- decoration → CFieldDecoration
-
Decoration for the field.
final
- displayStringForOption → String Function(T option)
-
Function to get the display string for an option.
final
- focusNode → FocusNode?
-
Focus node for the autocomplete field.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → String?
-
Initial value for the autocomplete field.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onSelected → (void Function(T option)?)
-
Callback when an option is selected.
final
-
options
→ List<
T> -
List of options for autocomplete.
final
- optionsValueToMatch → String Function(T option)
-
Function to convert an option value to a string for matching.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchItems → void Function()
-
Function to trigger search for items.
final
- style → CFieldStyle
-
Style for the field.
final
- validator → (String? Function(String?)?)
-
Validator function for the autocomplete field.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CAutocomplete< 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