ResponseBody.fromBytes constructor

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.value(Uint8List.fromList(bytes));