fromPartialWords static method

MnemonicLength fromPartialWords(
  1. int wordCount
)

Returns the length of a sentence missing its last word only.

Implementation

static MnemonicLength fromPartialWords(int wordCount) {
  try {
    return values.firstWhere((e) => e.words - 1 == wordCount);
  } catch (e) {
    throw MnemonicUnexpectedPartialSentenceLengthException(wordCount);
  }
}