mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 23:27:56 +00:00
updated project hardcoded values
This commit is contained in:
@@ -2,9 +2,12 @@ import 'dart:async';
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/auth/model/project_model.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_event.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scenes_model.dart';
|
||||
import 'package:syncrow_app/services/api/scene_api.dart';
|
||||
import 'package:syncrow_app/utils/constants/temp_const.dart';
|
||||
|
||||
part 'scene_state.dart';
|
||||
|
||||
@@ -23,9 +26,11 @@ class SceneBloc extends Bloc<SceneEvent, SceneState> {
|
||||
emit(SceneLoading());
|
||||
|
||||
try {
|
||||
Project? project = HomeCubit.getInstance().project;
|
||||
|
||||
if (event.unitId.isNotEmpty) {
|
||||
scenes = await SceneApi.getScenesByUnitId(
|
||||
event.unitId, event.unit.community.uuid,
|
||||
scenes = await SceneApi.getScenesByUnitId(event.unitId,
|
||||
event.unit.community.uuid, project?.uuid ?? TempConst.projectIdDev,
|
||||
showInDevice: event.showInDevice);
|
||||
emit(SceneLoaded(scenes, automationList));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user