更新快检功能必传mac参数
This commit is contained in:
@@ -1,3 +1,84 @@
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:get/get.dart';
|
||||
// import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
// import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
// import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
|
||||
// class CalibrationProgressWidget extends StatelessWidget {
|
||||
// final ValueNotifier<double> progressNotifier;
|
||||
// final ValueNotifier<bool> failureNotifier;
|
||||
|
||||
// const CalibrationProgressWidget({
|
||||
// Key? key,
|
||||
// required this.progressNotifier,
|
||||
// required this.failureNotifier,
|
||||
// }) : super(key: key);
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return ValueListenableBuilder<double>(
|
||||
// valueListenable: progressNotifier,
|
||||
// builder: (context, progress, _) {
|
||||
// return ValueListenableBuilder<bool>(
|
||||
// valueListenable: failureNotifier,
|
||||
// builder: (context, isFailure, __) {
|
||||
// return Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: <Widget>[
|
||||
// Text(
|
||||
// isFailure ? '失败'.tr : '${progress.toStringAsFixed(0)}%',
|
||||
// style: TextStyle(
|
||||
// fontSize: 26.rpx,
|
||||
// color: isFailure
|
||||
// ? Colors.red
|
||||
// : themeController.currentColor.sc3,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 40.rpx),
|
||||
// Stack(
|
||||
// children: [
|
||||
// Container(
|
||||
// width: double.infinity,
|
||||
// height: 21.rpx,
|
||||
// decoration: BoxDecoration(
|
||||
// color: stringToColor("#D9D9D9"),
|
||||
// borderRadius: BorderRadius.circular(
|
||||
// AppConstants().button_container_radius,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// width: progress / 100 *
|
||||
// MediaQuery.of(context).size.width *
|
||||
// 0.8,
|
||||
// height: 21.rpx,
|
||||
// decoration: BoxDecoration(
|
||||
// gradient: LinearGradient(
|
||||
// colors: isFailure
|
||||
// ? [themeController.currentColor.sc9]
|
||||
// : [
|
||||
// themeController.currentColor.sc2,
|
||||
// themeController.currentColor.sc2,
|
||||
// ],
|
||||
// begin: Alignment.centerLeft,
|
||||
// end: Alignment.centerRight,
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(
|
||||
// AppConstants().button_container_radius,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
@@ -37,6 +118,7 @@ class CalibrationProgressWidget extends StatelessWidget {
|
||||
SizedBox(height: 40.rpx),
|
||||
Stack(
|
||||
children: [
|
||||
// 背景进度条
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 21.rpx,
|
||||
@@ -47,26 +129,29 @@ class CalibrationProgressWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: progress / 100 *
|
||||
MediaQuery.of(context).size.width *
|
||||
0.8,
|
||||
height: 21.rpx,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: isFailure
|
||||
? [themeController.currentColor.sc9]
|
||||
: [
|
||||
themeController.currentColor.sc2,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConstants().button_container_radius,
|
||||
),
|
||||
),
|
||||
// 使用LayoutBuilder获取父容器宽度
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return Container(
|
||||
width: progress / 100 * constraints.maxWidth,
|
||||
height: 21.rpx,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: isFailure
|
||||
? [themeController.currentColor.sc9]
|
||||
: [
|
||||
themeController.currentColor.sc2,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConstants().button_container_radius,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -490,7 +490,8 @@ void showConfirmDialog(
|
||||
blurSigma: 3.0,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc5,
|
||||
// color: themeController.currentColor.sc5,
|
||||
color: themeController.currentColor.sc17,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(31.rpx, 0, 31.rpx, 0),
|
||||
|
||||
Reference in New Issue
Block a user