So I’m a little confused about how to port an application using setstate to provider.
Let’s say I have a person model which extends provider. Now I also want to have multiple person reports. Each report has it’s own properties such, title, created date etc plus a list of people.
The trouble I’m having understanding is how would I create a provider per person and per person report? All the examples I’ve seen of using provider appear to have just one instance of the provider.
Effectively I would want to be able to edit person ‘A’s values without it effecting person ‘B’s
EDIT:
Each instance of my object will need a separate state. How can provider manage states of multiple objects all of the same type?.
EDIT 2:
I’ll try to clarify further with a different example. Imagine the counter widget that is the default example when creating a flutter app. What if I require a list of dynamically created counters (maybe 10, maybe 100 of them). Would each counter would have it’s own provider controlling it’s state and if so, how would we create that?