Skip to content

Is nested override possible? #994

Answered by rrousselGit
nogaten asked this question in Q&A
Discussion options

You must be logged in to vote

No, this isn't and won't be supported.

Instead do:

  final container = ProviderContainer(
    overrides: [
      provider1.overrideWithProvider(Provider((ref) => ref.watch(provider2))),
      ...
    ],
  );

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nogaten
Comment options

Answer selected by nogaten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants