SkdxAutocomplete<T extends Object> class

Typed autocomplete with native Flutter text editing and an anchored, lazy options overlay. Accepts Flutter's synchronous/async options builder contract. validator validates the text; applications own selected-object validity and can clear their selection via onChanged. Optional localized loadingBuilder, emptyBuilder and requestErrorBuilder present remote request states and retry. Changing optionsBuilder refreshes the same query without resetting Form validation or text. Pending requests are discarded on edits/source changes, disabled/read-only transitions, reset and disposal. Transport cancellation remains application-owned. Keep builder identity stable for unrelated rebuilds.

Example: SkdxAutocomplete<String>(label: 'City', optionsBuilder: lookup, displayStringForOption: (city) => city, onSelected: selectCity).

Inheritance

Constructors

SkdxAutocomplete({Key? key, required String label, required AutocompleteOptionsBuilder<T> optionsBuilder, required AutocompleteOptionToString<T> displayStringForOption, required ValueChanged<T> onSelected, ValueChanged<String>? onChanged, FormFieldValidator<String>? validator, FormFieldSetter<String>? onSaved, TextEditingValue initialValue = TextEditingValue.empty, String? helper, String? error, bool enabled = true, bool readOnly = false, WidgetBuilder? loadingBuilder, WidgetBuilder? emptyBuilder, Widget requestErrorBuilder(BuildContext context, Object error, VoidCallback retry)?, Duration debounce = Duration.zero, double optionsMaxHeight = SkdxSize.dialogMax / 2, AutovalidateMode autovalidateMode = AutovalidateMode.disabled})
const

Properties

autovalidateMode → AutovalidateMode
final
debounce → Duration
final
displayStringForOption → AutocompleteOptionToString<T>
final
emptyBuilder → WidgetBuilder?
final
enabled → bool
final
error → String?
final
hashCode → int
The hash code for this object.
no setterinherited
helper → String?
final
initialValue → TextEditingValue
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String
final
loadingBuilder → WidgetBuilder?
final
onChanged → ValueChanged<String>?
final
onSaved → FormFieldSetter<String>?
final
onSelected → ValueChanged<T>
final
optionsBuilder → AutocompleteOptionsBuilder<T>
final
optionsMaxHeight → double
final
readOnly → bool
final
requestErrorBuilder → Widget Function(BuildContext context, Object error, VoidCallback retry)?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
validator → FormFieldValidator<String>?
final

Methods

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