gas library

Alias to petrol.dart.

Classes

Fuel<T>
A service locator that manages dependencies of type T. Explicit registry of dependencies are optional, they may be lazily registered at the time they are injected instead; The service locator will handle it automatically by utilizing Dart's generics type system.

Properties

fuel Fuel
A globally available instance of Fuel. Note that this instance is not type safe; if type safety is a requirement, instantiate your own instance of Fuel with a generic to narrow down the usable types.
final
tank Fuel<Fuel>
A special global instance of Fuel to manage subtypes of Fuel. Note that they have to be subtypes of Fuel to work, else only a single instance of a Fuel injector will be available.
final

Typedefs

Injector<T> = T Function()
A Function that returns an instance of type T.
Processor<T> = T Function(T)
Processes the given dependency.