sport_target_today.dart 681 B

123456789101112131415161718192021222324252627
  1. import 'package:sport/bean/sport_target.dart';
  2. class SportTargetToday {
  3. bool? reach;
  4. int? remain;
  5. SportTarget? target;
  6. SportTargetToday({this.reach, this.remain, this.target});
  7. SportTargetToday.fromJson(Map<String, dynamic> json) {
  8. reach = json['reach'];
  9. remain = json['remain'];
  10. target = json['target'] != null
  11. ? new SportTarget.fromJson(json['target'])
  12. : null;
  13. }
  14. Map<String, dynamic> toJson() {
  15. final Map<String, dynamic> data = new Map<String, dynamic>();
  16. data['reach'] = this.reach;
  17. data['remain'] = this.remain;
  18. if (this.target != null) {
  19. data['target'] = this.target!.toJson();
  20. }
  21. return data;
  22. }
  23. }