sport_target_today.dart 661 B

12345678910111213141516171819202122232425
  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 ? new SportTarget.fromJson(json['target']) : null;
  11. }
  12. Map<String, dynamic> toJson() {
  13. final Map<String, dynamic> data = new Map<String, dynamic>();
  14. data['reach'] = this.reach;
  15. data['remain'] = this.remain;
  16. if (this.target != null) {
  17. data['target'] = this.target.toJson();
  18. }
  19. return data;
  20. }
  21. }