endsWith method

void endsWith(
  1. String other
)

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)),
      );
    },
  );
}