mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 18:16:34 +00:00
Bug fixes
This commit is contained in:
@ -23,31 +23,34 @@ class RoutineState extends Equatable {
|
||||
final bool? isUpdate;
|
||||
final List<AllDevicesModel> devices;
|
||||
final String? automationActionExecutor;
|
||||
final bool routineTab;
|
||||
final bool createRoutineView;
|
||||
|
||||
const RoutineState({
|
||||
this.ifItems = const [],
|
||||
this.thenItems = const [],
|
||||
this.availableCards = const [],
|
||||
this.scenes = const [],
|
||||
this.automations = const [],
|
||||
this.selectedFunctions = const {},
|
||||
this.isLoading = false,
|
||||
this.errorMessage,
|
||||
this.routineName,
|
||||
this.selectedIcon,
|
||||
this.loadScenesErrorMessage,
|
||||
this.loadAutomationErrorMessage,
|
||||
this.searchText,
|
||||
this.isTabToRun = false,
|
||||
this.isAutomation = false,
|
||||
this.selectedAutomationOperator = 'or',
|
||||
this.effectiveTime,
|
||||
this.sceneId,
|
||||
this.automationId,
|
||||
this.isUpdate,
|
||||
this.devices = const [],
|
||||
this.automationActionExecutor,
|
||||
});
|
||||
const RoutineState(
|
||||
{this.ifItems = const [],
|
||||
this.thenItems = const [],
|
||||
this.availableCards = const [],
|
||||
this.scenes = const [],
|
||||
this.automations = const [],
|
||||
this.selectedFunctions = const {},
|
||||
this.isLoading = false,
|
||||
this.errorMessage,
|
||||
this.routineName,
|
||||
this.selectedIcon,
|
||||
this.loadScenesErrorMessage,
|
||||
this.loadAutomationErrorMessage,
|
||||
this.searchText,
|
||||
this.isTabToRun = false,
|
||||
this.isAutomation = false,
|
||||
this.selectedAutomationOperator = 'or',
|
||||
this.effectiveTime,
|
||||
this.sceneId,
|
||||
this.automationId,
|
||||
this.isUpdate,
|
||||
this.devices = const [],
|
||||
this.automationActionExecutor,
|
||||
this.routineTab = false,
|
||||
this.createRoutineView = false});
|
||||
|
||||
RoutineState copyWith({
|
||||
List<Map<String, dynamic>>? ifItems,
|
||||
@ -71,34 +74,34 @@ class RoutineState extends Equatable {
|
||||
bool? isUpdate,
|
||||
List<AllDevicesModel>? devices,
|
||||
String? automationActionExecutor,
|
||||
TextEditingController? nameController,
|
||||
bool? routineTab,
|
||||
bool? createRoutineView,
|
||||
}) {
|
||||
return RoutineState(
|
||||
ifItems: ifItems ?? this.ifItems,
|
||||
thenItems: thenItems ?? this.thenItems,
|
||||
scenes: scenes ?? this.scenes,
|
||||
automations: automations ?? this.automations,
|
||||
selectedFunctions: selectedFunctions ?? this.selectedFunctions,
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
routineName: routineName ?? this.routineName,
|
||||
selectedIcon: selectedIcon ?? this.selectedIcon,
|
||||
loadScenesErrorMessage:
|
||||
loadScenesErrorMessage ?? this.loadScenesErrorMessage,
|
||||
loadAutomationErrorMessage:
|
||||
loadAutomationErrorMessage ?? this.loadAutomationErrorMessage,
|
||||
searchText: searchText ?? this.searchText,
|
||||
isTabToRun: isTabToRun ?? this.isTabToRun,
|
||||
isAutomation: isAutomation ?? this.isAutomation,
|
||||
selectedAutomationOperator:
|
||||
selectedAutomationOperator ?? this.selectedAutomationOperator,
|
||||
effectiveTime: effectiveTime ?? this.effectiveTime,
|
||||
sceneId: sceneId ?? this.sceneId,
|
||||
automationId: automationId ?? this.automationId,
|
||||
isUpdate: isUpdate ?? this.isUpdate,
|
||||
devices: devices ?? this.devices,
|
||||
automationActionExecutor:
|
||||
automationActionExecutor ?? this.automationActionExecutor,
|
||||
);
|
||||
ifItems: ifItems ?? this.ifItems,
|
||||
thenItems: thenItems ?? this.thenItems,
|
||||
scenes: scenes ?? this.scenes,
|
||||
automations: automations ?? this.automations,
|
||||
selectedFunctions: selectedFunctions ?? this.selectedFunctions,
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
routineName: routineName ?? this.routineName,
|
||||
selectedIcon: selectedIcon ?? this.selectedIcon,
|
||||
loadScenesErrorMessage: loadScenesErrorMessage ?? this.loadScenesErrorMessage,
|
||||
loadAutomationErrorMessage: loadAutomationErrorMessage ?? this.loadAutomationErrorMessage,
|
||||
searchText: searchText ?? this.searchText,
|
||||
isTabToRun: isTabToRun ?? this.isTabToRun,
|
||||
isAutomation: isAutomation ?? this.isAutomation,
|
||||
selectedAutomationOperator: selectedAutomationOperator ?? this.selectedAutomationOperator,
|
||||
effectiveTime: effectiveTime ?? this.effectiveTime,
|
||||
sceneId: sceneId ?? this.sceneId,
|
||||
automationId: automationId ?? this.automationId,
|
||||
isUpdate: isUpdate ?? this.isUpdate,
|
||||
devices: devices ?? this.devices,
|
||||
automationActionExecutor: automationActionExecutor ?? this.automationActionExecutor,
|
||||
routineTab: routineTab ?? this.routineTab,
|
||||
createRoutineView: createRoutineView ?? this.createRoutineView);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -124,5 +127,7 @@ class RoutineState extends Equatable {
|
||||
isUpdate,
|
||||
devices,
|
||||
automationActionExecutor,
|
||||
routineTab,
|
||||
createRoutineView
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user