isKey static method

bool isKey(
  1. String hrp,
  2. String str
)

Check if a string starts with a specific HRP (Human Readable Part)

Implementation

static bool isKey(String hrp, String str) {
  if (str.indexOf(hrp) == 0) {
    return true;
  } else {
    return false;
  }
}