移除高频 print 日志
This commit is contained in:
parent
c7afafc3aa
commit
2ac88000cc
|
|
@ -133,7 +133,7 @@ Widget $questionNumberScrollView({
|
|||
|
||||
// var actualImgHeight = useImageInfo.value?.actualImgHeight ?? 0; // 实际图片高度
|
||||
|
||||
print("图片高度:${usePiddingTop.value}");
|
||||
// 移除高频日志,避免在滚动/缩放时造成不必要的 I/O 开销
|
||||
|
||||
return SingleChildScrollView(
|
||||
controller: scrollControllerNum,
|
||||
|
|
@ -183,7 +183,6 @@ Widget $scoringQuestionsView(
|
|||
useEffect(() {
|
||||
/// 学生打分数据
|
||||
studentScoreListener() {
|
||||
print(item.toJson());
|
||||
item.studentScore = studentScore.value;
|
||||
try {
|
||||
var theVal = sateData.studentQuestions.value?.firstWhere((e) => e.questionNo == item.questionNo);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin, EventBus
|
|||
state.studentQuestions.value = data.studentQuestions; // 赋值试题集合
|
||||
state.data.value = data;
|
||||
} catch (e) {
|
||||
print('获取数据报错了:$e');
|
||||
// 移除冗余打印,使用提示替代
|
||||
state.getDataError.value = true;
|
||||
ToastUtils.showError('获取试题数据失败,请检查网络连接后重试');
|
||||
} finally {
|
||||
|
|
@ -247,8 +247,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin, EventBus
|
|||
|
||||
return imgKey;
|
||||
} catch (e) {
|
||||
print('图片上传失败');
|
||||
print(e.toString());
|
||||
// 图片上传失败日志移除,统一提示
|
||||
ToastUtils.getFluttertoast(msg: '图片上传失败', context: context);
|
||||
} finally {
|
||||
// ToastUtils.dismiss();
|
||||
|
|
@ -331,7 +330,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin, EventBus
|
|||
ToastUtils.showSuccess("批阅已提交");
|
||||
});
|
||||
} catch (e) {
|
||||
print("批阅提交报错 $e");
|
||||
// 提交异常日志移除,统一提示
|
||||
ToastUtils.showError('提交失败,请检查网络连接后重试');
|
||||
} finally {
|
||||
state.submitLoading.value = false;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ class ZoomLogic extends GetxController {
|
|||
WidgetsBinding.instance.addPostFrameCallback((e) {
|
||||
/// 试题加载后更新尺寸对象(只要题号没有变就不更新尺寸对象)
|
||||
_streamHomework = homeworkReviewLogic.state.data.listen((e) {
|
||||
print("HOMEWORKSTATE 变化了");
|
||||
var zoomFile = zoomState.zoomFile.value;
|
||||
if (e == null || zoomFile == null) return;
|
||||
|
||||
|
|
@ -83,7 +82,7 @@ class ZoomLogic extends GetxController {
|
|||
|
||||
oldTemplateId = templateId;
|
||||
final fileSize = imageSizeMap[templateId];
|
||||
print("fileSize: ${fileSize?.toJson()}");
|
||||
// 移除冗余日志,避免频繁 I/O
|
||||
if (fileSize != null) {
|
||||
zoomState.zoomFile.value = fileSize;
|
||||
return;
|
||||
|
|
@ -113,8 +112,6 @@ class ZoomLogic extends GetxController {
|
|||
|
||||
// 缩放组件 ==> 缩放监听
|
||||
void onScaleUpdate(double zoom) async {
|
||||
print("缩放比例:$zoom");
|
||||
|
||||
/// 防抖
|
||||
zoomState.initScale.value = zoom;
|
||||
// anti_shake_throttling.debounce(() => zoomState.initScale.value = zoom, const Duration(milliseconds: 100))();
|
||||
|
|
@ -124,8 +121,6 @@ class ZoomLogic extends GetxController {
|
|||
void onPanUpPosition(Offset val) async {
|
||||
// 手指在移动 非物体移动的位置
|
||||
var state = homeworkReviewLogic.state;
|
||||
print('**************** 正在移动位置 YYY:${val.dy}');
|
||||
print('**************** 正在移动位置 XXX:${val.dx}');
|
||||
state.zoomOffset = val;
|
||||
state.slide.value = val.dy.abs().toInt().toDouble();
|
||||
}
|
||||
|
|
@ -138,18 +133,6 @@ class ZoomLogic extends GetxController {
|
|||
// 重置位置偏移
|
||||
homeworkReviewLogic.state.zoomOffset = Offset.zero;
|
||||
homeworkReviewLogic.state.slide.value = 0.0;
|
||||
|
||||
// final zoomFile = zoomState.zoomFile.value;
|
||||
// final double imageOffsetY = (zoomFile?.imageHeightOffsetStart ?? 0).toDouble();
|
||||
// final controller = homeworkReviewLogic.zoomController;
|
||||
// if (controller != null) {
|
||||
// // 以单位矩阵为基,设置垂直平移到居中位置
|
||||
// final Matrix4 centered = Matrix4.identity()..setTranslationRaw(0, imageOffsetY > 0 ? imageOffsetY : 0, 0);
|
||||
|
||||
// controller.value = centered;
|
||||
// }
|
||||
|
||||
print('缩放已重置');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue