import 'package:sport/services/Converter.dart'; class ShareInfo { int id; String hash; ShareInfo.fromJson(Map json) { id = Converter.toInt(json['id']); hash = json['hash']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data["share"] = this.hash; return data; } } class Share { int id; String hash; int consume; double defeat; int duration; String period; double weight; Share( {this.id, this.hash, this.consume, this.defeat, this.duration, this.period, this.weight}); Share.fromJson(Map json) { id = Converter.toInt(json['id']); hash = json["hash"]; consume = json['consume']; defeat = json['defeat']; duration = json['duration']; period = json['period']; weight = json['weight']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data["hash"] = this.hash; data["consume"] = this.consume; data['defeat'] = this.defeat; data['duration'] = this.duration; data['period'] = this.period; data['weight'] = this.weight; return data; } }