|
@@ -13,6 +13,7 @@ import 'package:plugin_platform/engine/image/image_preview.dart';
|
|
|
import 'package:plugin_platform/engine/toast/toast_engine.dart';
|
|
|
import 'package:shared/utils/date_time_utils.dart';
|
|
|
import 'package:shared/utils/log_utils.dart';
|
|
|
+import 'package:shared/utils/util.dart';
|
|
|
import 'package:widgets/ext/ex_widget.dart';
|
|
|
import 'package:cs_resources/constants/color_constants.dart';
|
|
|
import 'package:widgets/my_load_image.dart';
|
|
@@ -133,6 +134,7 @@ class _certificationDialogState extends State<certificationDialog> {
|
|
|
],
|
|
|
),
|
|
|
SizedBox.fromSize(size: Size(0, 10)),
|
|
|
+ // status
|
|
|
Row(
|
|
|
children: [
|
|
|
MyTextView(
|
|
@@ -146,13 +148,94 @@ class _certificationDialogState extends State<certificationDialog> {
|
|
|
widget.certificateItem.status.toString()??'-',
|
|
|
fontSize: 15,
|
|
|
isFontMedium: true,
|
|
|
- textColor: const Color(0xFF666666),
|
|
|
+ // textColor: const Color(0xFF666666),
|
|
|
+ textColor: _getStatusColor(widget.certificateItem.statusColor?? ''),
|
|
|
marginLeft: 20,
|
|
|
),
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
- SizedBox.fromSize(size: Size(0, 30)),
|
|
|
+ // 过期时间
|
|
|
+ Visibility(
|
|
|
+ visible: Utils.isNotEmpty(widget.certificateItem.expiryDate)?true:false,
|
|
|
+ child: Padding(
|
|
|
+ padding: const EdgeInsets.only(top: 10,),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ MyTextView(
|
|
|
+ "Expire Date".tr,
|
|
|
+ fontSize: 15,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: const Color(0xFF666666),
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ child: MyTextView(
|
|
|
+ widget.certificateItem.expiryDate?.toString()??'-',
|
|
|
+ fontSize: 15,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: const Color(0xFF666666),
|
|
|
+ marginLeft: 20,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ // 签发时间
|
|
|
+ Visibility(
|
|
|
+ visible: Utils.isNotEmpty(widget.certificateItem.issueDate)?true:false,
|
|
|
+ child: Padding(
|
|
|
+ padding: const EdgeInsets.only(top: 10),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ MyTextView(
|
|
|
+ "Issue Date".tr,
|
|
|
+ fontSize: 15,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: const Color(0xFF666666),
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ child: MyTextView(
|
|
|
+ widget.certificateItem.issueDate?.toString()??'-',
|
|
|
+ fontSize: 15,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: const Color(0xFF666666),
|
|
|
+ marginLeft: 20,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ // reject reason
|
|
|
+ Visibility(
|
|
|
+ // statusCode 2 是 approved statusCode 3 是 rejected
|
|
|
+ visible: widget.certificateItem.statusCode == 3 ? true: false,
|
|
|
+ child: Padding(
|
|
|
+ padding: const EdgeInsets.only(top: 10),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ SizedBox.fromSize(size: Size(0, 10)),
|
|
|
+ MyTextView(
|
|
|
+ "Reject Reason".tr,
|
|
|
+ fontSize: 15,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: const Color(0xFF666666),
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ child: MyTextView(
|
|
|
+ widget.certificateItem.rejectReason?.toString()??'-',
|
|
|
+ fontSize: 15,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: const Color(0xFF666666),
|
|
|
+ marginLeft: 20,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ SizedBox.fromSize(size: Size(0, 30))
|
|
|
],
|
|
|
),
|
|
|
],
|
|
@@ -173,6 +256,19 @@ class _certificationDialogState extends State<certificationDialog> {
|
|
|
).constrained(width: 285);
|
|
|
}
|
|
|
|
|
|
+ Color _getStatusColor(String statusColor) {
|
|
|
+ switch (statusColor) {
|
|
|
+ case 'springgreen':
|
|
|
+ return Color(0xFF0AC074);
|
|
|
+ case 'red':
|
|
|
+ return Color(0xFFFF6262);
|
|
|
+ case 'dodgerblue':
|
|
|
+ return Colors.blue;
|
|
|
+ default:
|
|
|
+ return Color(0xFFEA9F0D);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//取消弹框
|
|
|
void onCancel() async {
|
|
|
SmartDialog.dismiss();
|