mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 18:16:21 +00:00
93 lines
1.9 KiB
Dart
93 lines
1.9 KiB
Dart
part of 'devices_cubit.dart';
|
|
|
|
@immutable
|
|
abstract class DevicesState {}
|
|
|
|
class DevicesInitial extends DevicesState {}
|
|
|
|
class DevicesLoading extends DevicesState {}
|
|
|
|
class DevicesSuccess extends DevicesState {}
|
|
|
|
class DevicesFailure extends DevicesState {}
|
|
|
|
class ChangeIndex extends DevicesState {}
|
|
|
|
// Devices
|
|
|
|
class GetDeviceStatusLoading extends DevicesState {
|
|
final String? code;
|
|
|
|
GetDeviceStatusLoading({this.code});
|
|
}
|
|
|
|
class GetDeviceStatusSuccess extends DevicesState {
|
|
final String? code;
|
|
|
|
GetDeviceStatusSuccess({this.code});
|
|
}
|
|
|
|
class GetDeviceStatusError extends DevicesState {
|
|
final String errorMsg;
|
|
|
|
GetDeviceStatusError(this.errorMsg);
|
|
}
|
|
|
|
class GetDevicesLoading extends DevicesState {}
|
|
|
|
class GetDevicesSuccess extends DevicesState {
|
|
GetDevicesSuccess(this.devices);
|
|
final List<DeviceModel>? devices;
|
|
}
|
|
|
|
class GetDevicesError extends DevicesState {
|
|
final String errorMsg;
|
|
|
|
GetDevicesError(this.errorMsg);
|
|
}
|
|
|
|
class DevicesCategoryChanged extends DevicesState {}
|
|
|
|
class CategorySwitchChanged extends DevicesState {}
|
|
|
|
class DeviceSwitchChanged extends DevicesState {}
|
|
|
|
class DeviceSelected extends DevicesState {}
|
|
|
|
// Device Control
|
|
class DeviceControlLoading extends DevicesState {
|
|
final String? code;
|
|
|
|
DeviceControlLoading({this.code});
|
|
}
|
|
|
|
class DeviceControlSuccess extends DevicesState {
|
|
final String? code;
|
|
|
|
DeviceControlSuccess({this.code});
|
|
}
|
|
|
|
class DeviceControlError extends DevicesState {
|
|
final String errorMsg;
|
|
|
|
DeviceControlError(this.errorMsg);
|
|
}
|
|
|
|
// Categories
|
|
class DevicesCategoriesLoading extends DevicesState {}
|
|
|
|
class DevicesCategoriesSuccess extends DevicesState {}
|
|
|
|
class DevicesCategoriesError extends DevicesState {
|
|
final String errorMsg;
|
|
|
|
DevicesCategoriesError(this.errorMsg);
|
|
}
|
|
|
|
// Curtains
|
|
class CurtainsIsOpening extends DevicesState {}
|
|
|
|
class CurtainsIsClosing extends DevicesState {}
|
|
|
|
class CurtainsStopped extends DevicesState {}
|