rebuildIfNecessary method

void rebuildIfNecessary()

Invoke the callback supplied via updateCallback.

Typically this results in ConstrainedLayoutBuilder.builder being called during layout.

Implementation

void rebuildIfNecessary() {
  assert(_callback != null);
  if (_needsBuild || constraints != _previousConstraints) {
    _previousConstraints = constraints;
    _needsBuild = false;
    invokeLayoutCallback(_callback!);
  }
}