Instant extension

on

Methods

call<T>() → T
delete<S>({String? tag, String? key, bool force = false}) bool
Delete registered Class Instance S (or tag) and, closes any open controllers DisposableInterface, cleans up the memory
deleteAll({bool force = false}) → void
Delete all registered Class Instances and, closes any open controllers DisposableInterface, cleans up the memory
find<S>({String? tag}) → S
Finds the registered type <S> (or tag) In case of using June.create to register a type <S> or tag, it will create an instance each time you call find. If the registered type <S> (or tag) is a Controller, it will initialize it's lifecycle.
findOrNull<S>({String? tag}) → S?
The findOrNull method will return the instance if it is registered; otherwise, it will return null.
getInstanceDetails<S>({String? tag}) InstanceDetails
getState<S>(S dependency, {String? tag, bool permanent = true}) → S
isPrepared<S>({String? tag}) bool
Checks if a lazy factory callback June.lazyPut() that returns an Instance<S> is registered in memory.
isRegistered<S>({String? tag}) bool
Check if a Class Instance<S> (or tag) is registered in memory.
lazyPut<S>(BuilderPattern<S> builder, {String? tag, bool? fenix, bool permanent = false}) → void
Creates a new Instance lazily from the <S>builder() callback.
lazyReplace<P>(BuilderPattern<P> builder, {String? tag, bool? fenix}) → void
Replaces a parent instance with a new Instance
markAsDirty<S>({String? tag, String? key}) → void
put<S>(S dependency, {String? tag, bool permanent = true}) → S
Holds a reference to every registered callback when using June.lazyPut()
reload<S>({String? tag, String? key, bool force = false}) → void
reloadAll({bool force = false}) → void
replace<P>(P child, {String? tag}) → void
Replace a parent instance of a class in dependency management with a child instance
spawn<S>(BuilderPattern<S> builder, {String? tag, bool permanent = true}) → void
Creates a new Class Instance S from the builder callbackS. Every time find<S>() is used, it calls the builder method to generate a new Instance S. It also registers each instance.onClose() with the current Route June.reference to keep the lifecycle active. Is important to know that the instances created are only stored per Route. So, if you call June.delete<T>() the "instance factory" used in this method (June.spawn<T>()) will be removed, but NOT the instances already created by it.