of static method

Returns the nearest GlassEditController in the widget tree, or throws if none is found.

Implementation

static GlassEditController of(BuildContext context) {
  final controller = maybeOf(context);
  assert(
    controller != null,
    'No GlassEditScope found in the given BuildContext. '
    'Wrap your widget tree with a GlassEditScope.',
  );
  return controller!;
}