|
|
|
|
@ -33,8 +33,15 @@ class CustomResultProgressBar extends StatelessWidget {
|
|
|
|
|
final double percentage;
|
|
|
|
|
final String value;
|
|
|
|
|
final ResultTypes type;
|
|
|
|
|
final bool showAtRisk;
|
|
|
|
|
|
|
|
|
|
const CustomResultProgressBar({Key? key, required this.percentage, required this.value, required this.type}) : super(key: key);
|
|
|
|
|
const CustomResultProgressBar(
|
|
|
|
|
{Key? key,
|
|
|
|
|
required this.percentage,
|
|
|
|
|
required this.value,
|
|
|
|
|
required this.type,
|
|
|
|
|
this.showAtRisk = false})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -70,11 +77,15 @@ class CustomResultProgressBar extends StatelessWidget {
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: spacing,
|
|
|
|
|
),
|
|
|
|
|
// _buildResultBar(
|
|
|
|
|
// flex: 2,
|
|
|
|
|
// color: Color(0xFFEAB157),
|
|
|
|
|
// title: "High",
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
|
|
Visibility(
|
|
|
|
|
visible: showAtRisk,
|
|
|
|
|
child: _buildResultBar(
|
|
|
|
|
flex: 2,
|
|
|
|
|
color: Color(0xFFE82626),
|
|
|
|
|
title: "At Risk",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// width: spacing,
|
|
|
|
|
// ),
|
|
|
|
|
@ -92,7 +103,13 @@ class CustomResultProgressBar extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
TextCloud(
|
|
|
|
|
text: "${value}",
|
|
|
|
|
color: percentage == 4 ? Color(0xFFDE7676) : percentage == 40 ? Color(0xff84d368) : Color(0xFF14a45f),
|
|
|
|
|
color: percentage == 4
|
|
|
|
|
? Color(0xFFDE7676)
|
|
|
|
|
: percentage == 40
|
|
|
|
|
? Color(0xff84d368)
|
|
|
|
|
: percentage == 85
|
|
|
|
|
? Color(0xFFE82626)
|
|
|
|
|
: Color(0xFF14a45f),
|
|
|
|
|
// color: type == ResultTypes.criticalLow || type == ResultTypes.criticalHigh
|
|
|
|
|
// ? Color(0xFFDE7676)
|
|
|
|
|
// : type == ResultTypes.low || type == ResultTypes.high
|
|
|
|
|
@ -263,6 +280,7 @@ class ItemResultCardWidgetWithParamsVitalSign extends StatelessWidget {
|
|
|
|
|
final String buttonText;
|
|
|
|
|
final ResultTypes type;
|
|
|
|
|
final bool isArabic;
|
|
|
|
|
final bool showAtRisk;
|
|
|
|
|
final Function()? onButtonPressed;
|
|
|
|
|
|
|
|
|
|
const ItemResultCardWidgetWithParamsVitalSign({
|
|
|
|
|
@ -277,6 +295,7 @@ class ItemResultCardWidgetWithParamsVitalSign extends StatelessWidget {
|
|
|
|
|
required this.type,
|
|
|
|
|
this.onButtonPressed,
|
|
|
|
|
this.isArabic = false,
|
|
|
|
|
this.showAtRisk = false,
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -372,7 +391,7 @@ class ItemResultCardWidgetWithParamsVitalSign extends StatelessWidget {
|
|
|
|
|
percentage: percentage,
|
|
|
|
|
value: subTitle,
|
|
|
|
|
type: type,
|
|
|
|
|
),
|
|
|
|
|
showAtRisk: showAtRisk),
|
|
|
|
|
),
|
|
|
|
|
// const SizedBox(height: 12),
|
|
|
|
|
// Note Section
|
|
|
|
|
|