fromJSON static method
Implementation
static Weight fromJSON(Map<String, dynamic> data) {
return Weight(
weight: data["weight"],
weightUnit: data["weightUnit"] != null ? weightUnitFromString(data["weightUnit"]) : null,
date: data["date"] != null ? DateTime.parse(data["date"]) : null
);
}