toJson method

  1. @override
Map<String, dynamic>? toJson(
  1. DialogTheme? value
)
override

Implementation

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

  return <String, dynamic>{
    'backgroundColor':
        const NullableColorConverter().toJson(value.backgroundColor),
    'contentTextStyle':
        const NullableTextStyleConverter().toJson(value.contentTextStyle),
    'elevation': value.elevation,
    'shape': const NullableShapeBorderConverter().toJson(value.shape),
    'titleTextStyle':
        const NullableTextStyleConverter().toJson(value.titleTextStyle),
  };

  throw 'Json_Unsuported_Value';
}