feat: 修复了插件需要外部Provider的问题;加上了一个简易的车控状态返回
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
import '../enums/vehicle_command_type.dart';
|
||||
|
||||
/// 车辆控制命令类
|
||||
class VehicleCommand {
|
||||
final VehicleCommandType type;
|
||||
final Map<String, dynamic>? params;
|
||||
final String error;
|
||||
late String commandId;
|
||||
|
||||
VehicleCommand({required this.type, this.params, this.error = ''});
|
||||
VehicleCommand({required this.type, this.params, this.error = ''}) {
|
||||
commandId = DateTime.now().millisecondsSinceEpoch.toString();
|
||||
}
|
||||
|
||||
// 从字符串创建命令(用于从API响应解析)
|
||||
factory VehicleCommand.fromString(
|
||||
|
||||
Reference in New Issue
Block a user