endsWith method
Check if a string ends with a substring.
Implementation
bool endsWith(String string) {
if (this == null) {
throw ArgumentError('string: $this');
}
if (this!.isEmpty) {
return false;
}
return this!.endsWith(string);
}