GetItHelper class
a helper class to handle conditional registering
Constructors
- GetItHelper(GetIt getIt, [String? environment, EnvironmentFilter? environmentFilter])
- creates a new instance of GetItHelper
Properties
- getIt → GetIt
-
passed getIt instance
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call<
T extends Object> ({String? instanceName, dynamic param1, dynamic param2}) → T -
factory<
T extends Object> (FactoryFunc< T> factoryFunc, {String? instanceName, Set<String> ? registerFor}) → void -
a conditional wrapper method for getIt.registerFactory
it only registers if
_canRegister
returns true -
factoryAsync<
T extends Object> (FactoryFuncAsync< T> factoryFunc, {String? instanceName, bool preResolve = false, Set<String> ? registerFor}) → Future<void> -
a conditional wrapper method for getIt.registerFactoryAsync
it only registers if
_canRegister
returns true -
factoryParam<
T extends Object, P1, P2> (FactoryFuncParam< T, P1, P2> factoryFunc, {String? instanceName, Set<String> ? registerFor}) → void -
a conditional wrapper method for getIt.registerFactoryParam
it only registers if
_canRegister
returns true -
factoryParamAsync<
T extends Object, P1, P2> (FactoryFuncParamAsync< T, P1?, P2?> factoryFunc, {String? instanceName, Set<String> ? registerFor}) → void -
a conditional wrapper method for getIt.registerFactoryParamAsync
it only registers if
_canRegister
returns true -
getAsync<
T extends Object> ({String? instanceName, dynamic param1, dynamic param2}) → Future< T> -
initScope(
String name, {required void init(GetItHelper gh), ScopeDisposeFunc? dispose}) → GetIt -
a helper method to push a new scope and init it's dependencies
inside of
GetIt
-
initScopeAsync(
String name, {required Future< void> init(GetItHelper gh), ScopeDisposeFunc? dispose}) → Future<GetIt> -
a helper method to push a new scope and init it's dependencies
asynchronously inside of
GetIt
-
lazySingleton<
T extends Object> (FactoryFunc< T> factoryFunc, {String? instanceName, Set<String> ? registerFor, DisposingFunc<T> ? dispose}) → void -
a conditional wrapper method for getIt.registerLazySingleton
it only registers if
_canRegister
returns true -
lazySingletonAsync<
T extends Object> (FactoryFuncAsync< T> factoryFunc, {String? instanceName, bool preResolve = false, Set<String> ? registerFor, DisposingFunc<T> ? dispose}) → Future<void> -
a conditional wrapper method for getIt.registerLazySingletonAsync
it only registers if
_canRegister
returns true -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
singleton<
T extends Object> (FactoryFunc< T> factoryFunc, {String? instanceName, bool? signalsReady, Set<String> ? registerFor, DisposingFunc<T> ? dispose}) → void -
a conditional wrapper method for getIt.registerSingleton
it only registers if
_canRegister
returns true -
singletonAsync<
T extends Object> (FactoryFuncAsync< T> factoryFunc, {String? instanceName, bool? signalsReady, bool preResolve = false, Iterable<Type> ? dependsOn, Set<String> ? registerFor, DisposingFunc<T> ? dispose}) → Future<void> -
a conditional wrapper method for getIt.registerSingletonAsync
it only registers if
_canRegister
returns true -
singletonWithDependencies<
T extends Object> (FactoryFunc< T> factoryFunc, {String? instanceName, bool? signalsReady, Iterable<Type> ? dependsOn, Set<String> ? registerFor, DisposingFunc<T> ? dispose}) → void -
a conditional wrapper method for getIt.registerSingletonWithDependencies
it only registers if
_canRegister
returns true -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited