TaskPhase class

Phases of Tasks.

Tasks in each phase always run before any tasks from the next phase.

The order of built-in phases is:

  1. setup
  2. build (default)
  3. tearDown

Custom phases can be created as long as they use unique index and name.

Implemented types
Available Extensions

Constructors

TaskPhase.custom(int index, String name)
Create or return a custom phase with the given parameters.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
index int
The index of this phase, used for sorting phases.
final
name String
The name of this phase.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(TaskPhase other) int
Compares this object to another object.
override
isAfter(TaskPhase other) bool
Whether this phase comes after another phase.
isBefore(TaskPhase other) bool
Whether this phase comes before another phase.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Properties

builtInPhases List<TaskPhase>
Get the built-in phases. The returned List is immutable. To access custom phases, use currentZoneTaskPhases instead.
final
currentZoneTaskPhases List<TaskPhase>
Get the task phases in the current Zone, if it has been set, or the root task phases otherwise.
no setter

Constants

build → const TaskPhase
The 'build' built-in task phase.
setup → const TaskPhase
The 'setup' built-in task phase.
tearDown → const TaskPhase
The 'tearDown' built-in task phase.
zonePhasesKey → const Symbol
Key used to register custom phases inside a Dart Zone.