getAlternativeUOMByCurrent method
      
UnitOfMeasuresDto
getAlternativeUOMByCurrent({ 
    
    
- required List<UnitOfMeasuresDto> altUOMs,
- String? currentUOM,
Implementation
UnitOfMeasuresDto getAlternativeUOMByCurrent({
  required List<UnitOfMeasuresDto> altUOMs,
  String? currentUOM,
}) {
  if (altUOMs.isEmpty) throw Exception('Alternative units are empty');
  return altUOMs.firstWhere(
    (uom) => uom.unit == currentUOM,
    orElse: () => altUOMs.first,
  );
}