mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-12 00:03:13 +00:00
@ -27,16 +27,14 @@ class _ScenesAndAutomationsState extends State<ScenesAndAutomations> {
|
||||
return BlocBuilder<RoutineBloc, RoutineState>(
|
||||
builder: (context, state) {
|
||||
if (!state.isLoading) {
|
||||
final scenes = [...state.scenes, ...state.automations];
|
||||
var scenes = [...state.scenes, ...state.automations];
|
||||
return Wrap(
|
||||
spacing: 10,
|
||||
runSpacing: 10,
|
||||
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,
|
||||
|
Reference in New Issue
Block a user