textInputConfiguration property

  1. @override
TextInputConfiguration get 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;

  _viewId = View.of(context).viewId;
  return TextInputConfiguration(
    viewId: _viewId,
    inputType: widget.keyboardType,
    readOnly: widget.readOnly,
    obscureText: widget.obscureText,
    autocorrect: widget.autocorrect,
    smartDashesType: widget.smartDashesType,
    smartQuotesType: widget.smartQuotesType,
    enableSuggestions: widget.enableSuggestions,
    enableInteractiveSelection: widget._userSelectionEnabled,
    inputAction:
        widget.textInputAction ??
        (widget.keyboardType == TextInputType.multiline
            ? TextInputAction.newline
            : TextInputAction.done),
    textCapitalization: widget.textCapitalization,
    keyboardAppearance: widget.keyboardAppearance,
    autofillConfiguration: autofillConfiguration,
    enableIMEPersonalizedLearning: widget.enableIMEPersonalizedLearning,
    allowedMimeTypes:
        widget.contentInsertionConfiguration == null
            ? const <String>[]
            : widget.contentInsertionConfiguration!.allowedMimeTypes,
  );
}