didvan-app/lib/models/notification_message.dart

36 lines
831 B
Dart

class NotificationMessage {
String? title;
String? body;
String? type;
String? clickAction;
String? url;
String? image;
NotificationMessage(
{this.title,
this.body,
this.type,
this.clickAction,
this.url,
this.image});
NotificationMessage.fromJson(Map<String, dynamic> json) {
title = json['title'];
body = json['body'];
type = json['type'];
clickAction = json['click_action'];
url = json['url'];
image = json['image'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['body'] = this.body;
data['type'] = this.type;
data['click_action'] = this.clickAction;
data['url'] = this.url;
data['image'] = this.image;
return data;
}
}