class AnnouncementResponse { List? announcements; int? totalAnnouncements; AnnouncementResponse({this.announcements, this.totalAnnouncements}); AnnouncementResponse.fromJson(Map json) { if (json['announcements'] != null) { announcements = []; json['announcements'].forEach((v) { announcements!.add(new Announcements.fromJson(v)); }); } totalAnnouncements = json['totalAnnouncements']; } Map toJson() { final Map data = new Map(); if (this.announcements != null) { data['announcements'] = this.announcements!.map((v) => v.toJson()).toList(); } data['totalAnnouncements'] = this.totalAnnouncements; return data; } } class Announcements { String? sId; List? sentTo; String? message; String? createdAt; String? updatedAt; String? uniqueId; int? iV; Announcements( {this.sId, this.sentTo, this.message, this.createdAt, this.updatedAt, this.uniqueId, this.iV}); Announcements.fromJson(Map json) { sId = json['_id']; sentTo = json['sentTo'].cast(); message = json['message']; createdAt = json['createdAt']; updatedAt = json['updatedAt']; uniqueId = json['uniqueId']; iV = json['__v']; } Map toJson() { final Map data = new Map(); data['_id'] = this.sId; data['sentTo'] = this.sentTo; data['message'] = this.message; data['createdAt'] = this.createdAt; data['updatedAt'] = this.updatedAt; data['uniqueId'] = this.uniqueId; data['__v'] = this.iV; return data; } }