finalize method Null safety

  1. @override
ByteStream finalize()
override

Freezes all mutable fields and returns a single-subscription ByteStream containing the request body.

Implementation

@override
ByteStream finalize() {
  super.finalize();
  return ByteStream.fromBytes(bodyBytes);
}