endsWith function

bool endsWith(
  1. String searchString,
  2. String s,
  3. [int? position]
)

Checks if a string ends with a substring.

print(endsWith('lo', 'hello')); // Outputs: true

Implementation

bool endsWith(String searchString, String s, [int? position]) =>
    s.endsWith(searchString);