Files
feature-tenant/lib/features/devices/presentation/bloc/device_status_event.dart
Songzex 34b4c2bcbc 完成页面对接tcp推送的设备状态数据
完成页面测试解析tcp推送的设备状态数据的UI展示
2026-03-03 19:34:17 +08:00

25 lines
678 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];
}