findIndex method

int findIndex(
  1. String word
)

Implementation

int findIndex(String word) {
  final index = words.indexOf(word.toLowerCase());

  return index > -1
      ? index
      : throw MnemonicException('Word not found in word list.');
}