UploadTask class

Configuration for an upload task.

Constructors

UploadTask({required String uploadId, required String filePath, required String url, String method = 'POST', Map<String, String> headers = const {}, Map<String, String> fields = const {}, String fileFieldName = 'file', String? notificationTitle, String? notificationDescription, bool showNotification = true})
const
UploadTask.fromMap(Map<String, dynamic> map)
factory

Properties

fields Map<String, String>
Additional form fields to include in the multipart request
final
fileFieldName String
Name of the file field in the multipart request (default: 'file')
final
filePath String
Absolute path to the file to upload
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
HTTP headers to include in the request
final
method String
HTTP method (default: POST)
final
notificationDescription String?
Notification description (optional)
final
notificationTitle String?
Notification title (optional)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showNotification bool
Whether to show notifications (default: true)
final
uploadId String
Unique identifier for this upload task
final
url String
Upload URL endpoint
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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