bizz84 / bizz84/time_tracker_flutter_course
error in debug console on anonymous logout
- Dominant language
- Dart
- Stars
- 402
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Description
I received the following error in the debug console when clicking "logout". Note: the error *might* only appear using the latest packages.
``` sh
flutter: 'package:provider/src/provider.dart': Failed assertion: line 202 pos 7: 'context.owner.debugBuilding ||
listen == false ||
debugIsInInheritedProviderUpdate': Tried to listen to a value exposed with provider, from outside of the widget tree.
This is likely caused by an event handler (like a button's onPressed) that called
Provider.of without passing `listen: false`.
To fix, write:
Provider.of(context, listen: false);
It is unsupported because may pointlessly rebuild the widget associated to the
event handler, when the widget tree doesn't care about the value.
The context used was: AccountPage(dependencies: [_LocalizationsScope-[GlobalKey#7b2b3], _InheritedProviderScope, _InheritedCupertinoTheme])
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.