BoxModel.fromJson constructor

BoxModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BoxModel.fromJson(Map<String, dynamic> json) {
  return BoxModel(
    content: Quad.fromJson(json['content'] as List),
    padding: Quad.fromJson(json['padding'] as List),
    border: Quad.fromJson(json['border'] as List),
    margin: Quad.fromJson(json['margin'] as List),
    width: json['width'] as int,
    height: json['height'] as int,
    shapeOutside: json.containsKey('shapeOutside')
        ? ShapeOutsideInfo.fromJson(
            json['shapeOutside'] as Map<String, dynamic>)
        : null,
  );
}