mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-15 17:47:53 +00:00
push connecting to automation api
This commit is contained in:
@ -17,6 +17,7 @@ class RoutineState extends Equatable {
|
||||
final bool isTabToRun;
|
||||
final bool isAutomation;
|
||||
final String selectedAutomationOperator;
|
||||
final EffectiveTime? effectiveTime;
|
||||
|
||||
const RoutineState({
|
||||
this.ifItems = const [],
|
||||
@ -35,43 +36,48 @@ class RoutineState extends Equatable {
|
||||
this.isTabToRun = false,
|
||||
this.isAutomation = false,
|
||||
this.selectedAutomationOperator = 'or',
|
||||
this.effectiveTime,
|
||||
});
|
||||
|
||||
RoutineState copyWith(
|
||||
{List<Map<String, dynamic>>? ifItems,
|
||||
List<Map<String, dynamic>>? thenItems,
|
||||
List<ScenesModel>? scenes,
|
||||
List<ScenesModel>? automations,
|
||||
Map<String, List<DeviceFunctionData>>? selectedFunctions,
|
||||
bool? isLoading,
|
||||
String? errorMessage,
|
||||
String? routineName,
|
||||
String? selectedIcon,
|
||||
String? loadAutomationErrorMessage,
|
||||
String? loadScenesErrorMessage,
|
||||
String? searchText,
|
||||
bool? isTabToRun,
|
||||
bool? isAutomation,
|
||||
String? selectedAutomationOperator}) {
|
||||
RoutineState copyWith({
|
||||
List<Map<String, dynamic>>? ifItems,
|
||||
List<Map<String, dynamic>>? thenItems,
|
||||
List<ScenesModel>? scenes,
|
||||
List<ScenesModel>? automations,
|
||||
Map<String, List<DeviceFunctionData>>? selectedFunctions,
|
||||
bool? isLoading,
|
||||
String? errorMessage,
|
||||
String? routineName,
|
||||
String? selectedIcon,
|
||||
String? loadAutomationErrorMessage,
|
||||
String? loadScenesErrorMessage,
|
||||
String? searchText,
|
||||
bool? isTabToRun,
|
||||
bool? isAutomation,
|
||||
String? selectedAutomationOperator,
|
||||
EffectiveTime? effectiveTime,
|
||||
}) {
|
||||
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);
|
||||
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,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -90,6 +96,7 @@ class RoutineState extends Equatable {
|
||||
searchText,
|
||||
isTabToRun,
|
||||
isAutomation,
|
||||
selectedAutomationOperator
|
||||
selectedAutomationOperator,
|
||||
effectiveTime
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user