mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
Implemented tab to run setting
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_tasks_view.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/icons_dialog.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/effective_period_setting/effective_period_bottom_sheet.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class SceneAutoSettings extends StatelessWidget {
|
||||
@ -17,14 +18,13 @@ class SceneAutoSettings extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final sceneSettings =
|
||||
ModalRoute.of(context)!.settings.arguments as Map<String, dynamic>? ??
|
||||
{};
|
||||
final sceneSettings = ModalRoute.of(context)!.settings.arguments as Map<String, dynamic>? ?? {};
|
||||
final sceneId = sceneSettings['sceneId'] as String? ?? '';
|
||||
final isAutomation = context.read<CreateSceneBloc>().sceneType ==
|
||||
CreateSceneEnum.deviceStatusChanges;
|
||||
final isAutomation =
|
||||
context.read<CreateSceneBloc>().sceneType == CreateSceneEnum.deviceStatusChanges;
|
||||
final sceneName = sceneSettings['sceneName'] as String? ?? '';
|
||||
|
||||
bool showInDevice = context.read<CreateSceneBloc>().showInDeviceScreen;
|
||||
String selectedIcon = '';
|
||||
return DefaultScaffold(
|
||||
title: 'Settings',
|
||||
padding: EdgeInsets.zero,
|
||||
@ -35,44 +35,81 @@ class SceneAutoSettings extends StatelessWidget {
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios,
|
||||
)),
|
||||
child: BlocProvider(
|
||||
create: (BuildContext context) =>
|
||||
CreateSceneBloc()..add(SceneIconEvent()),
|
||||
child: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
return SizedBox(
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
child: Column(
|
||||
children: [
|
||||
DefaultContainer(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 10, left: 10, right: 10, bottom: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SecondDialog(
|
||||
WidgetList: BlocBuilder<CreateSceneBloc,
|
||||
CreateSceneState>(
|
||||
child: BlocBuilder<CreateSceneBloc, CreateSceneState>(builder: (context, state) {
|
||||
if (state is AddSceneTask) {
|
||||
showInDevice = state.showInDevice ?? false;
|
||||
}
|
||||
|
||||
return SizedBox(
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
child: Column(
|
||||
children: [
|
||||
if (!isAutomation)
|
||||
DefaultContainer(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 10, left: 10, right: 10, bottom: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
BlocProvider.of<CreateSceneBloc>(context).add(SceneIconEvent());
|
||||
return IconsDialog(
|
||||
widgetList: Container(
|
||||
height: MediaQuery.sizeOf(context).height * 0.4,
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
if (state is CreateSceneLoading) {
|
||||
return CircularProgressIndicator();
|
||||
} else if (state is CreateSceneLoaded) {
|
||||
return Container(
|
||||
child: ListView.builder(
|
||||
itemCount:
|
||||
state.iconModels.length,
|
||||
itemBuilder: (context, index) {
|
||||
final iconModel =
|
||||
state.iconModels[index];
|
||||
return Image.memory(
|
||||
iconModel.iconBytes);
|
||||
},
|
||||
return const Center(
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
width: 50,
|
||||
child: CircularProgressIndicator()),
|
||||
);
|
||||
} else if (state is AddSceneTask) {
|
||||
return GridView.builder(
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 5,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
),
|
||||
itemCount: state.iconModels?.length ?? 0,
|
||||
itemBuilder: (context, index) {
|
||||
final iconModel = state.iconModels![index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
BlocProvider.of<CreateSceneBloc>(context).add(
|
||||
IconSelected(
|
||||
iconId: iconModel.uuid,
|
||||
confirmSelection: false));
|
||||
selectedIcon = iconModel.uuid;
|
||||
},
|
||||
child: ClipOval(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(1),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: state.selectedIcon == iconModel.uuid
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: Colors.transparent,
|
||||
width: 2,
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Image.memory(
|
||||
iconModel.iconBytes,
|
||||
width: 35,
|
||||
height: 35,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
} else if (state is CreateSceneError) {
|
||||
return Text(state.message);
|
||||
@ -81,258 +118,140 @@ class SceneAutoSettings extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
),
|
||||
cancelTab: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
confirmTab: (v) {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
title: 'Icons',
|
||||
onTapLabel1: (selected) {},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
BodyMedium(text: 'Icons'),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios_outlined,
|
||||
color: ColorsManager.textGray,
|
||||
size: 15,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Row(
|
||||
),
|
||||
cancelTab: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
confirmTab: () {
|
||||
BlocProvider.of<CreateSceneBloc>(context).add(
|
||||
IconSelected(iconId: selectedIcon, confirmSelection: true));
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
title: 'Icons',
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const BodyMedium(text: 'Show on devices page'),
|
||||
Container(
|
||||
width: 100,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
height: 30,
|
||||
width: 1,
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
Transform.scale(
|
||||
scale: .8,
|
||||
child: CupertinoSwitch(
|
||||
value: true,
|
||||
onChanged: (value) {},
|
||||
applyTheme: true,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
BodyMedium(text: 'Icons'),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios_outlined,
|
||||
color: ColorsManager.textGray,
|
||||
size: 15,
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
//Cloud
|
||||
BodyMedium(text: 'Executed by'),
|
||||
Text('Cloud',
|
||||
style: TextStyle(
|
||||
color: ColorsManager.textGray,
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
// child: DefaultContainer(
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// children: [
|
||||
// const SizedBox(
|
||||
// height: 8,
|
||||
// ),
|
||||
// Visibility(
|
||||
// visible: isAutomation,
|
||||
// child: SceneListTile(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 16, vertical: 8),
|
||||
// titleString: "Effective Period",
|
||||
// trailingWidget:
|
||||
// const Icon(Icons.arrow_forward_ios_rounded),
|
||||
// onPressed: () {
|
||||
// context.customBottomSheet(
|
||||
// child: const EffectPeriodBottomSheetContent(),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// Visibility(
|
||||
// visible: sceneName.isNotEmpty && isAutomation,
|
||||
// child: SizedBox(
|
||||
// width: context.width * 0.9,
|
||||
// child: const Divider(
|
||||
// color: ColorsManager.greyColor,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Visibility(
|
||||
// visible: sceneName.isNotEmpty,
|
||||
// child: DeleteBottomSheetContent(
|
||||
// isAutomation: isAutomation,
|
||||
// sceneId: sceneId,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// height: 16,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
})));
|
||||
}
|
||||
}
|
||||
|
||||
class SecondDialog extends StatefulWidget {
|
||||
final String title;
|
||||
Widget WidgetList;
|
||||
final Function(String)? onTapLabel1;
|
||||
final Function()? cancelTab;
|
||||
final Function(int selectedSecond)? confirmTab;
|
||||
|
||||
SecondDialog({
|
||||
required this.WidgetList,
|
||||
required this.title,
|
||||
this.onTapLabel1,
|
||||
required this.cancelTab,
|
||||
required this.confirmTab,
|
||||
});
|
||||
|
||||
@override
|
||||
_SecondDialogState createState() => _SecondDialogState();
|
||||
}
|
||||
|
||||
class _SecondDialogState extends State<SecondDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
BodyLarge(
|
||||
text: widget.title,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontColor: ColorsManager.primaryColor,
|
||||
fontSize: 16,
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: Divider(
|
||||
color: ColorsManager.textGray,
|
||||
),
|
||||
),
|
||||
Expanded(child: widget.WidgetList),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
right: BorderSide(
|
||||
color: ColorsManager.textGray,
|
||||
width: 0.5,
|
||||
),
|
||||
top: BorderSide(
|
||||
color: ColorsManager.textGray,
|
||||
width: 1.0,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const BodyMedium(text: 'Show on devices page'),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
height: 30,
|
||||
width: 1,
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
Transform.scale(
|
||||
scale: .8,
|
||||
child: CupertinoSwitch(
|
||||
value: showInDevice,
|
||||
onChanged: (value) {
|
||||
BlocProvider.of<CreateSceneBloc>(context)
|
||||
.add(ShowOnDeviceClicked(value: value));
|
||||
},
|
||||
applyTheme: true,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
//Cloud
|
||||
BodyMedium(text: 'Executed by'),
|
||||
Text('Cloud',
|
||||
style: TextStyle(
|
||||
color: ColorsManager.textGray,
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
child: SizedBox(
|
||||
child: InkWell(
|
||||
onTap: widget.cancelTab,
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(15),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Cancel',
|
||||
style: TextStyle(
|
||||
color: ColorsManager.textGray,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400),
|
||||
if (isAutomation)
|
||||
DefaultContainer(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
Visibility(
|
||||
visible: isAutomation,
|
||||
child: SceneListTile(
|
||||
titleString: "Effective Period",
|
||||
trailingWidget: const Icon(Icons.arrow_forward_ios_rounded),
|
||||
onPressed: () {
|
||||
context.customBottomSheet(
|
||||
child: const EffectPeriodBottomSheetContent(),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: sceneName.isNotEmpty && isAutomation,
|
||||
child: SizedBox(
|
||||
width: context.width * 0.9,
|
||||
child: const Divider(
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: sceneName.isNotEmpty,
|
||||
child: DeleteBottomSheetContent(
|
||||
isAutomation: isAutomation,
|
||||
sceneId: sceneId,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
left: BorderSide(
|
||||
color: ColorsManager.textGray,
|
||||
width: 0.5,
|
||||
),
|
||||
top: BorderSide(
|
||||
color: ColorsManager.textGray,
|
||||
width: 1.0,
|
||||
),
|
||||
)),
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(15),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Confirm',
|
||||
style: TextStyle(
|
||||
color: ColorsManager.primaryColor,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
)),
|
||||
))
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
],
|
||||
),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -21,35 +21,32 @@ class SceneView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
create: (BuildContext context) => SceneBloc()
|
||||
..add(LoadScenes(HomeCubit.getInstance().selectedSpace?.id ?? ''))
|
||||
..add(LoadScenes(HomeCubit.getInstance().selectedSpace?.id ?? '', showInDevice: pageType))
|
||||
..add(LoadAutomation(HomeCubit.getInstance().selectedSpace?.id ?? '')),
|
||||
child: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
if (state is DeleteSceneSuccess) {
|
||||
if (state.success) {
|
||||
BlocProvider.of<SceneBloc>(context)
|
||||
.add(LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
BlocProvider.of<SceneBloc>(context).add(
|
||||
LoadAutomation(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
LoadScenes(HomeCubit.getInstance().selectedSpace!.id!, showInDevice: pageType));
|
||||
BlocProvider.of<SceneBloc>(context)
|
||||
.add(LoadAutomation(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
}
|
||||
}
|
||||
if (state is CreateSceneWithTasks) {
|
||||
if (state.success == true) {
|
||||
BlocProvider.of<SceneBloc>(context)
|
||||
.add(LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
BlocProvider.of<SceneBloc>(context).add(
|
||||
LoadAutomation(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(const SmartSceneClearEvent());
|
||||
LoadScenes(HomeCubit.getInstance().selectedSpace!.id!, showInDevice: pageType));
|
||||
BlocProvider.of<SceneBloc>(context)
|
||||
.add(LoadAutomation(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
context.read<SmartSceneSelectBloc>().add(const SmartSceneClearEvent());
|
||||
}
|
||||
}
|
||||
return BlocListener<SceneBloc, SceneState>(
|
||||
listener: (context, state) {
|
||||
if (state is SceneTriggerSuccess) {
|
||||
context.showCustomSnackbar(
|
||||
message:
|
||||
'Scene ${state.sceneName} triggered successfully!');
|
||||
message: 'Scene ${state.sceneName} triggered successfully!');
|
||||
}
|
||||
},
|
||||
child: HomeCubit.getInstance().spaces?.isEmpty ?? true
|
||||
@ -86,30 +83,25 @@ class SceneView extends StatelessWidget {
|
||||
child: ListView(
|
||||
children: [
|
||||
Theme(
|
||||
data: ThemeData().copyWith(
|
||||
dividerColor: Colors.transparent),
|
||||
data: ThemeData()
|
||||
.copyWith(dividerColor: Colors.transparent),
|
||||
child: ExpansionTile(
|
||||
tilePadding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 6),
|
||||
tilePadding: const EdgeInsets.symmetric(horizontal: 6),
|
||||
initiallyExpanded: true,
|
||||
iconColor: ColorsManager.grayColor,
|
||||
title: const BodyMedium(
|
||||
text: 'Tap to run routines'),
|
||||
title: const BodyMedium(text: 'Tap to run routines'),
|
||||
children: [
|
||||
scenes.isNotEmpty
|
||||
? SceneGrid(
|
||||
scenes: scenes,
|
||||
loadingSceneId:
|
||||
state.loadingSceneId,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
disablePlayButton: false,
|
||||
loadingStates: state
|
||||
.loadingStates, // Add this line
|
||||
loadingStates:
|
||||
state.loadingStates, // Add this line
|
||||
)
|
||||
: const Center(
|
||||
child: BodyMedium(
|
||||
text:
|
||||
'No scenes have been added yet',
|
||||
text: 'No scenes have been added yet',
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
@ -119,30 +111,25 @@ class SceneView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Theme(
|
||||
data: ThemeData().copyWith(
|
||||
dividerColor: Colors.transparent),
|
||||
data: ThemeData()
|
||||
.copyWith(dividerColor: Colors.transparent),
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: true,
|
||||
iconColor: ColorsManager.grayColor,
|
||||
tilePadding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 6),
|
||||
title: const BodyMedium(
|
||||
text: 'Automation'),
|
||||
tilePadding: const EdgeInsets.symmetric(horizontal: 6),
|
||||
title: const BodyMedium(text: 'Automation'),
|
||||
children: [
|
||||
automationList.isNotEmpty
|
||||
? SceneGrid(
|
||||
scenes: automationList,
|
||||
loadingSceneId:
|
||||
state.loadingSceneId,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
disablePlayButton: true,
|
||||
loadingStates: state
|
||||
.loadingStates, // Add this line
|
||||
loadingStates:
|
||||
state.loadingStates, // Add this line
|
||||
)
|
||||
: const Center(
|
||||
child: BodyMedium(
|
||||
text:
|
||||
'No automations have been added yet',
|
||||
text: 'No automations have been added yet',
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
Reference in New Issue
Block a user