Phased class abstract interface

Interface for objects that may participate in a phased process such as lifecycle management.

The phase value determines the order in which objects are started and stopped. Lower values have higher priority (start earlier, stop later).

Phase Values

  • Negative values: High priority (start first, stop last)
  • Zero: Default priority
  • Positive values: Low priority (start last, stop first)

Usage Example

class DatabaseConnectionManager implements Phased {
  @override
  int getPhase() => -1000; // Start early, stop late
}

class WebServer implements Phased {
  @override
  int getPhase() => 1000; // Start late, stop early
}
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getPhase() int
Interface for objects that may participate in a phased process such as lifecycle management.
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