TextInputConfiguration class Null safety

Controls the visual appearance of the text input control.

Many TextInputActions are common between Android and iOS. However, if an inputAction is provided that is not supported by the current platform in debug mode, an error will be thrown when the corresponding text input is attached. For example, providing iOS's "emergencyCall" action when running on an Android device will result in an error when in debug mode. In release mode, incompatible TextInputActions are replaced either with "unspecified" on Android, or "default" on iOS. Appropriate inputActions can be chosen by checking the current platform and then selecting the appropriate action.

See also:

Annotations

Constructors

TextInputConfiguration({TextInputType inputType = TextInputType.text, bool readOnly = false, bool obscureText = false, bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableSuggestions = true, bool enableInteractiveSelection = true, String? actionLabel, TextInputAction inputAction = TextInputAction.done, Brightness keyboardAppearance = Brightness.light, TextCapitalization textCapitalization = TextCapitalization.none, AutofillConfiguration autofillConfiguration = AutofillConfiguration.disabled, bool enableIMEPersonalizedLearning = true, bool enableDeltaModel = false})
Creates configuration information for a text input control.
const

Properties

actionLabel String?
What text to display in the text input control's action button.
final
autocorrect bool
Whether to enable autocorrection.
final
autofillConfiguration AutofillConfiguration
The configuration to use for autofill.
final
enableDeltaModel bool
Whether to enable that the engine sends text input updates to the framework as TextEditingDelta's or as one TextEditingValue.
final
enableIMEPersonalizedLearning bool
Whether to enable that the IME update personalized data such as typing history and user dictionary data.
final
enableInteractiveSelection bool
Whether a user can change its selection.
final
enableSuggestions bool
Whether to show input suggestions as the user types.
final
hashCode int
The hash code for this object.
read-onlyinherited
inputAction TextInputAction
What kind of action to request for the action button on the IME.
final
inputType TextInputType
The type of information for which to optimize the text input control.
final
keyboardAppearance Brightness
The appearance of the keyboard.
final
obscureText bool
Whether to hide the text being edited (e.g., for passwords).
final
readOnly bool
Whether the text field can be edited or not.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
smartDashesType SmartDashesType
Whether to allow the platform to automatically format dashes.
final
smartQuotesType SmartQuotesType
Whether to allow the platform to automatically format quotes.
final
textCapitalization TextCapitalization
Specifies how platforms may automatically capitalize text entered by the user.
final

Methods

copyWith({TextInputType? inputType, bool? readOnly, bool? obscureText, bool? autocorrect, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool? enableSuggestions, bool? enableInteractiveSelection, String? actionLabel, TextInputAction? inputAction, Brightness? keyboardAppearance, TextCapitalization? textCapitalization, bool? enableIMEPersonalizedLearning, AutofillConfiguration? autofillConfiguration, bool? enableDeltaModel}) TextInputConfiguration
Creates a copy of this TextInputConfiguration with the given fields replaced with new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Returns a representation of this object as a JSON object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited