ApiFile class
A file attachment for multipart/form-data requests.
Either path or bytes must be provided.
Properties
-
bytes
→ List<int>?
-
Raw bytes. Use this for in-memory files or the web platform.
final
-
fieldName
→ String
-
The field name in the form (e.g. "avatar", "document").
final
-
filename
→ String?
-
Optional filename override. If null, the file's basename is used.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
mimeType
→ String?
-
Optional MIME type (e.g. "image/jpeg", "application/pdf").
final
-
path
→ String?
-
File-system path. Use this for mobile/desktop file pickers.
Not supported on Flutter web — provide bytes there instead.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited