fromList method

RecordList fromList(
  1. List? list, [
  2. Map<String, dynamic>? recordListSchemaMap,
  3. Map<String, dynamic>? schemaMap
])

Copies the value of the specified List to this RecordList.

If there is no guarantee that the schema of the List matches the schema of this record, specify the schema map of this record in recordSchemaMap, and the schema map of the entire DataSet in schemaMap if there is a nested Record or RecordList.

Implementation

RecordList fromList(List<dynamic>? list,[Map<String,dynamic?>? recordListSchemaMap, Map<String,dynamic?>? schemaMap]){
  if(list == null){
    return this;
  }
  list.forEach(
    (value){
      Record rec = createRecord();
      rec.fromList(value, recordListSchemaMap, schemaMap);
      add(rec);
    }
  );
  return this;
}