shouldUpdateWidgetChildren method

bool shouldUpdateWidgetChildren(
  1. Widget oldWidget,
  2. bool shouldUpdateWidget
)

Whether to update current widget's children.

Framework will always call this method after calling shouldUpdateWidget along with results of call to shouldUpdateWidget on current widget.

If current widget knows in advance whether widgets below it doesn't need to update then it can override this method and return false which will short-circuit the diffing process.

Implementation

bool shouldUpdateWidgetChildren(Widget oldWidget, bool shouldUpdateWidget) {
  return true;
}