clone method

MultipartFile clone()

Clone MultipartFile, returning a new instance of the same object. This is useful if your request failed and you wish to retry it, such as an unauthorized exception can be solved by refreshing the token.

Implementation

MultipartFile clone() {
  return MultipartFile.fromStream(
    _dataBuilder,
    length,
    filename: filename,
    contentType: contentType,
    headers: headers,
  );
}