class CommunityListModel { String? status; int? statusCode; String? message; List? data; CommunityListModel({this.status, this.statusCode, this.message, this.data}); CommunityListModel.fromJson(Map json) { status = json['status']; statusCode = json['status_code']; message = json['message']; if (json['data'] != null) { data = []; json['data'].forEach((v) { data!.add(new Data.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['status'] = this.status; data['status_code'] = this.statusCode; data['message'] = this.message; if (this.data != null) { data['data'] = this.data!.map((v) => v.toJson()).toList(); } return data; } } class Data { int? id; int? iamPrincipalXid; int? manageCommunityXid; Community? community; Data( {this.id, this.iamPrincipalXid, this.manageCommunityXid, this.community}); Data.fromJson(Map json) { id = json['id']; iamPrincipalXid = json['iam_principal_xid']; manageCommunityXid = json['manage_community_xid']; community = json['community'] != null ? new Community.fromJson(json['community']) : null; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['iam_principal_xid'] = this.iamPrincipalXid; data['manage_community_xid'] = this.manageCommunityXid; if (this.community != null) { data['community'] = this.community!.toJson(); } return data; } } class Community { int? id; String? communityName; String? communityProfilePhoto; Community({this.id, this.communityName, this.communityProfilePhoto}); Community.fromJson(Map json) { id = json['id']; communityName = json['community_name']; communityProfilePhoto = json['community_profile_photo']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['community_name'] = this.communityName; data['community_profile_photo'] = this.communityProfilePhoto; return data; } }