isValid method

bool isValid(
  1. Mnemonic mnemonic, {
  2. String password = "",
})

Determines if the given mnemonic string is valid, optionally with a passphrase.

Implementation

bool isValid(Mnemonic mnemonic, {String password = ""}) {
  try {
    validate(mnemonic, password: password);
    return true;
  } catch (e) {
    return false;
  }
}