generateScreenBindings function
Note: Returns all the annotated screen class names.
Implementation
Future<Set<String>> generateScreenBindings({
String? fallbackDartSdkPath,
required String templateFilePath,
required Set<String> rootDirPaths,
Set<String> subDirPaths = const {},
Set<String> pathPatterns = const {},
}) async {
Here().debugLogStart('Starting generator. Please wait...');
final classNames = <String>{};
await generateFromTemplates(
fallbackDartSdkPath: fallbackDartSdkPath,
rootDirPaths: rootDirPaths,
subDirPaths: subDirPaths,
pathPatterns: pathPatterns,
templateFilePaths: {templateFilePath},
generateForFile: (collection, filePath, templates, _) async {
final temp = await _generateForFile(
collection,
filePath,
templates,
);
classNames.addAll(temp);
},
);
Here().debugLogStop('Done!');
return classNames;
}