LiquidRoot class
LiquidRoot resolves templates relative to baseDirectory without
mutating the underlying file system's current directory.
Example:
final root = LiquidRoot(baseDirectory: '/templates');
The LiquidRoot class implements the Root interface and is responsible
for resolving template file paths and reading their contents.
LiquidRoot resolves templates relative to baseDirectory without
mutating the underlying file system's current directory.
Example:
final root = LiquidRoot(baseDirectory: '/templates');
Constructors
- LiquidRoot({FileSystem? fileSystem, String? baseDirectory})
-
Constructor for
LiquidRoot.
Properties
- baseDirectory ↔ String
-
Base directory used when resolving relative templates.
getter/setter pair
- fileSystem → FileSystem
-
The file system to be used for file operations.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
String relPath) → Source -
Resolves the given relative path to a
Sourceobject. -
resolveAsync(
String relPath) → Future< Source> - Asynchronously resolves a template path to a Source
-
setBaseDirectory(
String? value) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited