startsWith method
Implementation
void startsWith(Pattern other) {
context.expect(
() => prefixFirst('starts with ', literal(other)),
(actual) {
if (actual.startsWith(other)) return null;
return Rejection(
which: prefixFirst('does not start with ', literal(other)),
);
},
);
}