public function setTheme(?string $theme): void
    {
        if (! \is_null($this->theme)) {
            $this->resolved && $this->resetViewPaths();

            $this->dispatcher->dispatch("orchestra.theme.unset: {$this->theme}");
        }

        $this->theme = $theme;
        $this->dispatcher->dispatch("orchestra.theme.set: {$this->theme}");

        if ($this->resolved) {
            $this->resolved = false;
            $this->resolving();
        }
    }