equals method Null safety

bool equals(
  1. String str1,
  2. String str2,
  3. {bool ignoreCase = true}
)

Implementation

static bool equals(String str1, String str2, {bool ignoreCase = true}) {
  if (ignoreCase) {
    return (str1.toLowerCase() == str2.toLowerCase());
  } else {
    return (str1 == str2);
  }
}