onBind method

void onBind(
  1. AirDI di
)

Synchronous configuration and dependency registration.

This is the first method called in the adapter lifecycle. It MUST be strictly synchronous to ensure fast adapter registration.

Responsibility: Register services, factories, and singletons in AirDI.

di The dependency injection container instance.

Implementation

void onBind(AirDI di) {
  _state = AdapterLifecycleState.binding;
  debugPrint('[Adapter:$id] onBind');
  _state = AdapterLifecycleState.bound;
}