Inst extension
- on
Methods
-
create<
S> (InstanceBuilderCallback< S> builder, {String? tag, bool permanent = true}) → void -
Available on GetInterface, provided by the Inst extension
Creates a new Class InstanceSfrom the builder callbackS. Every timefind<S>()is used, it calls the builder method to generate a new InstanceS. It also registers eachinstance.onClose()with the current RouteGetConfig.currentRouteto keep the lifecycle active. Is important to know that the instances created are only stored per Route. So, if you callGet.delete<T>()the "instance factory" used in this method (Get.create<T>()) will be removed, but NOT the instances already created by it. Usestagas the other methods. -
delete<
S> ({String? tag, bool force = false}) → Future< bool> -
Available on GetInterface, provided by the Inst extension
Clears all registered instances (and/or tags). Even the persistent ones. -
deleteAll(
{bool force = false}) → Future< void> -
Available on GetInterface, provided by the Inst extension
Deletes all Instances, cleaning the memory and closes any open controllers (DisposableInterface). -
find<
S> ({String? tag}) → S -
Available on GetInterface, provided by the Inst extension
Finds a Instance of the required Class<S>(ortag) In the case of usingGet.create(), it will generate an Instance each time you callGet.find(). -
isPrepared<
S> ({String? tag}) → bool -
Available on GetInterface, provided by the Inst extension
Checks if anInstance<S>(ortag) returned from a factory builderGet.lazyPut(), is registered in memory. -
isRegistered<
S> ({String? tag}) → bool -
Available on GetInterface, provided by the Inst extension
Checks if a ClassInstance<S>(ortag) is registered in memory. -
lazyPut<
S> (InstanceBuilderCallback< S> builder, {String? tag, bool fenix = false}) → void -
Available on GetInterface, provided by the Inst extension
Creates a new Instancelazily from the<S>builder()callback. -
lazyReplace<
P> (InstanceBuilderCallback< P> builder, {String? tag, bool? fenix}) → void -
Available on GetInterface, provided by the Inst extension
Replaces a parent instance with a new Instance -
put<
S> (S dependency, {String? tag, bool permanent = false, InstanceBuilderCallback< S> ? builder}) → S -
Available on GetInterface, provided by the Inst extension
Injects anInstance<S>in memory. -
putAsync<
S> (AsyncInstanceBuilderCallback< S> builder, {String? tag, bool permanent = false}) → Future<S> -
Available on GetInterface, provided by the Inst extension
async version ofGet.put(). Awaits for the resolution of the Future frombuilder()parameter and stores the Instance returned. -
reload<
S> ({String? tag, String? key, bool force = false}) → void -
Available on GetInterface, provided by the Inst extension
-
reloadAll(
{bool force = false}) → void -
Available on GetInterface, provided by the Inst extension
-
replace<
P> (P child, {String? tag}) → void -
Available on GetInterface, provided by the Inst extension
Replace a parent instance of a class in dependency management with achildinstance