deepClone method

  1. @override
Model deepClone()

Implementation

@override
Model deepClone() {
  final List<List<Field>> fields = [];
  for (int i = 0; i < this.fields.length; i++) {
    if (fields.length <= i) {
      fields.add([]);
    }
    for (int k = 0; k < this.fields[i].length; k++) {
      final Field field = this.fields[i][k];
      fields[i].add(FieldMapper.deepClone(field));
    }
  }
  return copyWith(fields: fields);
}