markNeedsBuild method

  1. @override
  2. @protected
void markNeedsBuild()
override

Requests that this HookContext should be rebuilt.

This method should only be called from implementations of HookState. This method can't be called during build. Depending on the implementation, the build can be performed immediately or scheduled for later. In such case, if markNeedsBuild is called multiple times before the build is performed, it should be performed only once.

Implementation

@override
@protected
void markNeedsBuild() {
  if (shouldRebuild) {
    _scheduler(rebuild);
  } else {
    _needsBuild = true;
  }
}