Injector constructor

const Injector({
  1. Key? key,
  2. required List<Injectable> inject,
  3. required Widget builder(
    1. BuildContext
    ),
  4. void initState()?,
  5. void dispose()?,
  6. void afterInitialBuild(
    1. BuildContext context
    )?,
  7. void appLifeCycle(
    1. AppLifecycleState
    )?,
  8. List<ReactiveModel>? reinjectOn,
  9. bool shouldNotifyOnReinjectOn = true,
})

A class used to register (inject) models.

Implementation

const Injector({
  Key? key,
  // for injection
  required this.inject,
  required this.builder,
  //for app lifecycle
  this.initState,
  this.dispose,
  this.afterInitialBuild,
  this.appLifeCycle,
  this.reinjectOn,
  this.shouldNotifyOnReinjectOn = true,
  // this.disposeModels = false,
}) : super(key: key);