videoDetail.dart 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. class VideoDetail {
  2. String title;
  3. String imageUrl;
  4. String starring;
  5. String releaseTime;
  6. String score;
  7. String description;
  8. List<String> videoUrl;
  9. List<String> downloadUrl;
  10. VideoDetail({
  11. this.title,
  12. this.imageUrl,
  13. this.starring,
  14. this.releaseTime,
  15. this.score,
  16. this.description,
  17. this.videoUrl,
  18. this.downloadUrl,
  19. });
  20. VideoDetail.fromJson(Map<String, dynamic> json) {
  21. title = json['title'];
  22. imageUrl = json['imageUrl'];
  23. starring = json['starring'];
  24. releaseTime = json['releaseTime'];
  25. score = json['score'];
  26. description = json['description'];
  27. videoUrl = json['videoUrl']?.cast<String>();
  28. videoUrl = json['downloadUrl']?.cast<String>();
  29. }
  30. Map<String, dynamic> toJson() {
  31. final Map<String, dynamic> data = new Map<String, dynamic>();
  32. data['title'] = this.title;
  33. data['imageUrl'] = this.imageUrl;
  34. data['starring'] = this.starring;
  35. data['releaseTime'] = this.releaseTime;
  36. data['score'] = this.score;
  37. data['description'] = this.description;
  38. data['videoUrl'] = this.videoUrl;
  39. data['downloadUrl'] = this.videoUrl;
  40. return data;
  41. }
  42. }