mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 19:57:55 +00:00
Fetched devices based on the unit id
This commit is contained in:
@@ -16,8 +16,8 @@ class SceneView extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
create: (BuildContext context) => SceneBloc()
|
||||
..add(LoadScenes(HomeCubit.getInstance().selectedSpace!.id!)),
|
||||
create: (BuildContext context) =>
|
||||
SceneBloc()..add(LoadScenes(HomeCubit.getInstance().selectedSpace?.id ?? '')),
|
||||
child: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
if (state is DeleteSceneSuccess) {
|
||||
@@ -36,8 +36,7 @@ class SceneView extends StatelessWidget {
|
||||
listener: (context, state) {
|
||||
if (state is SceneTriggerSuccess) {
|
||||
context.showCustomSnackbar(
|
||||
message:
|
||||
'Scene ${state.sceneName} triggered successfully!');
|
||||
message: 'Scene ${state.sceneName} triggered successfully!');
|
||||
}
|
||||
},
|
||||
child: HomeCubit.getInstance().spaces?.isEmpty ?? true
|
||||
|
||||
Reference in New Issue
Block a user