getSource method

  1. @override
String getSource(
  1. String path
)
override

Get template source from file.

Throws TemplateNotFound if file not found or UnsupportedError if don't has access to source.

Implementation

@override
String getSource(String path) {
  var file = findFile(path);

  if (file == null) {
    throw TemplateNotFound(path: path);
  }

  return file.readAsStringSync(encoding: encoding);
}