MultipartFileRecreatable class

Creates an instance of MultipartFile that can be recreated and reused.

Inheritance

Constructors

MultipartFileRecreatable(Stream<List<int>> stream, int length, {String? filename, DioMediaType? contentType, Map<String, List<String>>? headers})
Default constructor.
MultipartFileRecreatable.fromBytes(List<int> bytes, {String? filename, MediaType? contentType, Map<String, List<String>>? headers})
Creates a MultipartFileRecreatable object with bytes.
factory
MultipartFileRecreatable.fromFileSync(String filePath, {String? filename, MediaType? contentType, Map<String, List<String>>? headers})
Creates a MultipartFileRecreatable object from a File in filePath.
factory

Properties

contentType DioMediaType?
The content-type of the file. Defaults to application/octet-stream.
finalinherited
data Stream<List<int>>
The stream that will emit the file's contents.
final
filename String?
The basename of the file. May be null.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, List<String>>?
The additional headers the file has. May be null.
finalinherited
isFinalized bool
Whether finalize has been called.
no setterinherited
length int
The size of the file in bytes. This must be known in advance, even if this file is created from a ByteStream.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone() MultipartFile
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.
inherited
finalize() Stream<Uint8List>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recreate() MultipartFileRecreatable
Recreates the MultipartFileRecreatable object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited