toJson method

Map<String, dynamic> toJson()

Returns a representation of this object as a JSON object.

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic>? autofill = autofillConfiguration.toJson();
  return <String, dynamic>{
    'viewId': viewId,
    'inputType': inputType.toJson(),
    'readOnly': readOnly,
    'obscureText': obscureText,
    'autocorrect': autocorrect,
    'smartDashesType': smartDashesType.index.toString(),
    'smartQuotesType': smartQuotesType.index.toString(),
    'enableSuggestions': enableSuggestions,
    'enableInteractiveSelection': enableInteractiveSelection,
    'actionLabel': actionLabel,
    'inputAction': inputAction.toString(),
    'textCapitalization': textCapitalization.toString(),
    'keyboardAppearance': keyboardAppearance.toString(),
    'enableIMEPersonalizedLearning': enableIMEPersonalizedLearning,
    'contentCommitMimeTypes': allowedMimeTypes,
    if (autofill != null) 'autofill': autofill,
    'enableDeltaModel' : enableDeltaModel,
  };
}