Datacat.withSchema constructor
Datacat.withSchema({
- required DatacatSchema schema,
- required List<
List> rows,
Creates a Datacat that enforces the provided schema.
The columns will be set to the keys in the schema.
Throws an error if the provided rows do not conform to the schema.
Implementation
Datacat.withSchema({
required DatacatSchema schema,
required List<List<dynamic>> rows,
}) : _schema = schema,
columns = schema.requiredColumns.keys.toList(),
rows = rows {
_verifySchemaColumns();
_normalizeRows();
_verifySchemaTypes();
}