Closed
Description
Hi Phill,
I have modified the diet plan class and added an ingredients array field, and successfully created the object. now when testing the add function I got an parse error on response with Unexpected token s in JSON at position 43, check the code below:
void addArray() async {
var list = ["sugar", "rice", "salt"];
var apiResponse = await DietPlan().getObject('j2S0JZhbpC');
if (apiResponse.success && apiResponse.result != null) {
var dietPlan = (apiResponse.result as DietPlan);
var response = await dietPlan.add('ingredients', list);
dietPlan.save();
} else {
print('ERROR');
}
}
Metadata
Metadata
Assignees
Labels
No labels