toFields function

List<SqfEntityFieldType>? toFields(
  1. List<DartObject>? objFields,
  2. String dbModelName,
  3. String tableName, {
  4. List<SqfEntityFieldType>? defaultColumns,
})

convert dartObject to List

Implementation

List<SqfEntityFieldType>? toFields(
    List<DartObject>? objFields,
    String dbModelName,
    String tableName //bool keepFieldNamesAsOriginal
    ,
    {List<SqfEntityFieldType>? defaultColumns}) {
  final sqfEntityFieldList = <SqfEntityFieldType>[];
  // print('--------RECOGNIZING FIELDS:');
  if (objFields == null) {
    return <SqfEntityFieldType>[];
  }
  for (var obj in objFields) {
    sqfEntityFieldList
        .add(toField(obj, dbModelName, defaultColumns: defaultColumns));
  }
  return sqfEntityFieldList;
}