document property
Document
get
document
The file parsed as an HTML Document.
Throws if the path was not set with setFilePath.
Implementation
Document get document {
if (_filePath == null || _filePath == "") {
throw Exception("File path not set");
}
String documentAsString = getFileAsString();
_document = parse(documentAsString);
return _document!;
}