Assertion failed: file:///Users/sandy/development/flutter/.pub-cache/hosted/pub.dartlang.org/provider-5.0.0/lib/src/provider.dart:265:7
context.owner!.debugBuilding ||
listen == false ||
debugIsInInheritedProviderUpdate
"Tried to listen to a value exposed with provider, from outside of the widget tree.\n\nThis is likely caused by an event handler (like a button's onPressed) that called\nProvider.of without passing listen: false
.\n\nTo fix, write:\nProvider.of(context, listen: false);\n\nIt is unsupported because may pointlessly rebuild the widget associated to the\nevent handler, when the widget tree doesn't care about the value.\n\nThe context used was: Registrar(dependencies: [_InheritedTheme, _LocalizationsScope-[GlobalKey#e67f5]])\n"