fromCode static method

TextOpType fromCode(
  1. int code
)

Implementation

static TextOpType fromCode(int code) {
  switch (code) {
    case 0:
      return delete;
    case 1:
      return match;
    case 2:
      return insert;
  }
  throw ArgumentError('Unknown code: $code');
}