Files
Regroup/lib/Main_Screens/ProfileTab/Settings/Model/FetchNotification.dart
2024-07-31 16:08:23 +05:30

59 lines
1.8 KiB
Dart

class FetchNotification {
String? status;
int? statusCode;
String? message;
Data? data;
FetchNotification({this.status, this.statusCode, this.message, this.data});
FetchNotification.fromJson(Map<String, dynamic> json) {
status = json['status'];
statusCode = json['status_code'];
message = json['message'];
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
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!.toJson();
}
return data;
}
}
class Data {
int? groupNotification;
int? communityNotification;
int? followerNotification;
int? newFollowerNotification;
int? directMessageNotification;
Data(
{this.groupNotification,
this.communityNotification,
this.followerNotification,
this.newFollowerNotification,
this.directMessageNotification});
Data.fromJson(Map<String, dynamic> json) {
groupNotification = json['group_notification'];
communityNotification = json['community_notification'];
followerNotification = json['follower_notification'];
newFollowerNotification = json['new_follower_notification'];
directMessageNotification = json['direct_message_notification'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['group_notification'] = groupNotification;
data['community_notification'] = communityNotification;
data['follower_notification'] = followerNotification;
data['new_follower_notification'] = newFollowerNotification;
data['direct_message_notification'] = directMessageNotification;
return data;
}
}