I want to use Consumer Widget of Provider Package in such Way that it will only run when a specific method of Class run or notifyListeners() call.
Like Here is a class
Class Example with ChangeNotifier{
void exampleMethod(){
//....Do SomeThing
notifyListeners();
}
void exampleOneMethod(){
//....Do SomeThing
notifyListeners();
}
}
So when I call Consumer in Some Widget Like This:
Consumer<Example>(builder:(_,ex,__)=>SomeWidget(
ex.exampleOneMethod();
)
Soo Consumer Widget will Only Rebuild if exampleOneMethod run and not on other methods.