bind<T> abstract method
Registers a transient service.
A new instance is created every time make is called.
container.bind<Logger>((c, _) => ConsoleLogger());
final logger1 = container.make<Logger>(); // New instance
final logger2 = container.make<Logger>(); // Different instance
name: Optional identifier for multiple implementations of the same type.factory: Function that creates the instance.
Throws ServiceContainerException.duplicateRegistration if already registered.
Implementation
void bind<T>({String? name, required FactoryFunction<T> factory});