equal method

bool equal(
  1. String str, {
  2. bool ignoreCase = true,
})

Implementation

bool equal(String str, {bool ignoreCase = true}) {
  if (ignoreCase) {
    return this?.toLowerCase() == str.toLowerCase();
  }
  return this == str;
}