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