If you want to listen to the new value, don’t put the provider in the initState() , it will cause an exception .
Read moreIs context available in initState Flutter?
The initstate() is called before the state loads its dependencies. And for that reason no context is available .20 Tem 2021
Read more