decodedMatches function Null safety

TypeMatcher<List<int>> decodedMatches(
  1. dynamic expected,
  2. {Encoding? encoding}
)

Decodes the value using encoding and matches it against expected.

Implementation

TypeMatcher<List<int>> decodedMatches(dynamic expected, {Encoding? encoding}) {
  encoding ??= utf8;
  return TypeMatcher<List<int>>()
      .having(encoding.decode, '${encoding.name} decoded bytes', expected);
}