textInputConfiguration property

  1. @override
TextInputConfiguration textInputConfiguration
override

The TextInputConfiguration that describes this AutofillClient.

In order to participate in autofill, its TextInputConfiguration.autofillConfiguration must not be null.

Implementation

@override
TextInputConfiguration get textInputConfiguration {
  final List<String>? autofillHints =
      widget.autofillHints?.toList(growable: false);
  final AutofillConfiguration autofillConfiguration = autofillHints != null
      ? AutofillConfiguration(
          uniqueIdentifier: autofillId,
          autofillHints: autofillHints,
          currentEditingValue: currentTextEditingValue,
        )
      : AutofillConfiguration.disabled;

  return TextInputConfiguration(
    inputType: widget.keyboardType,
    readOnly: widget.readOnly,
    obscureText: widget.obscureText,
    autocorrect: widget.autocorrect,
    enableSuggestions: widget.enableSuggestions,
    enableInteractiveSelection: widget._userSelectionEnabled,
    inputAction: widget.textInputAction ??
        (widget.keyboardType == TextInputType.multiline
            ? TextInputAction.newline
            : TextInputAction.done),
    keyboardAppearance: widget.keyboardAppearance,
    autofillConfiguration: autofillConfiguration,
  );
}