ThreadMessage class
Wrapper message passed to the Isolate's entry point function.
Contains a SendPort for replying and an optional data payload.
This message is automatically constructed by Thread.start().
Example usage:
void entry(ThreadMessage message) {
final reply = message.replyPort;
final input = message.data;
// process...
reply.send('done');
}
Constructors
- ThreadMessage(SendPort replyPort, dynamic data)
- Wrapper message passed to the Isolate's entry point function.
Properties
- data → dynamic
-
Initial message or payload sent to the isolate.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- replyPort → SendPort
-
Port used to send messages back to the main thread.
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited