ResponseBody.fromBytes constructor

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

    Implementation

    ResponseBody.fromBytes(
      List<int> bytes,
      this.statusCode, {
      this.statusMessage,
      this.isRedirect = false,
      void Function()? onClose,
      Map<String, List<String>>? headers,
    })  : stream = Stream.value(
            bytes is Uint8List ? bytes : Uint8List.fromList(bytes),
          ),
          headers = headers ?? {},
          _onClose = onClose;