getTemplate method
Returns the Template node with the given id
from the Model.
Implementation
Map getTemplate(String? id) {
if (id == null) {
return {};
}
final finalTemplate = {};
var template = Schema.getTemplate(id);
while (template != null) {
var props = template.props.clone();
mergeMaps(finalTemplate, props);
id = template.template;
if (id == null) {
break;
}
template = Schema.getTemplate(id);
}
return finalTemplate;
}