clear method

  1. @visibleForTesting
void clear()

Clears all registrations in the container.

Warning: This method only works in debug mode (kDebugMode). It is ignored in release mode to prevent accidental service loss.

Implementation

@visibleForTesting
void clear() {
  if (!kDebugMode) {
    AirLogger.warning('AirDI.clear() called in release mode - ignored');
    return;
  }
  _registrations.clear();
  _registrationOwners.clear();
}