of static method

Возвращает runtime из widget tree.

Implementation

static CarpenterRuntime of(BuildContext context) {
  final scope = context
      .dependOnInheritedWidgetOfExactType<CarpenterRuntimeScope>();
  assert(scope != null, 'No CarpenterRuntimeScope found in context.');
  return scope!.runtime;
}