77 lines
2.1 KiB
Dart
77 lines
2.1 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(Data.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['status'] = status;
|
|
data['status_code'] = statusCode;
|
|
data['message'] = 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 = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['community_profile_photo'] = communityProfilePhoto;
|
|
data['community_banner_image'] = communityBannerImage;
|
|
data['community_name'] = communityName;
|
|
data['community_location'] = communityLocation;
|
|
data['community_description'] = communityDescription;
|
|
data['community_type_xid'] = communityTypeXid;
|
|
data['activity_xid'] = activityXid;
|
|
return data;
|
|
}
|
|
}
|