prepareRuntimeHints method
Prepares runtime hint entries by scanning declarations.
Implementation
List<RuntimeHintEntry> prepareRuntimeHints(
List<ClassDeclaration> components,
) {
final hints = <RuntimeHintEntry>[];
for (final decl in components) {
final superName = decl.getSuperClass()?.getName();
if (superName == 'RuntimeHint' || superName == 'RuntimeHintProvider') {
hints.add(
RuntimeHintEntry(
qualifiedName: decl.getQualifiedName(),
name: decl.getName(),
type: superName == 'RuntimeHintProvider' ? 'provider' : 'direct',
),
);
}
}
return hints;
}