bind method
Stores a reference to an object instance
Implementation
@mustCallSuper
@override
void bind(Object instance) {
assert(!_isDisposed, "Can't bind when it's been disposed");
assert(
_instanceBinded == null,
"Can't bind a new instance because an instance is already.\n"
"Use `detachInstance` method, if you want to bind a new instance.",
);
eventManager.one(instance, Lifecycle.destroyed, _onInstanceDestroyed);
_instanceBinded = instance;
if (BindingZone.currentZone == null) _validateInstanceBinded();
}