push snackbar fix and device to scene route

This commit is contained in:
ashrafzarkanisala
2024-08-04 20:38:21 +03:00
parent a5a2446942
commit 1297d4ec89
4 changed files with 23 additions and 12 deletions
@@ -39,11 +39,15 @@ class SceneItem extends StatelessWidget {
if (disablePlayButton == false) {
BlocProvider.of<CreateSceneBloc>(context).add(
FetchSceneTasksEvent(sceneId: scene.id, isAutomation: false));
/// the state to set the scene type must be after the fetch
BlocProvider.of<CreateSceneBloc>(context)
.add(const SceneTypeEvent(CreateSceneEnum.tabToRun));
} else {
BlocProvider.of<CreateSceneBloc>(context)
.add(FetchSceneTasksEvent(sceneId: scene.id, isAutomation: true));
/// the state to set the scene type must be after the fetch
BlocProvider.of<CreateSceneBloc>(context)
.add(const SceneTypeEvent(CreateSceneEnum.deviceStatusChanges));
}