endsWith method
Implementation
void endsWith(String other) {
context.expect(
() => prefixFirst('ends with ', literal(other)),
(actual) {
if (actual.endsWith(other)) return null;
return Rejection(
which: prefixFirst('does not end with ', literal(other)),
);
},
);
}