part of 'routine_bloc.dart'; class RoutineState extends Equatable { final List> ifItems; final List> thenItems; final List> availableCards; final List scenes; final List automations; final Map> selectedFunctions; final bool isLoading; final String? errorMessage; final String? loadScenesErrorMessage; final String? loadAutomationErrorMessage; final String? routineName; final String? selectedIcon; final String? searchText; final bool isTabToRun; final bool isAutomation; final String selectedAutomationOperator; final EffectiveTime? effectiveTime; final String? sceneId; final String? automationId; final bool? isUpdate; final List devices; 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 [], }); RoutineState copyWith({ List>? ifItems, List>? thenItems, List? scenes, List? automations, Map>? selectedFunctions, bool? isLoading, String? errorMessage, String? routineName, String? selectedIcon, String? loadAutomationErrorMessage, String? loadScenesErrorMessage, String? searchText, bool? isTabToRun, bool? isAutomation, String? selectedAutomationOperator, EffectiveTime? effectiveTime, String? sceneId, String? automationId, bool? isUpdate, List? devices, }) { 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, ); } @override List get props => [ ifItems, thenItems, scenes, automations, selectedFunctions, isLoading, errorMessage, routineName, selectedIcon, loadScenesErrorMessage, loadAutomationErrorMessage, searchText, isTabToRun, isAutomation, selectedAutomationOperator, effectiveTime, sceneId, automationId, isUpdate, devices, ]; }