DocumentSnapshot.fromJson constructor
DocumentSnapshot.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DocumentSnapshot.fromJson(Map<String, dynamic> json) {
return DocumentSnapshot(
documentURL: StringIndex.fromJson(json['documentURL'] as int),
title: StringIndex.fromJson(json['title'] as int),
baseURL: StringIndex.fromJson(json['baseURL'] as int),
contentLanguage: StringIndex.fromJson(json['contentLanguage'] as int),
encodingName: StringIndex.fromJson(json['encodingName'] as int),
publicId: StringIndex.fromJson(json['publicId'] as int),
systemId: StringIndex.fromJson(json['systemId'] as int),
frameId: StringIndex.fromJson(json['frameId'] as int),
nodes: NodeTreeSnapshot.fromJson(json['nodes'] as Map<String, dynamic>),
layout: LayoutTreeSnapshot.fromJson(
json['layout'] as Map<String, dynamic>,
),
textBoxes: TextBoxSnapshot.fromJson(
json['textBoxes'] as Map<String, dynamic>,
),
scrollOffsetX:
json.containsKey('scrollOffsetX')
? json['scrollOffsetX'] as num
: null,
scrollOffsetY:
json.containsKey('scrollOffsetY')
? json['scrollOffsetY'] as num
: null,
contentWidth:
json.containsKey('contentWidth') ? json['contentWidth'] as num : null,
contentHeight:
json.containsKey('contentHeight')
? json['contentHeight'] as num
: null,
);
}