isPalindrome method
Check if a string is a palindrome.
Implementation
bool isPalindrome() {
if (this == null) {
throw ArgumentError('string: $this');
}
if (this!.isEmpty) {
return false;
}
return this!.toLowerCase() == this!.toLowerCase().split('').reversed.join();
}