mount method

Scene<T> mount()

Mounts this node as the root of a new Scene and returns it.

A no-op that returns the existing Scene if already mounted.

Implementation

Scene<T> mount() {
  if (isMounted) {
    // TODO: Should this throw a StateError?
    return scene as Scene<T>;
  }

  return Scene._(node: this);
}