完成添加机器完成的经纬度点的记录的更新
完成机器达到点的添加存取方法
This commit is contained in:
@@ -407,4 +407,19 @@ class DevicesCubit extends Cubit<DevicesState> {
|
||||
void resetWorkStatus() {
|
||||
emit(state.copyWith(isFinshWork: false));
|
||||
}
|
||||
void setArrivedLocation(double latitude, double longitude) {
|
||||
emit(state.copyWith(arriLatitude: latitude, arriLongitude: longitude));
|
||||
print('✅ [DevicesCubit] 更新已到达位置:Lat=$latitude, Lng=$longitude');
|
||||
}
|
||||
|
||||
//获取已到达的点的经纬度
|
||||
(double, double) getArrivedLocation() {
|
||||
return (state.arriLatitude ?? 0.0, state.arriLongitude ?? 0.0);
|
||||
}
|
||||
|
||||
// 重置已到达记录
|
||||
void resetArrivedLocation() {
|
||||
emit(state.copyWith(arriLatitude: null, arriLongitude: null));
|
||||
print('🔄 [DevicesCubit] 已重置到达位置');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user