WD: lab report changes along with the cross added to the FlowChartPage.dart

merge-update-with-lab-changes
taha.alam 12 months ago
parent 636a67b720
commit eafb7f5f7b

@ -119,6 +119,7 @@ class LabResult {
ResultFlag? calculatedResultFlag;
dynamic verifiedOnDateTime;
num? percentage;
num? width;
LabResult(
{this.description,

@ -73,7 +73,9 @@ class LabsService extends BaseService {
patientLabSpecialResult.clear();
labResultList.clear();
response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab));
labResultList.add(
LabResult.fromJson(lab),
);
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -126,24 +126,24 @@ class LabsViewModel extends BaseViewModel {
final division = 0.2;
switch (flag) {
case ResultFlag.N: //4
percentage = division * 2;
percentage = division * 1.75;
break;
case ResultFlag.H: //5
percentage = division * 3.2;
percentage = division * 2.8;
break;
case ResultFlag.L: //3
percentage = division * .9;
percentage = division * .7;
break;
case ResultFlag.CL: //2
case ResultFlag.LCL: //
percentage = division * .3;
percentage = division * .07;
break;
case ResultFlag.HCH: //7
case ResultFlag.CH: //6
percentage = division * 3.8;
percentage = division * 3.4;
break;
case ResultFlag.IRR:
percentage = 0;

@ -54,7 +54,22 @@ class FlowChartPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
Padding(
padding: const EdgeInsets.only(
top: 16.0, right: 16.0, bottom: 10),
child: GestureDetector(
onTap: () => Navigator.pop(context),
child: Align(
alignment: Alignment.centerRight,
child: Icon(
Icons.close,
color: Colors.black,
size: 28,
),
),
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 17, top: 12, right: 13, bottom: 12),

@ -86,7 +86,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).criticalLow,
),
SizedBox(
width: 4,
width: 2,
),
_buildResultBar(
key: l,
@ -95,7 +95,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).low,
),
SizedBox(
width: 4,
width: 2,
),
_buildResultBar(
key: n,
@ -104,7 +104,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).normal,
),
SizedBox(
width: 4,
width: 2,
),
_buildResultBar(
key: h,
@ -113,7 +113,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).high,
),
SizedBox(
width: 4,
width: 2,
),
_buildResultBar(
key: ch,
@ -132,7 +132,7 @@ class CustomResultProgressBar extends StatelessWidget {
TextCloud(
text: "${value}",
color: getColorForResultType(type),
width: 60,
width: 100,
height: 20,
padding: EdgeInsets.zero,
axisDirection: AxisDirection.up,
@ -176,11 +176,11 @@ class CustomResultProgressBar extends StatelessWidget {
Text(
title,
style: TextStyle(
fontSize: 10,
fontSize: 8,
fontFamily: 'Poppins',
letterSpacing: -0.24,
letterSpacing: -0.3,
color: color,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w400,
),
textAlign: TextAlign.center,
),
@ -234,8 +234,7 @@ class TextCloud extends StatelessWidget {
child: Center(
child: Text(
text,
style: TextStyle(
color: Colors.white, fontSize: 10, letterSpacing: -.24),
style: TextStyle(color: Colors.white, fontSize: 9, letterSpacing: -.3),
)),
),
Builder(builder: (context) {

Loading…
Cancel
Save