Problem with Provider in settings view - flutter

Viewed 26

I need help with the settings section of my app.

The settings view has approximately 30 customs widgets (the 3 types appear in the image), the issue is that I manage the state of each of these variables through Provider, when initializing the app I receive perfectly the data from my API and each of the widgets is redrawn, the problem occurs when I change a value and set the provider, I have to update each parameter individually with this function inside the provider:

void updateAttribute(value) {
    attribute = value;
    notifyListeners();
}

Is there any way to scale this and not develop a function for each attribute, with some setAttribute() or something like that. thanks.

app reference

0 Answers
Related