73 lines
1.8 KiB
Dart
73 lines
1.8 KiB
Dart
class GrouplistModel {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
List<Data>? data;
|
|
|
|
GrouplistModel({this.status, this.statusCode, this.message, this.data});
|
|
|
|
GrouplistModel.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? title;
|
|
String? backgroundImage;
|
|
String? groupImage;
|
|
String? location;
|
|
String? link;
|
|
String? description;
|
|
|
|
Data(
|
|
{this.id,
|
|
this.title,
|
|
this.backgroundImage,
|
|
this.groupImage,
|
|
this.location,
|
|
this.link,
|
|
this.description});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
title = json['title'];
|
|
backgroundImage = json['background_image'];
|
|
groupImage = json['group_image'];
|
|
location = json['location'];
|
|
link = json['link'];
|
|
description = json['description'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['title'] = this.title;
|
|
data['background_image'] = this.backgroundImage;
|
|
data['group_image'] = this.groupImage;
|
|
data['location'] = this.location;
|
|
data['link'] = this.link;
|
|
data['description'] = this.description;
|
|
return data;
|
|
}
|
|
}
|