toJson method

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

Implementation

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

  return <String, dynamic>{
    'alignment': const NullableAlignmentConverter()
        .toJson(value.alignment as Alignment?),
    'centerSlice': const NullableRectConverter().toJson(value.centerSlice),
    'fit': const NullableBoxFitConverter().toJson(value.fit),
    'image': const NullableImageProviderConverter().toJson(value.image),
    'matchTextDirection': value.matchTextDirection,
    'repeat': const NullableImageRepeatConverter().toJson(value.repeat),
    'scale': value.scale,
  };

  throw 'Json_Unsuported_Value';
}