toJson static method
Implementation
static Map<String, dynamic>? toJson(NutrientLevels? nutrientLevels) {
Map<String, String> result = {};
if (nutrientLevels == null) {
return null;
}
for (int i = 0; i < nutrientLevels.levels.length; i++) {
var key = nutrients[i];
result[key] = nutrientLevels.levels[key].value;
}
return result;
}