bind<T extends MineralService> method
Registers a new service within the IOC. class MyService {}
final myService = ioc.bind((ioc) => MyService());
print(myService);
Implementation
T bind<T extends MineralService> (T Function(Ioc ioc) service) {
if (_services.containsKey(service)) {
throw ServiceAlreadyRegisteredException(T);
}
final T instance = service(this);
_services.putIfAbsent(instance.runtimeType, () => instance);
return instance;
}