of static method

ProviderContainer of(
  1. BuildContext context
)

Retrieves the DartBlockEditor's ProviderContainer from the context.

Throws an assertion error if no DartBlockContainerProvider is found in the widget tree. Use this when you're certain the context is within a DartBlockEditor.

Implementation

static ProviderContainer of(BuildContext context) {
  final container = maybeOf(context);
  assert(
    container != null,
    'DartBlockContainerProvider not found in widget tree. '
    'This widget must be a descendant of DartBlockEditor.',
  );
  return container!;
}