UDownloadTask class
- Inheritance
-
- Object
- ChangeNotifier
- UDownloadTask
Constructors
- UDownloadTask({required String id, required UDownloadRequest request, DateTime? createdAt, UDownloadStatus status = UDownloadStatus.queued})
-
UDownloadTask.fromJson(Map<
String, dynamic> json) -
factory
Properties
- acceptsRanges ↔ bool
-
getter/setter pair
- attempts ↔ int
-
getter/setter pair
- bytes ↔ Uint8List?
-
The downloaded bytes for UDownloadDestination.memory.
getter/setter pair
- canPause → bool
-
no setter
- canResume → bool
-
no setter
- category → UDownloadCategory
-
no setter
- completedAt ↔ DateTime?
-
getter/setter pair
- createdAt → DateTime
-
final
- displayName → String
-
no setter
-
done
→ Future<
UDownloadTask> -
Completes once the task reaches completed, failed or canceled.
no setter
- durable ↔ int Function(int position)?
-
Maps an in-memory offset to the offset that is safely on disk (vault chunks are only
durable once sealed). Set by the engine while the task runs.
getter/setter pair
- error ↔ UDownloadError?
-
getter/setter pair
- eta → Duration?
-
no setter
- etag ↔ String?
-
getter/setter pair
- fileName ↔ String?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- id → String
-
final
- isActive → bool
-
no setter
- isFinished → bool
-
no setter
- isResumable → bool
-
Resuming continues from the saved offset instead of starting over.
no setter
- lastModified ↔ String?
-
getter/setter pair
- mimeType ↔ String?
-
getter/setter pair
- mirrorIndex ↔ int
-
getter/setter pair
- partPath ↔ String?
-
getter/setter pair
- progress → double
-
no setter
- received ↔ int
-
getter/setter pair
- request → UDownloadRequest
-
final
- result ↔ String?
-
The finished file: a path, a content URI, a storage key, or a browser file name.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segments
→ List<
UDownloadSegment> -
final
- speed ↔ double
-
Bytes per second, smoothed.
getter/setter pair
- state → UDownloadStatus
-
Kept for code written against the media download manager.
no setter
- status ↔ UDownloadStatus
-
getter/setter pair
- system ↔ bool
-
True while the OS (not this process) owns the transfer.
getter/setter pair
- total ↔ int
-
Total bytes, or -1 while unknown.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
changed(
) → void -
complete(
) → void -
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited