Consumer widget making rigorous rebuilds of children

I have a widget where I use Consumer at the top of it and it is causing the children to rebuild rigourously before finally crashing the app.

code-:

log after crash-:

While this is the crash log, there are print calls getting printed corresponding tot he rebuilds multiple times repeatedly.

While debugging, I found that it eventually rebuilds after calling framework.dart file line 5744.

So, am I missing some theory related to the Consumer widtget that is causing this?

Just a hunch, but perhaps your provider state type doesn’t have a good equality story, like if your state type is List, you’ve already lost. Also, your Consumer should wrap the smallest part of the dependent widget, or pass a child argument for things that should not be rebuilt.