of static method

Implementation

static InheritedTrinityScope of(BuildContext context) {
  final element = context
      .getElementForInheritedWidgetOfExactType<InheritedTrinityScope>();
  assert(
    element != null,
    'Couldn\'t find a TrinityScope in the widget tree. Did you wrap your app with TrinityScope?',
  );
  return element!.widget as InheritedTrinityScope;
}