getCompactedOrdinal static method

int getCompactedOrdinal(
  1. Mode? mode
)

Implementation

static int getCompactedOrdinal(Mode? mode) {
  if (mode == null) {
    return 0;
  }
  switch (mode) {
    case Mode.kanji:
      return 0;
    case Mode.alphanumeric:
      return 1;
    case Mode.numeric:
      return 2;
    case Mode.byte:
      return 3;
    default:
      throw StateError('Illegal mode $mode');
  }
}