LayoutTreeNode.fromJson constructor
LayoutTreeNode.fromJson(
- Map<String, dynamic> json
)
Implementation
factory LayoutTreeNode.fromJson(Map<String, dynamic> json) {
return LayoutTreeNode(
domNodeIndex: json['domNodeIndex'] as int,
boundingBox:
dom.Rect.fromJson(json['boundingBox'] as Map<String, dynamic>),
layoutText:
json.containsKey('layoutText') ? json['layoutText'] as String : null,
inlineTextNodes: json.containsKey('inlineTextNodes')
? (json['inlineTextNodes'] as List)
.map((e) => InlineTextBox.fromJson(e as Map<String, dynamic>))
.toList()
: null,
styleIndex:
json.containsKey('styleIndex') ? json['styleIndex'] as int : null,
paintOrder:
json.containsKey('paintOrder') ? json['paintOrder'] as int : null,
isStackingContext: json.containsKey('isStackingContext')
? json['isStackingContext'] as bool
: null,
);
}