copyWith method Null safety

TextInputConfiguration copyWith(
  1. {TextInputType? inputType,
  2. bool? readOnly,
  3. bool? obscureText,
  4. bool? autocorrect,
  5. SmartDashesType? smartDashesType,
  6. SmartQuotesType? smartQuotesType,
  7. bool? enableSuggestions,
  8. bool? enableInteractiveSelection,
  9. String? actionLabel,
  10. TextInputAction? inputAction,
  11. Brightness? keyboardAppearance,
  12. TextCapitalization? textCapitalization,
  13. bool? enableIMEPersonalizedLearning,
  14. AutofillConfiguration? autofillConfiguration,
  15. bool? enableDeltaModel}
)

Creates a copy of this TextInputConfiguration with the given fields replaced with new values.

Implementation

TextInputConfiguration 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,
}) {
  return TextInputConfiguration(
    inputType: inputType ?? this.inputType,
    readOnly: readOnly ?? this.readOnly,
    obscureText: obscureText ?? this.obscureText,
    autocorrect: autocorrect ?? this.autocorrect,
    smartDashesType: smartDashesType ?? this.smartDashesType,
    smartQuotesType: smartQuotesType ?? this.smartQuotesType,
    enableSuggestions: enableSuggestions ?? this.enableSuggestions,
    enableInteractiveSelection: enableInteractiveSelection ?? this.enableInteractiveSelection,
    inputAction: inputAction ?? this.inputAction,
    textCapitalization: textCapitalization ?? this.textCapitalization,
    keyboardAppearance: keyboardAppearance ?? this.keyboardAppearance,
    enableIMEPersonalizedLearning: enableIMEPersonalizedLearning?? this.enableIMEPersonalizedLearning,
    autofillConfiguration: autofillConfiguration ?? this.autofillConfiguration,
    enableDeltaModel: enableDeltaModel ?? this.enableDeltaModel,
  );
}