additivesToJson static method

List<String>? additivesToJson(
  1. Additives? additives
)

Implementation

static List<String>? additivesToJson(Additives? additives) {
  List<String> result = [];

  if (additives == null) {
    return null;
  }

  for (int i = 0; i < additives.ids.length; i++) {
    result.add(additives.ids[i].toString());
  }

  return result;
}