find static method
The diagnostic for code, or null if nothing is registered under it.
Case-insensitive and tolerant of surrounding whitespace, because the code usually arrives pasted out of a log.
Implementation
static DVDiagnostic? find(String code) {
final String wanted = code.trim().toUpperCase();
if (wanted.isEmpty) return null;
for (final DVDiagnostic entry in all) {
if (entry.code == wanted) return entry;
}
return null;
}