车辆信息的部分

This commit is contained in:
2026-01-27 13:57:14 +08:00
parent 14e7fb3d78
commit 18c04272e2
4 changed files with 55 additions and 63 deletions

View File

@@ -535,6 +535,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
String leftHydrogen = "0";
num maxHydrogen = 0;
String difference = "";
var progressValue = 0.0;
//用来管理查看预约的弹窗
Worker? _sheetWorker;
@@ -675,6 +676,14 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
amountController.text = flooredDifference.toString();
}
if (maxHydrogen > 0) {
progressValue = leftHydrogenNum / maxHydrogen;
// 边界处理:确保值在 0 到 1 之间
if (progressValue > 1.0) progressValue = 1.0;
if (progressValue < 0.0) progressValue = 0.0;
}
updateUi();
} catch (e) {
} finally {