TimelineTask.withTaskId constructor

TimelineTask.withTaskId(int taskId)

Create a task with an explicit taskId. This is useful if you are passing a task from one isolate to another.

Important note: only provide task IDs which have been obtained as a result of invoking TimelineTask.pass. Specifying a custom ID can lead to ID collisions, resulting in incorrect rendering of timeline events.

Implementation

TimelineTask.withTaskId(int taskId)
    : _parent = null,
      _taskId = taskId {
  ArgumentError.checkNotNull(taskId, 'taskId');
}