TemplateRegistry class

Registry responsible for discovering, registering, and retrieving templates.

Implemented types

Constructors

TemplateRegistry({TemplateLoader loader = const TemplateLoader(), List<Directory>? searchDirectories, List<Template>? initialTemplates})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

discoverFromDirectory(Directory rootDirectory) → void
Scans a root directory for template subdirectories containing template.yaml.
getAvailableTemplates() → List<Template>
Returns all available templates.
override
getTemplate(String name) → Template
Returns a template by name. Throws TemplateNotFoundException if not found.
override
hasTemplate(String name) → bool
Returns true if a template with name exists.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerTemplate(Template template) → void
Explicitly register a Template.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited