fromFile static method
Future<Document>
fromFile(
- File file, {
- ParserErrorHandler? onErrors,
- List<
Extensions> xtends = const [],
Given a file and list of YES spec extensions xtends,
parse and return Document.
If a custom onErrors implementation is provided,
then errors will be fed to it.
By default, no extensions are selected.
Implementation
static Future<Document> fromFile(
File file, {
ParserErrorHandler? onErrors,
List<Extensions> xtends = const [],
}) async {
return fromString(
await file.readAsString(),
onErrors: onErrors,
xtends: xtends,
);
}