|
@@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
|
import 'package:vitalapp/components/alert_dialog.dart';
|
|
|
+import 'package:vitalapp/pages/check/models/form.dart';
|
|
|
import 'package:vitalapp/pages/check/widgets/exam_configurable/exam_card.dart';
|
|
|
import 'package:vitalapp/pages/medical/models/item.dart';
|
|
|
import 'package:vnote_device_plugin/models/exams/nibp.dart';
|
|
@@ -164,9 +165,11 @@ class FollowBloodPressure extends StatefulWidget {
|
|
|
super.key,
|
|
|
required this.currentValue,
|
|
|
required this.bloodPressure,
|
|
|
+ required this.currentFormObject,
|
|
|
});
|
|
|
Map currentValue;
|
|
|
Function(Map) bloodPressure;
|
|
|
+ final FormObject currentFormObject;
|
|
|
@override
|
|
|
State<FollowBloodPressure> createState() => _FollowBloodPressureState();
|
|
|
}
|
|
@@ -226,6 +229,7 @@ class _FollowBloodPressureState extends State<FollowBloodPressure> {
|
|
|
title: '血压',
|
|
|
value: _buildResult(_nibpExamValue),
|
|
|
unit: 'mmHg',
|
|
|
+ required: widget.currentFormObject.required,
|
|
|
),
|
|
|
onTap: () async {
|
|
|
String? result = await VDialogBloodPressure(
|
|
@@ -290,11 +294,13 @@ class SideBar extends StatelessWidget {
|
|
|
final String title;
|
|
|
final Widget value;
|
|
|
final String unit;
|
|
|
+ final bool? required;
|
|
|
|
|
|
const SideBar({
|
|
|
required this.title,
|
|
|
required this.value,
|
|
|
required this.unit,
|
|
|
+ this.required,
|
|
|
});
|
|
|
|
|
|
@override
|
|
@@ -305,10 +311,22 @@ class SideBar extends StatelessWidget {
|
|
|
children: [
|
|
|
Container(
|
|
|
// padding: const EdgeInsets.symmetric(horizontal: 30),
|
|
|
- child: Text(
|
|
|
- title,
|
|
|
- style: const TextStyle(
|
|
|
- fontSize: 26,
|
|
|
+ child: RichText(
|
|
|
+ text: TextSpan(
|
|
|
+ text: title,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 26,
|
|
|
+ color: Colors.black,
|
|
|
+ fontFamily: "NotoSansSC",
|
|
|
+ fontFamilyFallback: const ["NotoSansSC"],
|
|
|
+ ),
|
|
|
+ children: [
|
|
|
+ if (required ?? false)
|
|
|
+ TextSpan(
|
|
|
+ text: "*",
|
|
|
+ style: const TextStyle(color: Colors.red, fontSize: 20),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
),
|
|
|
),
|