prepare static method
Plans and validates the generated path before the patcher starts writing.
Implementation
static PreparedIntegrationEntry? prepare({
required String appDir,
required String sourceRelativePath,
required String source,
required String Function() packageName,
required bool sourceHasApplicationEntry,
}) {
final generated = IntegrationEntryGenerator.generate(
sourceRelativePath: sourceRelativePath,
source: source,
packageName: packageName,
sourceHasApplicationEntry: sourceHasApplicationEntry,
);
if (generated == null) return null;
TestEntryValidator.validatePathWithinRoot(
root: appDir,
relativePath: generated.relativePath,
);
return PreparedIntegrationEntry(generated);
}