containsIgnoreCase method
Checks if this string contains other
in a case-insensitive manner.
Implementation
bool containsIgnoreCase(String? other) {
// If other is null or empty, it cannot be contained.
if (other == null || other.isEmpty) return false;
// Perform a case-insensitive search.
return toLowerCase().contains(other.toLowerCase());
}