ViewOrScrollTimeline.fromJson constructor
ViewOrScrollTimeline.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ViewOrScrollTimeline.fromJson(Map<String, dynamic> json) {
return ViewOrScrollTimeline(
sourceNodeId: json.containsKey('sourceNodeId')
? dom.BackendNodeId.fromJson(json['sourceNodeId'] as int)
: null,
startOffset:
json.containsKey('startOffset') ? json['startOffset'] as num : null,
endOffset:
json.containsKey('endOffset') ? json['endOffset'] as num : null,
subjectNodeId: json.containsKey('subjectNodeId')
? dom.BackendNodeId.fromJson(json['subjectNodeId'] as int)
: null,
axis: dom.ScrollOrientation.fromJson(json['axis'] as String),
);
}