Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Erro ao tentar registrar aula 5

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"

2 respostas
solução!

Fiz assim para resolver mas não sei se é a melhor solução: Provider.of(context, listen: false).nome = _nomeController.text;

Oi Sandy, tudo bem ?

É um jeito maneiro pra resolver o problema :)