Questions.fromJson constructor
Implementation
Questions.fromJson(Map<String, dynamic> json) {
fields = json['fields'].cast<String>();
sId = json['_id'];
title = json['title'];
description = json['description'];
remark = json['remark'];
type = json['type'];
maxline = json["maxline"] ?? 1;
isMandatory = json['is_mandatory'];
if (type == "checkbox") {
answer = List.generate(fields!.length, (index) => false);
}
}