Skip to content

Commit e6b9b5e

Browse files
Add a compressionState value to HttpResponse mocks (#66679)
The Dart SDK now requires non-null enum values if the enum is used in an exhaustive switch statement on a non-nullable type. See #66674
1 parent 3e8fb33 commit e6b9b5e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎dev/manual_tests/test/mock_image_http.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ MockHttpClient createMockImageHttpClient(SecurityContext _) {
1919
when(request.close()).thenAnswer((_) => Future<HttpClientResponse>.value(response));
2020
when(response.contentLength).thenReturn(kTransparentImage.length);
2121
when(response.statusCode).thenReturn(HttpStatus.ok);
22+
when(response.compressionState).thenReturn(HttpClientResponseCompressionState.notCompressed);
2223
when(response.listen(any)).thenAnswer((Invocation invocation) {
2324
final void Function(List<int>) onData = invocation.positionalArguments[0] as void Function(List<int>);
2425
final void Function() onDone = invocation.namedArguments[#onDone] as void Function();

0 commit comments

Comments
 (0)