mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-23 11:27:54 +00:00
fix load scenes after creation
This commit is contained in:
@@ -26,6 +26,12 @@ class SceneView extends StatelessWidget {
|
||||
.add(LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
}
|
||||
}
|
||||
if (state is CreateSceneWithTasks) {
|
||||
if (state.success == true) {
|
||||
BlocProvider.of<SceneBloc>(context)
|
||||
.add(LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
}
|
||||
}
|
||||
return BlocListener<SceneBloc, SceneState>(
|
||||
listener: (context, state) {
|
||||
if (state is SceneTriggerSuccess) {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_event.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/scene_logic_helper.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_button.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
@@ -45,7 +48,6 @@ class _CreateSceneSaveButtonState extends State<CreateSceneSaveButton>
|
||||
if (state.success == true) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
|
||||
context.showCustomSnackbar(
|
||||
message: 'Scene created successfully',
|
||||
icon: const Icon(
|
||||
|
||||
Reference in New Issue
Block a user