push display scenes and automations

This commit is contained in:
ashrafzarkanisala
2024-11-27 19:41:43 +03:00
parent 69e2295180
commit cf817fd5dc
13 changed files with 141 additions and 282 deletions

View File

@ -18,7 +18,7 @@ class _ScenesAndAutomationsState extends State<ScenesAndAutomations> {
void initState() {
super.initState();
context.read<RoutineBloc>()
..add(const LoadScenes(spaceId))
..add(const LoadScenes(spaceId, communityId))
..add(const LoadAutomation(spaceId));
}
@ -34,7 +34,9 @@ class _ScenesAndAutomationsState extends State<ScenesAndAutomations> {
children: scenes.asMap().entries.map((entry) {
final scene = entry.value;
if (state.searchText != null && state.searchText!.isNotEmpty) {
return scene.name.toLowerCase().contains(state.searchText!.toLowerCase())
return scene.name
.toLowerCase()
.contains(state.searchText!.toLowerCase())
? DraggableCard(
imagePath: scene.icon ?? Assets.loginLogo,
title: scene.name,