ResponseBody.fromBytes constructor Null safety

ResponseBody.fromBytes(
  1. List<int> bytes,
  2. int? statusCode,
  3. {Map<String, List<String>> headers = const {},
  4. String? statusMessage,
  5. bool isRedirect = false}
)

Implementation

ResponseBody.fromBytes(
  List<int> bytes,
  this.statusCode, {
  this.headers = const {},
  this.statusMessage,
  this.isRedirect = false,
}) : stream = Stream.fromIterable(
          bytes.map((e) => Uint8List.fromList([e])).toList());