TimelineTask class final
An asynchronous task on the timeline. An asynchronous task can have many (nested) synchronous operations. Synchronous operations can live longer than the current isolate event. To pass a TimelineTask to another isolate, you must first call pass to get the task id and then construct a new TimelineTask in the other isolate.
Constructors
- TimelineTask({TimelineTask? parent, String? filterKey})
- Create a task. The task ID will be set by the system.
- TimelineTask.withTaskId(int taskId, {String? filterKey})
-
Create a task with an explicit
taskId
. This is useful if you are passing a task from one isolate to another.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
finish(
{Map? arguments}) → void -
Finish the last synchronous operation that was started.
Optionally takes a Map of
arguments
. -
instant(
String name, {Map? arguments}) → void -
Emit an instant event for this task.
Optionally takes a Map of
arguments
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pass(
) → int - Retrieve the TimelineTask's task id. Will throw an exception if the stack is not empty.
-
start(
String name, {Map? arguments}) → void -
Start a synchronous operation within this task named
name
. Optionally takes a Map ofarguments
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited