InjectorScopeWidget constructor

const InjectorScopeWidget({
  1. required Widget child,
  2. Key? key,
  3. required List<Provider> providers,
  4. Injector? injector,
})

Creates an InjectorScopeWidget.

  • child: The widget subtree that will have access to the new Injector.
  • providers: A list of Providers to register in the new Injector.
  • injector: Optional. Currently unused by the constructor, but kept for consistency with other widgets.

Implementation

const InjectorScopeWidget({required Widget child, super.key, required List<Provider> providers, Injector? injector})
    : _providers = providers,
      _child = child;