registerToBuild static method

void registerToBuild(
  1. BuildContext context, [
  2. bool withDescendants = false
])

Experimental

Register current page and all its descendants to rebuild. Helpful when building for web and desktop

Implementation

static void registerToBuild(
  BuildContext context, [
  bool withDescendants = false,
]) {
  (_instance._elementsToRebuild ??= {}).add(context as Element);

  if (withDescendants) {
    context.visitChildren((element) {
      registerToBuild(element, true);
    });
  }
}