byOpStr static method

BinaryOperator? byOpStr(
  1. String opStr
)

Implementation

static BinaryOperator? byOpStr(String opStr) {
  BinaryOperator? retval;
  switch (opStr) {
    case '+':
      retval = plus;
      break;
    case '-':
      retval = minus;
      break;
    case '*':
      retval = multiply;
      break;
    case '/':
      retval = d;
      break;
    case '%':
      retval = modulo;
      break;
    case '&&':
      retval = and;
      break;
    case '||':
      retval = or;
      break;
    case '==':
      retval = equals;
      break;
    case '!=':
      retval = notEquals;
      break;
    case '===':
      retval = identical;
      break;
    case '!==':
      retval = notIdentical;
      break;
    case '<':
      retval = lower;
      break;
    case '>':
      retval = bigger;
      break;
    case '<=':
      retval = lowerEquals;
      break;
    case '>=':
      retval = biggerEquals;
      break;
  }
  return retval;
}