of static method

KhaltiScope of(
  1. BuildContext context
)

Returns the KhaltiScope instance for the widget tree that corresponds to the given context.

Implementation

static KhaltiScope of(BuildContext context) {
  final _InheritedKhaltiScope? scope =
      context.dependOnInheritedWidgetOfExactType();
  assert(scope != null, 'KhaltiScope could not be found in context');
  return scope!.scope;
}