doSearch method
Implementation
List<UcumConcept> doSearch(
UcumModel model, ConceptKind? kind, String text, bool isRegex) {
final List<UcumConcept> concepts = <UcumConcept>[];
if (kind == null || kind == ConceptKind.prefix) {
searchPrefixes(concepts, model.prefixes, text, isRegex);
}
if (kind == null || kind == ConceptKind.baseUnit) {
searchUnits(concepts, model.baseUnits, text, isRegex);
}
if (kind == null || kind == ConceptKind.unit) {
searchUnits(concepts, model.definedUnits, text, isRegex);
}
return concepts;
}