mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
91 lines
1.9 KiB
Dart
91 lines
1.9 KiB
Dart
part of 'routine_bloc.dart';
|
|
|
|
abstract class RoutineEvent extends Equatable {
|
|
const RoutineEvent();
|
|
|
|
@override
|
|
List<Object> get props => [];
|
|
}
|
|
|
|
class AddToIfContainer extends RoutineEvent {
|
|
final Map<String, dynamic> item;
|
|
final bool isTabToRun;
|
|
|
|
const AddToIfContainer(this.item, this.isTabToRun);
|
|
|
|
@override
|
|
List<Object> get props => [item, isTabToRun];
|
|
}
|
|
|
|
class AddToThenContainer extends RoutineEvent {
|
|
final Map<String, dynamic> item;
|
|
|
|
const AddToThenContainer(this.item);
|
|
|
|
@override
|
|
List<Object> get props => [item];
|
|
}
|
|
|
|
class LoadScenes extends RoutineEvent {
|
|
final String unitId;
|
|
|
|
const LoadScenes(this.unitId);
|
|
|
|
@override
|
|
List<Object> get props => [unitId];
|
|
}
|
|
|
|
class LoadAutomation extends RoutineEvent {
|
|
final String unitId;
|
|
|
|
const LoadAutomation(this.unitId);
|
|
|
|
@override
|
|
List<Object> get props => [unitId];
|
|
}
|
|
|
|
class AddFunctionToRoutine extends RoutineEvent {
|
|
final List<DeviceFunctionData> functions;
|
|
final String uniqueCustomId;
|
|
const AddFunctionToRoutine(this.functions, this.uniqueCustomId);
|
|
@override
|
|
List<Object> get props => [functions, uniqueCustomId];
|
|
}
|
|
|
|
class RemoveFunction extends RoutineEvent {
|
|
final DeviceFunctionData function;
|
|
const RemoveFunction(this.function);
|
|
@override
|
|
List<Object> get props => [function];
|
|
}
|
|
|
|
class SearchRoutines extends RoutineEvent {
|
|
final String query;
|
|
const SearchRoutines(this.query);
|
|
@override
|
|
List<Object> get props => [query];
|
|
}
|
|
|
|
class AddSelectedIcon extends RoutineEvent {
|
|
final String icon;
|
|
const AddSelectedIcon(this.icon);
|
|
@override
|
|
List<Object> get props => [icon];
|
|
}
|
|
|
|
class CreateSceneEvent extends RoutineEvent {
|
|
const CreateSceneEvent();
|
|
@override
|
|
List<Object> get props => [];
|
|
}
|
|
|
|
class RemoveDragCard extends RoutineEvent {
|
|
final int index;
|
|
final bool isFromThen;
|
|
const RemoveDragCard({required this.index, required this.isFromThen});
|
|
@override
|
|
List<Object> get props => [index];
|
|
}
|
|
|
|
class ClearFunctions extends RoutineEvent {}
|