Comment.fromJson constructor

Comment.fromJson(
  1. dynamic json
)

Implementation

factory Comment.fromJson(json) {
  return Comment(
    id: json['id'],
    text: json["text"],
    by: json['by'],
    type: json['type'],
    parent: json['parent'],
    time: json['time'],
    dead: json['dead'] ?? false,
    deleted: json['deleted'] ?? false,
    kids: json['kids']?.cast<int>() ?? [],
  );
}