of static method

Carpenter of(
  1. BuildContext context
)

Возвращает ближайший runtime Carpenter из BuildContext.

Implementation

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