Rianou
Rianou

Reputation: 439

Error: Could not find the correct Provider<> above this _SomeWidget Widget

I have problem with my provider. I have seen there is an other question about that but I didn't understand the answer... I am a beginner please be understanding with me =) I have followed a tutorial but I have made some mistakes. I have published my code on GitHub : https://github.com/Rianou20/App-test

and the screenshots :

Error part 1

Error part 2

Debug Consol

Exception

Thanks !

Update : I have put my MultiProviders in main.dart

Upvotes: 0

Views: 499

Answers (1)

ahmed
ahmed

Reputation: 454

add the MultiProvider to the MyApp not the Nav class, this happen because you called other Widget classes outside the context that contain the Provider Object, best way to do not get any provider error is to read Provider Documment

Upvotes: 1

Related Questions