Closed vvvirani closed 1 year ago
I'll need a complete example. I can't help otherwise
This problem facing after updating flutter SDK 2.10.5 to 3.3.3.
I will share screenshot step by step.
Step 1: Create CartTest class with ChangeNotifier
Step 2: Register CartTest call under MultiProvider class
Step 3: Read CartTest class home screen
Throw error ProviderNotFoundException Could not find the current Provider
That's not really what I asked for. I'd need a complete example, something I can execute (that's not your entire app). You're cutting too much with your screenshot. So I can't know what happens.
But for starter it'd help if you could share the stacktrace and the code that the stacktrace points to.
I'd need a complete example, something I can execute (that's not your entire app).
@vvvirani To provide such example:
flutter create bug
cd bug
flutter pub add provider
flutter pub get
Write the minimal code needed to reproduce the bug in bug/lib/main.dart
, run it in the simulator to make sure the bug reproduces, then copy & paste your code here in the comments.
@rrousselGit perhaps detailed instructions should be included in the issue template? Since this package is recommended in flutter starter guides, starters (like me) will certainly come every now and then.
I have already solved this problem. Thank you.
I have already registered providers under MultiProviders class. Every provider class extends with ChangeNotifier class. But it throws ProviderNotFoundException exception.
I have used the latest package version: 6.0.3
I have attached a screenshot.