isValid static method

bool isValid(
  1. String address
)

Validates if a string is a valid Ethereum address.

Implementation

static bool isValid(String address) {
  try {
    EthereumAddress.fromHex(address);
    return true;
  } on InvalidAddressException {
    return false;
  }
}