We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32927ff commit 90c4c84Copy full SHA for 90c4c84
test/api/fake_api.dart
@@ -73,10 +73,10 @@ class FakeHttpClient extends http.BaseClient {
73
lastRequest = request;
74
switch (response) {
75
case _PreparedException(:var exception):
76
- return Future.error(exception);
+ return Future(() => throw exception);
77
case _PreparedSuccess(:var bytes, :var httpStatus):
78
final byteStream = http.ByteStream.fromBytes(bytes);
79
- return Future.value(http.StreamedResponse(
+ return Future(() => http.StreamedResponse(
80
byteStream, httpStatus, request: request));
81
}
82
0 commit comments