toJson method

  1. @override
Map<String, dynamic>? toJson(
  1. InputDecorationTheme? object
)
override

Implementation

@override
Map<String, dynamic>? toJson(InputDecorationTheme? object) {
  if (object == null) return null;

  return <String, dynamic>{
    'alignLabelWithHint': object.alignLabelWithHint,
    'border': const NullableInputBorderConverter().toJson(object.border),
    'contentPadding': const NullableEdgeInsetsGeometryConverter()
        .toJson(object.contentPadding as EdgeInsets?),
    'counterStyle':
        const NullableTextStyleConverter().toJson(object.counterStyle),
    'disabledBorder':
        const NullableInputBorderConverter().toJson(object.disabledBorder),
    'enabledBorder':
        const NullableInputBorderConverter().toJson(object.enabledBorder),
    'errorBorder':
        const NullableInputBorderConverter().toJson(object.errorBorder),
    'errorMaxLines': object.errorMaxLines,
    'errorStyle':
        const NullableTextStyleConverter().toJson(object.errorStyle),
    'fillColor': const NullableColorConverter().toJson(object.fillColor),
    'filled': object.filled,
    'floatingLabelBehavior':
        const NullableFloatingLabelBehaviorConverter().toJson(
      object.floatingLabelBehavior,
    ),
    'focusColor': const NullableColorConverter().toJson(object.focusColor),
    'focusedBorder':
        const NullableInputBorderConverter().toJson(object.focusedBorder),
    'focusedErrorBorder': const NullableInputBorderConverter()
        .toJson(object.focusedErrorBorder),
    'helperMaxLines': object.helperMaxLines,
    'helperStyle':
        const NullableTextStyleConverter().toJson(object.helperStyle),
    'hintStyle': const NullableTextStyleConverter().toJson(object.hintStyle),
    'hoverColor': const NullableColorConverter().toJson(object.hoverColor),
    'isCollapsed': object.isCollapsed,
    'isDense': object.isDense,
    'labelStyle':
        const NullableTextStyleConverter().toJson(object.labelStyle),
    'prefixStyle':
        const NullableTextStyleConverter().toJson(object.prefixStyle),
    'suffixStyle':
        const NullableTextStyleConverter().toJson(object.suffixStyle),
  };
}