afterLast method
Get the substring of a string after the last occurrence of a string.
Implementation
String afterLast(String string) {
if (this == null) {
throw ArgumentError('string: $this');
}
if (this!.isEmpty) {
return '';
}
final index = this!.lastIndexOf(string);
if (index == -1) {
return '';
}
return this!.substring(index + string.length);
}