isApplicationContextRegistered method

bool isApplicationContextRegistered(
  1. ConfigurableApplicationContext context
)

Checks if a ConfigurableApplicationContext is registered for shutdown.

Example:

if (hook.isApplicationContextRegistered(context)) {
  print("Context is registered for shutdown.");
}

Implementation

bool isApplicationContextRegistered(ConfigurableApplicationContext context) {
  return synchronized(this, () => _contexts.contains(context));
}