video.dart 930 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. class Video {
  2. int id;
  3. String url;
  4. String title;
  5. String time;
  6. String type;
  7. String imageUrl;
  8. Video({
  9. this.id,
  10. this.url,
  11. this.title,
  12. this.time,
  13. this.type,
  14. this.imageUrl,
  15. });
  16. Video.fromJson(Map<String, dynamic> json) {
  17. id = json['id'];
  18. url = json['url'];
  19. title = json['title'];
  20. type = json['type'];
  21. time = json['time'];
  22. imageUrl = json['imageUrl'];
  23. }
  24. Map<String, dynamic> toJson() {
  25. final Map<String, dynamic> data = new Map<String, dynamic>();
  26. data['id'] = this.id;
  27. data['url'] = this.url;
  28. data['title'] = this.title;
  29. data['type'] = this.type;
  30. data['time'] = this.time;
  31. data['imageUrl'] = this.imageUrl;
  32. return data;
  33. }
  34. Video.fromSql(Map<String, dynamic> json) {
  35. id = json['id'];
  36. url = json['url'];
  37. title = json['title'];
  38. type = json['type'];
  39. time = json['time'];
  40. imageUrl = json['imageUrl'];
  41. }
  42. }