newDocument method Null safety
Converts a SchemaDefinition to a base SchemaDocument with its fields being set to the associated SchemaKind from the underlying definition.
Implementation
SchemaDocument newDocument() {
return SchemaDocument(
creator: creator,
did: did,
definition: this,
fields: List<SchemaDocumentValue>.generate(fields.length, (index) {
return SchemaDocumentValue(
name: fields[index].name,
field_2: fields[index].field_2,
);
}),
);
}