push_message.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. class PushMessage extends Object {
  2. String messageId;
  3. String appId;
  4. String title;
  5. String content;
  6. String traceInfo;
  7. PushMessage(this.messageId,this.appId,this.title,this.content,this.traceInfo,);
  8. PushMessage.fromJson(Map<String, dynamic> json)
  9. : messageId = json['messageId'],
  10. appId = json['appId'],
  11. title = json['title'],
  12. content = json['content'],
  13. traceInfo = json['traceInfo'];
  14. Map<String, dynamic> toJson() =>
  15. {
  16. 'messageId': messageId,
  17. 'appId': appId,
  18. 'title': title,
  19. 'content': content,
  20. 'traceInfo': traceInfo,
  21. };
  22. }
  23. class PushNotification extends Object {
  24. String title;
  25. String summary;
  26. Map<dynamic, dynamic> extraMap;
  27. PushNotification(this.title,this.summary,this.extraMap);
  28. PushNotification.fromJson(Map<String, dynamic> json)
  29. : title = json['title'],
  30. summary = json['summary'],
  31. extraMap = json['extraMap'];
  32. Map<String, dynamic> toJson() =>
  33. {
  34. 'title': title,
  35. 'summary': summary,
  36. 'extraMap': extraMap,
  37. };
  38. }