of static method

KnobsProvider of(
  1. BuildContext context
)

Gets KnobsProvider from context.

Implementation

static KnobsProvider of(BuildContext context) {
  final KnobsProvider? result =
      context.dependOnInheritedWidgetOfExactType<KnobsProvider>();
  assert(result != null, 'No KnobsProvider found in context');
  return result!;
}