mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
push dialog confirm selection safety
This commit is contained in:
@ -46,9 +46,7 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add( AddTaskEvent());
|
||||
context.read<CreateSceneBloc>().add(AddTaskEvent());
|
||||
Navigator.popUntil(context, (route) {
|
||||
return route.settings.name == Routes.sceneTasksRoute;
|
||||
});
|
||||
@ -135,6 +133,7 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
final functionValues = context
|
||||
.read<CreateSceneBloc>()
|
||||
.selectedValues[functions[index].code];
|
||||
|
||||
context.customAlertDialog(
|
||||
alertBody: functions[index].code == 'temp_set'
|
||||
? AlertDialogTemperatureBody(
|
||||
@ -166,6 +165,9 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
final selectedValue = context
|
||||
.read<CreateSceneBloc>()
|
||||
.selectedValues[functions[index].code];
|
||||
if (selectedValue == null) {
|
||||
return;
|
||||
}
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(TempHoldSceneTasksEvent(
|
||||
|
Reference in New Issue
Block a user