DefaultApplicationStartup class
A no-op implementation of ApplicationStartup that always returns a singleton DefaultStartupStep for any startup operation.
This implementation is useful when:
- Startup tracking is disabled.
- Running in test environments.
- Using lightweight deployments where startup monitoring is unnecessary.
The returned DefaultStartupStep does nothing when you call
methods like tag or end, making it safe to use in place of a
fully functional startup tracker.
Example
void main() {
final startup = DefaultApplicationStartup();
// Start a step
final step = startup.start('context.load');
// These calls do nothing in the no-op implementation
step.tag('key', 'value');
step.end();
}
- Inheritance
-
- Object
- ApplicationStartup
- DefaultApplicationStartup
Constructors
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
String name) → StartupStep -
Creates and starts a new StartupStep with the given
name.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- DEFAULT_STARTUP_STEP → DefaultStartupStep
-
A shared singleton instance of DefaultStartupStep.
final