of static method

Scene of(
  1. BuildContext context
)

The Scene of the nearest enclosing SceneView.

Throws if there is no SceneScope ancestor.

Implementation

static Scene of(BuildContext context) {
  final scope = maybeOf(context);
  assert(scope != null, 'No SceneScope found in the widget tree.');
  return scope!.scene;
}