mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Update Automation Status
This commit is contained in:
@ -60,22 +60,39 @@ class _RoutinesViewState extends State<RoutinesView> {
|
||||
height: 10,
|
||||
),
|
||||
RoutineViewCard(
|
||||
isFromScenes: false,
|
||||
cardType: '',
|
||||
spaceName: '',
|
||||
onTap: () {
|
||||
if (context.read<SpaceTreeBloc>().state.selectedCommunities.length == 1 &&
|
||||
context.read<SpaceTreeBloc>().state.selectedSpaces.length == 1) {
|
||||
if (context
|
||||
.read<SpaceTreeBloc>()
|
||||
.state
|
||||
.selectedCommunities
|
||||
.length ==
|
||||
1 &&
|
||||
context
|
||||
.read<SpaceTreeBloc>()
|
||||
.state
|
||||
.selectedSpaces
|
||||
.length ==
|
||||
1) {
|
||||
context.read<RoutineBloc>().add(
|
||||
(ResetRoutineState()),
|
||||
);
|
||||
BlocProvider.of<RoutineBloc>(context).add(
|
||||
const CreateNewRoutineViewEvent(createRoutineView: true),
|
||||
const CreateNewRoutineViewEvent(
|
||||
createRoutineView: true),
|
||||
);
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
context.read<SpaceTreeBloc>().state.selectedSpaces.isEmpty
|
||||
? 'Please select a space'
|
||||
: 'Please select only one space to proceed'),
|
||||
content: Text(context
|
||||
.read<SpaceTreeBloc>()
|
||||
.state
|
||||
.selectedSpaces
|
||||
.isEmpty
|
||||
? 'Please select a space'
|
||||
: 'Please select only one space to proceed'),
|
||||
),
|
||||
);
|
||||
// CustomSnackBar.redSnackBar(
|
||||
|
Reference in New Issue
Block a user