FileSystemLoader constructor
FileSystemLoader({})
Loads templates from the file system.
This loader can find templates in folders on the file system and is the preferred way to load them:
var loader = FileSystemLoader(
path: 'templates',
extensions: ['html', 'xml'],
);
or:
var loader = FileSystemLoader(
paths: ['overrides/templates', 'default/templates'],
extensions: ['html', 'xml'],
);
To follow symbolic links, set the followLinks parameter to true
:
var loader = FileSystemLoader(path: 'path', followLinks: true);
Implementation
FileSystemLoader({
List<String> paths = const <String>['templates'],
this.recursive = true,
this.followLinks = true,
this.extensions = const <String>{'html'},
this.encoding = utf8,
}) : paths = paths.map<String>(normalize).toList();