failureWithCode function

Matcher failureWithCode(
  1. String code
)

Матчер: ошибка с ожидаемым стабильным кодом (Failure.code).

expect(failure, failureWithCode('http.unauthorized'));

Implementation

Matcher failureWithCode(String code) =>
    isA<Failure>().having((f) => f.code, 'code', code);