Fixed null safety
This commit is contained in:
parent
f280c8b9bd
commit
a7c2a0d3dc
1 changed files with 5 additions and 5 deletions
|
@ -16,8 +16,8 @@ class MockHttpResponse extends Stream<List<int>> implements HttpResponse {
|
||||||
final List<Cookie> cookies = [];
|
final List<Cookie> cookies = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
HttpConnectionInfo connectionInfo = MockHttpConnectionInfo(
|
HttpConnectionInfo connectionInfo =
|
||||||
remoteAddress: InternetAddress.anyIPv4);
|
MockHttpConnectionInfo(remoteAddress: InternetAddress.anyIPv4);
|
||||||
|
|
||||||
/// [copyBuffer] corresponds to `copy` on the [BytesBuilder] constructor.
|
/// [copyBuffer] corresponds to `copy` on the [BytesBuilder] constructor.
|
||||||
MockHttpResponse(
|
MockHttpResponse(
|
||||||
|
@ -116,17 +116,17 @@ class MockHttpResponse extends Stream<List<int>> implements HttpResponse {
|
||||||
@override
|
@override
|
||||||
Future redirect(Uri location,
|
Future redirect(Uri location,
|
||||||
{int status = HttpStatus.movedTemporarily}) async {
|
{int status = HttpStatus.movedTemporarily}) async {
|
||||||
statusCode = status ?? HttpStatus.movedTemporarily;
|
statusCode = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void write(Object? obj) {
|
void write(Object? obj) {
|
||||||
obj?.toString()?.codeUnits?.forEach(writeCharCode);
|
obj?.toString().codeUnits.forEach(writeCharCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void writeAll(Iterable objects, [String separator = '']) {
|
void writeAll(Iterable objects, [String separator = '']) {
|
||||||
write(objects.join(separator ?? ''));
|
write(objects.join(separator));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
Loading…
Reference in a new issue