injectable library

Classes

DisposeMethod
marks an instance method as a dispose call back to be passed to GetIt
Environment
Used to annotate dependencies which are registered under certain environments
EnvironmentFilter
a simple filter function to be used inside SimpleEnvironmentFilter filter for whether to register for the given set of environments clients can extend this class to maker their own environmentFilters
ExternalModule
FactoryMethod
Marks a factory, a named constructor or a static create function as an injectable constructor if not added the default constructor will be used
FactoryParam
Marks a constructor param as factoryParam so it can be passed to the resolver function
GetItHelper
a helper class to handle conditional registering
IgnoreParam
Constructor params annotated with IgnoreParam will be ignored by when generating the resolver function
Injectable
Marks a class as an injectable dependency and generates
InjectableInit
// Marks a top-level function as an initializer function for configuring Get_it
LazySingleton
Classes annotated with @LazySingleton will generate registerLazySingleton func
MicroPackageModule
Module
marks a class as a register module where all property accessors rerun types are considered factories unless annotated with @singleton/lazySingleton.
Named
Used to register a dependency under a name instead of type also used to annotated named injected dependencies in constructors
NoEnvOrContains
This filter validates dependencies with no environment keys or contain the provided environment
NoEnvOrContainsAll
This filter validates dependencies with no environment keys, or the ones containing all the provided environments
NoEnvOrContainsAny
This filter validates dependencies with no environment keys, or the ones containing one of the provided environments
Order
Classes annotated with @Order will overwrite the automatically generated position of the
PostConstruct
methods annotated with postConstruct will be called in a cascade manner after being constructed
PreResolve
Futures annotated with preResolve will be pre-awaited before they're registered inside of GetIt
Scope
Used to annotate dependencies which are registered under a different scope than main-scope
SimpleEnvironmentFilter
A simple filter that can be used directly for simple use cases without having to extend the base EnvironmentFilter
Singleton
Classes annotated with @Singleton will generate registerSingleton function

Extensions

SetX on Set<T>

Constants

dev → const Environment
preset instance of common env name
disposeMethod → const DisposeMethod
const instance of DisposeMethod with default arguments
factoryMethod → const FactoryMethod
const instance of FactoryMethod with default values
factoryParam → const FactoryParam
const instance of FactoryParam with default arguments
ignoreParam → const IgnoreParam
const instance of IgnoreParam
injectable → const Injectable
const instance of Injectable with default arguments
injectableInit → const InjectableInit
const instance of InjectableInit with default arguments
kEnvironmentsFilterName → const String
kEnvironmentsName → const String
instance name for the Set of environment keys that's registered internally inside of GetItHelper
lazySingleton → const LazySingleton
const instance of LazySingleton with default arguments
microPackageInit → const InjectableInit
const instance of InjectableInit.microPackage with default arguments
module → const Module
const instance of Module with default arguments
named → const Named
const instance of Named with default arguments
order → const Order
const instance of Order with default arguments
postConstruct → const PostConstruct
const instance of PostConstruct with default arguments
preResolve → const PreResolve
const instance of PreResolve with default arguments
prod → const Environment
preset instance of common env name
singleton → const Singleton
const instance of Singleton with default arguments
test → const Environment
preset instance of common env name

Typedefs

EnvironmentFilterFunc = bool Function(Set<String>)