decode static method
Implementation
static FrameData? decode(dynamic json) {
if (json == null) {
return null;
}
if (json is! Map<String, dynamic>) {
return null;
}
return FrameData(
width: IntDecoder.decode(json['width']),
height: IntDecoder.decode(json['height']),
paddingLeft: IntDecoder.decode(json['paddingLeft']),
paddingRight: IntDecoder.decode(json['paddingRight']),
paddingTop: IntDecoder.decode(json['paddingTop']),
paddingBottom: IntDecoder.decode(json['paddingBottom']),
borderRadius: IntDecoder.decode(json['borderRadius']),
borderTopLeftRadius: IntDecoder.decode(json['borderTopLeftRadius']),
borderTopRightRadius: IntDecoder.decode(json['borderTopRightRadius']),
borderBottomRightRadius:
IntDecoder.decode(json['borderBottomRightRadius']),
borderBottomLeftRadius: IntDecoder.decode(json['borderBottomLeftRadius']),
borderWidth: IntDecoder.decode(json['borderWidth']),
borderColor: Color.decode(json['borderColor']),
background: Color.decode(json['background']),
backgroundSrc: StringDecoder.decode(json['backgroundSrc']),
shadow: BoxShadow.decode(json['shadow']),
);
}