allergensToJson static method
- Allergens? allergens
Implementation
static List<String>? allergensToJson(Allergens? allergens) {
List<String> result = [];
if (allergens == null) {
return null;
}
for (int i = 0; i < allergens.ids.length; i++) {
result.add(allergens.ids[i].toString());
}
return result;
}