createArray static method

List<CustomerField> createArray(
  1. dynamic fields
)

Implementation

static List<CustomerField> createArray(dynamic fields) {
  List<CustomerField> fields = [];
  List<dynamic> list = fields;
  for (int i = 0; i < list.length; i++) {
    CustomerField field = new CustomerField(null);
    list[i].forEach((key, value) {
      if (key == _KEY) field.fieldKey = value.toString();
      if (key == _VALUE) field.fieldValue = value.toString();
    });
    fields.add(field);
  }
  return fields;
}