AutoComplete constructor
const
AutoComplete({
- Key? key,
- required List<
String> suggestions, - required ValueChanged<
String> onChanged, - String? initialValue,
- TextEditingController? controller,
- bool border = true,
- bool enabled = true,
- bool readOnly = false,
- List<
TextInputFormatter> inputFormatters = const [], - String? placeholder,
- ValueChanged<
int> ? onAcceptSuggestion, - FocusNode? focusNode,
- AlignmentGeometry? popoverAlignment,
- AlignmentGeometry? popoverAnchorAlignment,
- PopoverConstraint? popoverWidthConstraint,
- BoxConstraints? popoverConstraints,
- Widget? leading,
- Widget? trailing,
- EdgeInsetsGeometry? padding,
- ValueChanged<
String> ? onSubmitted, - VoidCallback? onEditingComplete,
- VoidCallback? onTap,
- bool obscureText = false,
- String obscuringCharacter = '•',
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- int? maxLines,
- int? minLines,
- BorderRadiusGeometry? borderRadius,
- TextAlign textAlign = TextAlign.start,
- bool expands = false,
- TextAlignVertical? textAlignVertical,
- UndoHistoryController? undoController,
- Iterable<
String> ? autofillHints, - void onTapOutside(
- PointerDownEvent event
- TextStyle? style,
- EditableTextContextMenuBuilder? contextMenuBuilder,
- bool useNativeContextMenu = false,
- bool? isCollapsed,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- Clip clipBehavior = Clip.hardEdge,
- bool autofocus = false,
- bool filled = false,
Implementation
const AutoComplete({
super.key,
required this.suggestions,
required this.onChanged,
this.initialValue,
this.controller,
this.border = true,
this.enabled = true,
this.readOnly = false,
this.inputFormatters = const [],
this.placeholder,
this.onAcceptSuggestion,
this.focusNode,
this.popoverAlignment,
this.popoverAnchorAlignment,
this.popoverWidthConstraint,
this.popoverConstraints,
this.leading,
this.trailing,
this.padding,
this.onSubmitted,
this.onEditingComplete,
this.onTap,
this.obscureText = false,
this.obscuringCharacter = '•',
this.maxLength,
this.maxLengthEnforcement,
this.maxLines,
this.minLines,
this.borderRadius,
this.textAlign = TextAlign.start,
this.expands = false,
this.textAlignVertical,
this.undoController,
this.autofillHints,
this.onTapOutside,
this.style,
this.contextMenuBuilder,
this.useNativeContextMenu = false,
this.isCollapsed,
this.keyboardType,
this.textInputAction,
this.clipBehavior = Clip.hardEdge,
this.autofocus = false,
this.filled = false,
});