removeAllScenes method
void
removeAllScenes()
Remove all scense disposing of them first, and clear the current scene.
Implementation
void removeAllScenes() {
// Clear the current scene.
updateState((state) => state.clear(currentScene: true));
// Dispose of all scenes.
state.scenes.map((scene) => scene.dispose());
// Remove all scenes.
updateState((state) => state.clear(scenes: true));
}