game_record.dart 694 B

12345678910111213141516171819202122232425262728
  1. import 'package:sport/bean/sport_detail.dart';
  2. class GameRecord {
  3. RecordsTodaySum? today;
  4. RecordsTodaySum? sum;
  5. GameRecord({this.today, this.sum});
  6. GameRecord.fromJson(Map<String, dynamic> json) {
  7. today = json['today'] != null
  8. ? new RecordsTodaySum.fromJson(json['today'])
  9. : null;
  10. sum = json['today'] != null
  11. ? new RecordsTodaySum.fromJson(json['sum'])
  12. : null;
  13. }
  14. Map<String, dynamic> toJson() {
  15. final Map<String, dynamic> data = new Map<String, dynamic>();
  16. if (this.today != null) {
  17. data['today'] = this.today!.toJson();
  18. }
  19. if (this.sum != null) {
  20. data['sum'] = this.sum!.toJson();
  21. }
  22. return data;
  23. }
  24. }