Files
flutterApp/lib/features/home/presentation/widgets/common/enum.dart

22 lines
640 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.

enum WorkMode {
bow(0, 'coverage'), // 作业模式:bow,值为0;后端 mode="coverage"(覆盖/区域)
custom(2, 'single_point'); // 作业模式:custom,值为2;后端 mode="single_point"(自定义/单点)
// 定义枚举的数值属性
final int value;
// 🔥 对齐 Web 端:workRecord.mode 字段(Web 注释"区域还是单点")
final String modeCode;
// 枚举构造函数(必须是const)
const WorkMode(this.value, this.modeCode);
}
enum RobotMode { point, robot }
enum AreaMode { work, obstacle }
enum WorkStatus {
idle, // 未开始
working, // 作业中
paused, // 暂停中
}