about the deep copy of provider

It is a good idea to give more context, codes or example to let us answer your question correctly.

But, for your question, yes you can, depending on your use case. If you use Provider.of(context), you can set the listen value to false for which value you don’t want to change.

var fixedValue = Provider.of(context, listen: false), will not change in value

var value = Provider.of(context), will change

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top