toJson method
Implementation
@override
Map<String, dynamic>? toJson(BoxDecoration? object) {
if (object == null) return null;
return {
'backgroundBlendMode':
const NullableBlendModeConverter().toJson(object.backgroundBlendMode),
'border':
const NullableBoxBorderConverter().toJson(object.border as Border?),
'borderRadius': const NullableBorderRadiusConverter()
.toJson(object.borderRadius as BorderRadius?),
'boxShadow': _encodeList(
object.boxShadow,
(object) => const NullableBoxShadowConverter().toJson(object),
),
'color': const NullableColorConverter().toJson(object.color),
'image': const NullableDecorationImageConverter().toJson(object.image),
'gradient': const NullableGradientConverter().toJson(object.gradient),
'shape': const NullableBoxShapeConverter().toJson(object.shape),
};
}