Update Automation Status

This commit is contained in:
mohammad
2025-03-19 12:24:55 +03:00
parent 5e05b20f68
commit c0d53fdf5c
12 changed files with 512 additions and 71 deletions

View File

@ -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(