# getApplicationStartup method

1. @override

ApplicationStartup getApplicationStartup()
override

Defines a contract for components that are aware of and can interact with an ApplicationStartup strategy.

An ApplicationStartup provides hooks or strategies to monitor and measure different stages of the application startup lifecycle.

Implementations of ApplicationStartupAware allow the framework (or user code) to inject an ApplicationStartup instance so that components can report or adjust their startup behavior accordingly.

### Example

    class LoggingStartupAware implements ApplicationStartupAware {
      late ApplicationStartup _startup;

      @override
      ApplicationStartup getApplicationStartup() => _startup;

      @override
      void setApplicationStartup(ApplicationStartup applicationStartup) {
        _startup = applicationStartup;
      }

      void startComponent() {
        final step = _startup.start("Initialize component");
        // Perform initialization work...
        step.end();
      }
    }

    void main() {
      final aware = LoggingStartupAware();
      final startup = DefaultApplicationStartup();
      aware.setApplicationStartup(startup);

      aware.startComponent();
    }

Return the ApplicationStartup strategy currently in use.

Implementations should always return the same instance that was previously set via setApplicationStartup.

### Example

    final startup = component.getApplicationStartup();
    print("Using startup: $startup");

## Implementation

    @override
    ApplicationStartup getApplicationStartup() => _applicationStartup;