endsWithAny method
Checks if the string ends with any of the provided suffixes.
Example:
'hello'.endsWithAny(['lo', 'la']); // true
Implementation
bool endsWithAny(Iterable<String> suffixes) {
return suffixes.any((suffix) => endsWith(suffix));
}