decode static method

BoxShadow? decode(
  1. dynamic json
)

Implementation

static BoxShadow? decode(dynamic json) {
  if (json == null) {
    return null;
  }
  if (json is! Map<String, dynamic>) {
    return null;
  }

  return BoxShadow(
    color: Color.decode(json['color']),
    offsetX: IntDecoder.decode(json['offsetX']),
    offsetY: IntDecoder.decode(json['offsetY']),
    radius: IntDecoder.decode(json['radius']),
  );
}