mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-17 02:25:31 +00:00
push sos basic device implementation
This commit is contained in:
82
lib/pages/device_managment/sos/bloc/sos_device_state.dart
Normal file
82
lib/pages/device_managment/sos/bloc/sos_device_state.dart
Normal file
@ -0,0 +1,82 @@
|
||||
part of 'sos_device_bloc.dart';
|
||||
|
||||
sealed class SosDeviceState extends Equatable {
|
||||
const SosDeviceState();
|
||||
}
|
||||
|
||||
final class SosDeviceInitial extends SosDeviceState {
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
final class SosDeviceLoadingState extends SosDeviceState {
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
final class SosDeviceLoadedState extends SosDeviceState {
|
||||
final SosStatusModel sosStatusModel;
|
||||
|
||||
const SosDeviceLoadedState(this.sosStatusModel);
|
||||
|
||||
@override
|
||||
List<Object> get props => [sosStatusModel];
|
||||
}
|
||||
|
||||
final class SosDeviceErrorState extends SosDeviceState {
|
||||
final String message;
|
||||
|
||||
const SosDeviceErrorState(this.message);
|
||||
|
||||
@override
|
||||
List<Object> get props => [message];
|
||||
}
|
||||
|
||||
/// report state
|
||||
final class SosReportLoadingState extends SosDeviceState {
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
final class SosReportLoadedState extends SosDeviceState {
|
||||
final DeviceReport sosReport;
|
||||
|
||||
const SosReportLoadedState(this.sosReport);
|
||||
|
||||
@override
|
||||
List<Object> get props => [sosReport];
|
||||
}
|
||||
|
||||
final class SosReportErrorState extends SosDeviceState {
|
||||
final String message;
|
||||
|
||||
const SosReportErrorState(this.message);
|
||||
|
||||
@override
|
||||
List<Object> get props => [message];
|
||||
}
|
||||
|
||||
/// automation reports
|
||||
|
||||
final class SosAutomationReportLoadingState extends SosDeviceState {
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
final class SosAutomationReportLoadedState extends SosDeviceState {
|
||||
final DeviceReport automationReport;
|
||||
|
||||
const SosAutomationReportLoadedState(this.automationReport);
|
||||
|
||||
@override
|
||||
List<Object> get props => [automationReport];
|
||||
}
|
||||
|
||||
final class SosAutomationReportErrorState extends SosDeviceState {
|
||||
final String message;
|
||||
|
||||
const SosAutomationReportErrorState(this.message);
|
||||
|
||||
@override
|
||||
List<Object> get props => [message];
|
||||
}
|
Reference in New Issue
Block a user