Loader class abstract
Base abstract class for all loaders.
Subclass this and override getSource, listTemplates and load to implement a custom loading mechanism.
- Implementers
Constructors
- Loader()
-
Base abstract class for all loaders.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSourceAccess → bool
-
Returns
true
if this loader can provide access to the source.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getSource(
String path) → String - Get template source from file.
-
listTemplates(
) → List< String> - Iterates over all templates.
-
load(
Environment environment, String path, {Map< String, Object?> ? globals}) → Template - Loads a template to the environment template cache.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited