game_record.dart 658 B

123456789101112131415161718192021222324
  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 ? new RecordsTodaySum.fromJson(json['today']) : null;
  8. sum = json['today'] != null ? new RecordsTodaySum.fromJson(json['sum']) : null;
  9. }
  10. Map<String, dynamic> toJson() {
  11. final Map<String, dynamic> data = new Map<String, dynamic>();
  12. if (this.today != null) {
  13. data['today'] = this.today.toJson();
  14. }
  15. if (this.sum != null) {
  16. data['sum'] = this.sum.toJson();
  17. }
  18. return data;
  19. }
  20. }