replaceScene method
Replaces the first scene whose runtimeType == scene.runtimeType with scene.
Implementation
E replaceScene(Scene<T> scene) {
final old = _scenes.where((c) => c.runtimeType == scene.runtimeType).firstOrNull;
if (old != null) removeScene(old);
addScene(scene);
return self;
}