IsolateHandler class

High-level isolate handler for Flutter.

High-level interface for spawning, interacting with and destroying FlutterIsolate instances.

Constructors

IsolateHandler()

Properties

hashCode int
The hash code for this object.
no setterinherited
isolates Map<String, HandledIsolate>
Map of all spawned isolates.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

kill(String name, {int priority = Isolate.beforeNextEvent}) → void
Dispose of isolate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(dynamic message, {required dynamic to}) → void
Send message to a spawned isolate.
spawn<T>(void function(Map<String, dynamic>), {String? name, void onReceive(T message)?, void onInitialized()?, bool paused = false, bool? errorsAreFatal, SendPort? onExit, SendPort? onError, String? debugName}) HandledIsolate
Spawns a new HandledIsolate of type T (dynamic by default) with an entry point of function. Note that because of the limitations of the underlying messaging mechanism of SendPort.send(), the list of allowed types is limited: "The content of message can be: primitive values (null, num, bool, double, String), instances of SendPort, and lists and maps whose elements are any of these. List and maps are also allowed to be cyclic."
toString() String
A string representation of this object.
inherited

Operators

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