Files
flutterApp/lib/features/devices/presentation/bloc/device_status_event.dart
Songzex d5a83c1221 1.测试和修改了无人机在线实时信息的展示数据集的展示。使其能够全面展示。
2.添加了在无人机设备摄像头的为空时候,通过新增的接口获取无人机的摄像头的列表。
3.替换原先依照tcp推送消息绘制机器运动作业的轨迹过程,先用订阅mqtt特定话题推送的信息做动画过程的绘制。
2026-06-24 14:44:16 +08:00

45 lines
1.1 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// lib/features/devices/presentation/bloc/device_status_event.dart
import 'package:equatable/equatable.dart';
abstract class DeviceStatusEvent extends Equatable {
const DeviceStatusEvent();
}
// 改为接收 String(不是 RawPacket)
class DeviceStatusLoaded extends DeviceStatusEvent {
final String jsonString; // ← 关键:改为 String
DeviceStatusLoaded(this.jsonString);
@override
List<Object?> get props => [jsonString];
}
// 改为接收 Map(不是 RawPacket)
class PushMessageReceived extends DeviceStatusEvent {
final Map<String, dynamic> jsonData;
PushMessageReceived(this.jsonData);
@override
List<Object?> get props => [jsonData];
}
class DeviceStatusReset extends DeviceStatusEvent {
@override
List<Object?> get props => [];
}
class DeviceTaskArrivePointEvent extends DeviceStatusEvent {
final String deviceId;
final int? taskId;
final double? lat;
final double? lng;
const DeviceTaskArrivePointEvent({
required this.deviceId,
this.taskId,
this.lat,
this.lng,
});
@override
List<Object?> get props => [deviceId, taskId, lat, lng];
}