Files
flutterApp/lib/features/devices/presentation/bloc/device_status_event.dart
Songzex 83a5dc7f32 完成修复登录缓慢问题-主要接口响应时间决定
完成切换设备机器状态的实时接受和UI实时刷新
完成优化tcp重连的体检,手动切换设备或自动断开后重连的区分
2026-03-05 21:07:33 +08:00

29 lines
827 B
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
// TODO: implement props
List<Object?> get props => throw UnimplementedError();
}