didChangeDependencies method

  1. @protected
void didChangeDependencies()

Called when a dependency of this State object changes.

For example, if the previous call to build referenced an InheritedWidget that later changed, the framework would call this method to notify this object about the change. This method is also called immediately after initState.

The framework always calls build after calling didChangeDependencies, which means any calls to setState in didChangeDependencies are redundant.

Implementation

@protected
void didChangeDependencies() {}