searchUnits method

void searchUnits(
  1. List<UcumConcept> concepts,
  2. List<UcumUnit> units,
  3. String text,
  4. bool isRegex,
)

Implementation

void searchUnits(List<UcumConcept> concepts, List<UcumUnit> units,
    String text, bool isRegex) {
  for (final UcumUnit unit in units) {
    if (matchesUnit(unit, text, isRegex)) {
      // Assuming here that UcumUnit extends or implements UcumConcept
      concepts.add(unit);
    }
  }
}