MapLoader class

Loads a template from a map.

It's passed a map of strings bound to template names. This loader is useful for testing.

var loader = MapLoader({'index.html': 'source here'})
Inheritance

Constructors

MapLoader(Map<String, String> sources)

Properties

hashCode int
The hash code for this object.
no setterinherited
hasSourceAccess bool
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sources Map<String, String>
final

Methods

getSource(String path) String
Get template source from file.
override
listTemplates() List<String>
Iterates over all templates.
override
load(Environment environment, String path) Template
override
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