完成点 初始
This commit is contained in:
@@ -2,10 +2,11 @@ import 'package:equatable/equatable.dart';
|
||||
import 'package:maibu_satabot_v2/features/devices/domain/entities/device_entity.dart';
|
||||
|
||||
import '../../data/models/device_add_path_point_model.dart';
|
||||
|
||||
enum DeviceOperationType {
|
||||
none, // 无操作
|
||||
unbind, // 解绑设备
|
||||
updateName, // 修改设备名称
|
||||
none, // 无操作
|
||||
unbind, // 解绑设备
|
||||
updateName, // 修改设备名称
|
||||
}
|
||||
|
||||
enum AppState {
|
||||
@@ -13,8 +14,6 @@ enum AppState {
|
||||
routePlanning, //正在规划路径
|
||||
}
|
||||
|
||||
|
||||
|
||||
class DevicesState extends Equatable {
|
||||
final List<DeviceEntity> devices; // 名下所有设备列表
|
||||
final DeviceEntity? selectedDevice; // 当前主界面选中的/操作的设备
|
||||
@@ -31,9 +30,6 @@ class DevicesState extends Equatable {
|
||||
final double? arriLatitude;
|
||||
final double? arriLongitude;
|
||||
|
||||
|
||||
|
||||
|
||||
const DevicesState({
|
||||
this.devices = const [],
|
||||
this.selectedDevice,
|
||||
@@ -46,7 +42,9 @@ class DevicesState extends Equatable {
|
||||
this.pathData,
|
||||
this.generatedPath,
|
||||
this.appState = AppState.none,
|
||||
this.isFinshWork = false, this.arriLatitude, this.arriLongitude,
|
||||
this.isFinshWork = false,
|
||||
this.arriLatitude,
|
||||
this.arriLongitude,
|
||||
});
|
||||
|
||||
// 使用 copyWith 方便局部更新状态
|
||||
@@ -85,7 +83,10 @@ class DevicesState extends Equatable {
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [devices, selectedDevice, isLoading,
|
||||
List<Object?> get props => [
|
||||
devices,
|
||||
selectedDevice,
|
||||
isLoading,
|
||||
errorMessage,
|
||||
deviceLatitude,
|
||||
deviceLongitude,
|
||||
@@ -96,6 +97,6 @@ class DevicesState extends Equatable {
|
||||
appState,
|
||||
isFinshWork,
|
||||
arriLatitude,
|
||||
arriLongitude
|
||||
arriLongitude,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user