bind<T> abstract method
Registers a factory function for type T.
The factory is called each time T is resolved, unless singleton is true.
If singleton is true, the instance is created once and reused.
factory: A function that takes the container and returns an instance ofT.singleton: If true, the factory is treated as a singleton.
Throws an exception if a binding for T already exists.
Implementation
void bind<T>(dynamic Function(ContainerInterface) factory, {bool singleton});