DownloadIsolateInstance class

Represents an instance of a download isolate, encapsulating the isolate, its communication ports, subscription, and the associated download task. This class is used to manage the lifecycle and state of a single download operation running in a separate isolate.

Constructors

DownloadIsolateInstance.new({required Isolate isolate, required ReceivePort receivePort, SendPort? controlPort, StreamSubscription? subscription})
Constructs a DownloadIsolateInstance with the given isolate, receive port, and optional control port and subscription.

Properties

controlPort SendPort?
The send port used to control or communicate with the isolate.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isBusy bool
Indicates whether the isolate is currently processing a task.
getter/setter pair
isolate Isolate
The underlying Dart isolate that performs the download task.
final
receivePort ReceivePort
The receive port used to receive messages from the isolate.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subscription StreamSubscription?
The stream subscription for handling messages from the receive port.
getter/setter pair
task DownloadTask?
The download task currently bound to this isolate instance.
getter/setter pair

Methods

bindTask(DownloadTask task) → void
Binds a DownloadTask to this isolate instance and marks it as busy.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Unbinds the current task and marks the isolate as not busy.
toString() String
Returns a string representation of the isolate instance, including its state and properties.
override

Operators

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