getByName method

DeclarationInfo? getByName(
  1. String name
)

Get a declaration by name, returns null if not found.

Implementation

DeclarationInfo? getByName(String name) {
  for (final decl in all) {
    if (decl.name == name) return decl;
  }
  return null;
}