Fixed null safety

This commit is contained in:
thomashii 2021-03-21 09:35:56 +08:00
parent 64d11cc86d
commit f280c8b9bd

View file

@ -135,12 +135,12 @@ class MockHttpRequest
@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
@ -231,7 +231,7 @@ class MockHttpRequest
@override @override
Future<String> join([String separator = '']) => Future<String> join([String separator = '']) =>
_stream.stream.join(separator ?? ''); _stream.stream.join(separator);
@override @override
Future<Uint8List> get last => _stream.stream.last; Future<Uint8List> get last => _stream.stream.last;