inject property

List<Injectable> inject
final

List of models to register (inject).

IMPORTANT: You can not inject more than one instance of a model. If you have to do that, use Inject with custom name. example:

Injector(
inject: [
    Inject<int>(()=>1) // Inject a value
    Inject<int>(()=>1,name:"var1") // Inject a value with a custom name
    Inject<MyModel>(()=>MyModel()) // Inject a Model (dart class)
    Inject<int>.stream(()=>myStream<int>(),initialValue:0) // Inject a stream with optional initial value
    Inject<int>.future(()=>myFuture<int>(),initialValue:0) // Inject a future with optional initial value
  ]
)

Implementation

final List<Injectable> inject;