TextInputConfiguration constructor Null safety

const TextInputConfiguration(
  1. {TextInputType inputType = TextInputType.text,
  2. bool readOnly = false,
  3. bool obscureText = false,
  4. bool autocorrect = true,
  5. SmartDashesType? smartDashesType,
  6. SmartQuotesType? smartQuotesType,
  7. bool enableSuggestions = true,
  8. bool enableInteractiveSelection = true,
  9. String? actionLabel,
  10. TextInputAction inputAction = TextInputAction.done,
  11. Brightness keyboardAppearance = Brightness.light,
  12. TextCapitalization textCapitalization = TextCapitalization.none,
  13. AutofillConfiguration autofillConfiguration = AutofillConfiguration.disabled,
  14. bool enableIMEPersonalizedLearning = true,
  15. 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);