checkRendered method
Checks app, the rendered app of result:
- the structural rules and symbols of the roles, see checkStructure;
- every import or export of a file of the app finds the file, or a file that code generation or Flutter's localizations generate;
l10n.yaml, when the pubspec has Flutter generate the localizations, is whatflutter pub getcan read: YAML with a map of options, each of the type that Flutter reads it as, and withoutsynthetic-package: true;- every imported or exported package is a dependency of the app, a
regular one for the code in
lib/andbin/; - a module imports or exports the package of a provider of a role in the app, in a template or for a fragment, only when it contributes the package too, itself or in its variant, so that the pipeline checks that it may take the package (see casesOfModule); a provider of a role may import it for a fragment when a module that gives the role data contributes it, as the data may need it;
- a file imports and exports only files that its owner may use, and the pipeline added only imports that the contributors of the fragments may use: their own files, the files of the modules they depend on directly, the files of the roles they provide, require or use (the files of each role's template and the files of its required symbols), and, for the template and the providers of a role, the files of those who contribute data to the role, which they render. The cases the harness builds have one provider of each role, so there a provider cannot reach the files of another through the data.
Throws an ArgumentError if the case of result did not resolve.
Implementation
List<SmfIssue> checkRendered(ContractResult result, RenderedApp app) {
final owners = app.owners;
final texts = app.texts;
final (:indexes, :issues) = _index(texts, owners);
issues
..addAll(_structureIssues(result, indexes, texts, owners))
..addAll(_importIssues(result, app, indexes));
return issues;
}