FrontendServerAssetReader constructor
FrontendServerAssetReader({})
Creates a FrontendServerAssetReader.
outputPath
is the file path to the Frontend Server kernel file e.g.
/some/path/main.dart.dill
Corresponding .json
and .map
files will be read relative to
outputPath
.
_packageRoot
is the path to the directory that contains a
.dart_tool/package_config.json
file for the application.
Implementation
FrontendServerAssetReader({
required String outputPath,
required String packageRoot,
String? basePath,
}) : _packageRoot = packageRoot,
_basePath = basePath ?? '',
_mapOriginal = File('$outputPath.map'),
_mapIncremental = File('$outputPath.incremental.map'),
_jsonOriginal = File('$outputPath.json'),
_jsonIncremental = File('$outputPath.incremental.json'),
_packageConfig = loadPackageConfig(
File(
p.absolute(p.join(packageRoot, '.dart_tool/package_config.json')),
),
);