UncontrolledProviderScope constructor

const UncontrolledProviderScope({
  1. Key? key,
  2. required ProviderContainer container,
  3. required Widget child,
})

Expose a ProviderContainer to the widget tree.

This is what makes Consumer work.

Note: The container will not be disposed when using this widget. It is the caller's responsibility to dispose of it when no longer needed. Alternatively, use ProviderScope to automatically manage the lifecycle of the ProviderContainer.

Implementation

const UncontrolledProviderScope({
  super.key,
  required this.container,
  required this.child,
});