shouldRebuild method

bool shouldRebuild()
inherited

Called before a build triggered by markMayNeedRebuild.

If shouldRebuild returns false on all the hooks that called markMayNeedRebuild then this aborts the rebuild of the associated HookWidget.

There is no guarantee that this method will be called after markMayNeedRebuild was called. Some situations where shouldRebuild will not be called:

  • setState was called
  • a previous hook's shouldRebuild returned true
  • the associated HookWidget changed.

Implementation

bool shouldRebuild() => true;