50 lines
1.1 KiB
Dart
50 lines
1.1 KiB
Dart
class NotificationData {
|
|
String? title;
|
|
String? body;
|
|
String? largeIcon;
|
|
String? bigPicture;
|
|
String? id;
|
|
String? notificationType;
|
|
String? type;
|
|
String? link;
|
|
String? groupKey;
|
|
|
|
NotificationData({
|
|
this.title,
|
|
this.body,
|
|
this.largeIcon,
|
|
this.bigPicture,
|
|
this.id,
|
|
this.notificationType,
|
|
this.type,
|
|
this.link,
|
|
this.groupKey,
|
|
});
|
|
|
|
NotificationData.fromJson(Map<String, dynamic> json) {
|
|
title = json['title'];
|
|
body = json['body'];
|
|
largeIcon = json['largeIcon'];
|
|
bigPicture = json['bigPicture'];
|
|
id = json['id'];
|
|
notificationType = json['notificationType'];
|
|
type = json['type'];
|
|
link = json['link'];
|
|
groupKey = json['groupKey'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['title'] = title;
|
|
data['body'] = body;
|
|
data['largeIcon'] = largeIcon;
|
|
data['bigPicture'] = bigPicture;
|
|
data['id'] = id;
|
|
data['notificationType'] = notificationType;
|
|
data['type'] = type;
|
|
data['link'] = link;
|
|
data['groupKey'] = groupKey;
|
|
return data;
|
|
}
|
|
}
|