toJson method

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

Implementation

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

  return <String, dynamic>{
    'clipBehavior': const NullableClipConverter().toJson(object.clipBehavior),
    'color': const NullableColorConverter().toJson(object.color),
    'elevation': object.elevation,
    'margin': const NullableEdgeInsetsGeometryConverter()
        .toJson(object.margin as EdgeInsets?),
    'shadowColor': const NullableColorConverter().toJson(object.shadowColor),
    'shape': const NullableShapeBorderConverter().toJson(object.shape),
  };
}