import 'package:sport/bean/sport_target.dart'; class SportTargetToday { bool reach; int remain; SportTarget target; SportTargetToday({this.reach, this.remain, this.target}); SportTargetToday.fromJson(Map json) { reach = json['reach']; remain = json['remain']; target = json['target'] != null ? new SportTarget.fromJson(json['target']) : null; } Map toJson() { final Map data = new Map(); data['reach'] = this.reach; data['remain'] = this.remain; if (this.target != null) { data['target'] = this.target.toJson(); } return data; } }