77 lines
2.2 KiB
Dart
77 lines
2.2 KiB
Dart
class GetcommunitiesModel {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
List<Data>? data;
|
|
|
|
GetcommunitiesModel({this.status, this.statusCode, this.message, this.data});
|
|
|
|
GetcommunitiesModel.fromJson(Map<String, dynamic> json) {
|
|
status = json['status'];
|
|
statusCode = json['status_code'];
|
|
message = json['message'];
|
|
if (json['data'] != null) {
|
|
data = <Data>[];
|
|
json['data'].forEach((v) {
|
|
data!.add(new Data.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
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;
|
|
String? communityProfilePhoto;
|
|
String? communityBannerImage;
|
|
String? communityName;
|
|
String? communityLocation;
|
|
String? communityDescription;
|
|
int? communityTypeXid;
|
|
int? activityXid;
|
|
|
|
Data(
|
|
{this.id,
|
|
this.communityProfilePhoto,
|
|
this.communityBannerImage,
|
|
this.communityName,
|
|
this.communityLocation,
|
|
this.communityDescription,
|
|
this.communityTypeXid,
|
|
this.activityXid});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
communityProfilePhoto = json['community_profile_photo'];
|
|
communityBannerImage = json['community_banner_image'];
|
|
communityName = json['community_name'];
|
|
communityLocation = json['community_location'];
|
|
communityDescription = json['community_description'];
|
|
communityTypeXid = json['community_type_xid'];
|
|
activityXid = json['activity_xid'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['community_profile_photo'] = this.communityProfilePhoto;
|
|
data['community_banner_image'] = this.communityBannerImage;
|
|
data['community_name'] = this.communityName;
|
|
data['community_location'] = this.communityLocation;
|
|
data['community_description'] = this.communityDescription;
|
|
data['community_type_xid'] = this.communityTypeXid;
|
|
data['activity_xid'] = this.activityXid;
|
|
return data;
|
|
}
|
|
}
|