// To parse this JSON data, do // // final document = documentFromJson(jsonString); import 'dart:convert'; Document documentFromJson(String str) => Document.fromJson(json.decode(str)); String documentToJson(Document data) => json.encode(data.toJson()); class Document { Document({ this.totalItemsCount, this.data, this.messageStatus, this.message, }); int? totalItemsCount; List? data; int? messageStatus; String? message; factory Document.fromJson(Map json) => Document( totalItemsCount: json["totalItemsCount"] == null ? null : json["totalItemsCount"], data: json["data"] == null ? null : List.from(json["data"].map((x) => DocumentData.fromJson(x))), messageStatus: json["messageStatus"] == null ? null : json["messageStatus"], message: json["message"] == null ? null : json["message"], ); Map toJson() => { "totalItemsCount": totalItemsCount == null ? null : totalItemsCount, "data": data == null ? null : List.from(data!.map((x) => x.toJson())), "messageStatus": messageStatus == null ? null : messageStatus, "message": message == null ? null : message, }; } class DocumentData { DocumentData({ this.id, this.serviceProviderId, this.documentId, this.documentUrl, this.status, this.comment, this.isActive, this.document, this.fileExt, }); int? id; int? serviceProviderId; int? documentId; dynamic? documentUrl; int? status; dynamic? comment; bool? isActive; String? document; String? fileExt; factory DocumentData.fromJson(Map json) => DocumentData( id: json["id"] == null ? null : json["id"], serviceProviderId: json["serviceProviderID"] == null ? null : json["serviceProviderID"], documentId: json["documentID"] == null ? null : json["documentID"], documentUrl: json["documentURL"], status: json["status"] == null ? null : json["status"], comment: json["comment"], isActive: json["isActive"] == null ? null : json["isActive"], document: null, fileExt: null, ); Map toJson() => { "id": id == null ? null : id, "serviceProviderID": serviceProviderId == null ? null : serviceProviderId, "documentID": documentId == null ? null : documentId, "documentURL": documentUrl, "status": status == null ? null : status, "comment": comment, "isActive": isActive == null ? null : isActive, }; }