GetItHelper class

a helper class to handle conditional registering

Constructors

GetItHelper(GetIt getIt, [String? environment, EnvironmentFilter? environmentFilter])
creates a new instance of GetItHelper

Properties

environment String?
current work environment
final
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

factory<T extends Object>(FactoryFunc<T> factoryfunc, {String? instanceName, Set<String> registerFor = const {}}) → void
a conditional wrapper method for getIt.registerFactory it only registers if _canRegister returns true
factoryAsync<T extends Object>(FactoryFuncAsync<T> factoryfunc, {required String instanceName, required Set<String> registerFor}) → 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, {required String instanceName, required 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, {required String instanceName, required Set<String> registerFor}) → void
a conditional wrapper method for getIt.registerFactoryParamAsync it only registers if _canRegister returns true
lazySingleton<T extends Object>(FactoryFunc<T> factoryfunc, {required String instanceName, required Set<String> registerFor}) → void
a conditional wrapper method for getIt.registerLazySingleton it only registers if _canRegister returns true
lazySingletonAsync<T extends Object>(FactoryFuncAsync<T> factoryfunc, {required String instanceName, required Set<String> registerFor}) → 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>(T instance, {required String instanceName, required bool signalsReady, required Set<String> registerFor}) → void
a conditional wrapper method for getIt.registerSingleton it only registers if _canRegister returns true
singletonAsync<T extends Object>(FactoryFuncAsync<T> factoryfunc, {required String instanceName, required bool signalsReady, required Iterable<Type> dependsOn, required Set<String> registerFor}) → void
a conditional wrapper method for getIt.registerSingletonAsync it only registers if _canRegister returns true
singletonWithDependencies<T extends Object>(FactoryFunc<T> factoryfunc, {required String instanceName, required bool signalsReady, required Iterable<Type> dependsOn, required Set<String> registerFor}) → 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