TextInputConfiguration constructor Null safety
- {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.
All arguments have default values, except actionLabel. Only actionLabel may be null.
Implementation
const TextInputConfiguration({
this.inputType = TextInputType.text,
this.readOnly = false,
this.obscureText = false,
this.autocorrect = true,
SmartDashesType? smartDashesType,
SmartQuotesType? smartQuotesType,
this.enableSuggestions = true,
this.enableInteractiveSelection = true,
this.actionLabel,
this.inputAction = TextInputAction.done,
this.keyboardAppearance = Brightness.light,
this.textCapitalization = TextCapitalization.none,
this.autofillConfiguration = AutofillConfiguration.disabled,
this.enableIMEPersonalizedLearning = true,
this.enableDeltaModel = false,
}) : assert(inputType != null),
assert(obscureText != null),
smartDashesType = smartDashesType ?? (obscureText ? SmartDashesType.disabled : SmartDashesType.enabled),
smartQuotesType = smartQuotesType ?? (obscureText ? SmartQuotesType.disabled : SmartQuotesType.enabled),
assert(autocorrect != null),
assert(enableSuggestions != null),
assert(keyboardAppearance != null),
assert(inputAction != null),
assert(textCapitalization != null),
assert(enableIMEPersonalizedLearning != null),
assert(enableDeltaModel != null);