lab result detail flow chart screen & improvement.

merge-requests/390/head
Sikander Saleem 3 years ago
parent 6ee56cba0d
commit b3fd1cb93d

@ -945,6 +945,7 @@ const Map localizedValues = {
"insur-cards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"},
'labResult': {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"},
'details': {'en': 'Details', 'ar': 'التفاصيل'},
'graph-details': {'en': 'Graph Details', 'ar': 'التفاصيل الرسم البياني'},
"age": {"en": "Age", "ar": "العمر"},
"active-insurence": {"en": "Active", "ar": "نشطة"},
"not-active": {"en": "Not Active", "ar": "غير نشط"},

@ -1416,6 +1416,8 @@ class TranslationBase {
String get details => localizedValues['details'][locale.languageCode];
String get graphDetails => localizedValues['graph-details'][locale.languageCode];
String get age => localizedValues['age'][locale.languageCode];
String get activeInsurence => localizedValues['active-insurence'][locale.languageCode];

@ -20,7 +20,7 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
@ -813,6 +813,48 @@ class Utils {
);
});
}
static Widget tableColumnTitle(String text) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 6),
Text(
text,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 6),
Divider(
height: 1,
color: Color(0xff2E303A),
thickness: 1,
)
],
);
}
static Widget tableColumnValue(String text, {bool isLast = false}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
text.toLowerCase().capitalizeFirstofEach,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
Divider(
height: 1,
color: Color(0xffEFEFEF),
thickness: 1,
)
],
);
}
}
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {

@ -1,10 +1,14 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'LineChartCurved.dart';
import 'lab_result_chart_and_detials.dart';
class FlowChartPage extends StatelessWidget {
@ -16,28 +20,58 @@ class FlowChartPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabOrdersResults(
patientLabOrder: patientLabOrder, procedure: filterName),
onModelReady: (model) => model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: filterName),
builder: (context, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: filterName,
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),
body: SingleChildScrollView(
child: model. labOrdersResultsList.isNotEmpty
? Container(
child: LabResultChartAndDetails(
name: filterName,
labResult: model.labOrdersResultsList,
),
child: model.labOrdersResultsList.isNotEmpty
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
margin: EdgeInsets.only(left: 21, right: 21, top: 21),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
child: LineChartCurved(
title: filterName,
labResult: model.labOrdersResultsList,
),
),
LabResultChartAndDetails(
name: filterName,
labResult: model.labOrdersResultsList,
),
],
)
: Center(
child: Container(
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height *0.42),
child: Container(
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.42),
child: Center(
child: Texts('No Data'),
),
),
),
),
),
),
);

@ -2,11 +2,12 @@ import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import '../../text.dart';
import 'FlowChartPage.dart';
@ -28,12 +29,13 @@ class LabResultWidget extends StatelessWidget {
children: <Widget>[
SizedBox(height: 8),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
filterName,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.56, height: 21 / 14),
),SizedBox(width: 16),
),
SizedBox(width: 16),
InkWell(
onTap: () {
Navigator.push(
@ -71,9 +73,9 @@ class LabResultWidget extends StatelessWidget {
tableRow.add(
TableRow(
children: [
_tableColumnTitle(TranslationBase.of(context).description),
_tableColumnTitle(TranslationBase.of(context).value),
_tableColumnTitle(TranslationBase.of(context).range),
Utils.tableColumnTitle(TranslationBase.of(context).description),
Utils.tableColumnTitle(TranslationBase.of(context).value),
Utils.tableColumnTitle(TranslationBase.of(context).range),
],
),
);
@ -82,53 +84,12 @@ class LabResultWidget extends StatelessWidget {
tableRow.add(
TableRow(
children: [
_tableColumnValue(labResultList[i].description, isLast: i == (labResultList.length - 1)),
_tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: i == (labResultList.length - 1)),
_tableColumnValue(labResultList[i].referanceRange, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].description, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: i == (labResultList.length - 1)),
],
),
);
return tableRow;
}
Widget _tableColumnTitle(String text) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 6),
Text(
text,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 6),
Divider(
height: 1,
color: Color(0xff2E303A),
thickness: 1,
)
],
);
}
Widget _tableColumnValue(String text, {bool isLast = false}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
text.toLowerCase().capitalizeFirstofEach,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
Divider(
height: 1,
color: Color(0xffEFEFEF),
thickness: 1,
)
],
);
}
}

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -24,96 +25,35 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1),
),
margin: EdgeInsets.all(20),
child: Container(
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(projectViewModel),
),
],
),
),
return Table(
columnWidths: {
0: FlexColumnWidth(2),
1: FlexColumnWidth(1),
},
children: fullData(widget.labResult, context),
);
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> fullData(List<LabOrderResult> labOrderResultList, context) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).date,
color: Colors.white,
),
),
height: 60,
),
tableRow.add(
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).date),
Utils.tableColumnTitle(TranslationBase.of(context).labResults),
],
),
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
),
),
child: Center(
child: Texts(TranslationBase.of(context).labResult, color: Colors.white),
),
height: 60),
)
]));
widget.labResult.forEach((vital) {
var date =DateUtil.convertStringToDate(vital.verifiedOnDateTime);
tableRow.add(TableRow(children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${projectViewModel.isArabic? DateUtil.getWeekDayArabic(date.weekday): DateUtil.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtil.getMonthArabic(date.month) : DateUtil.getMonth(date.month)} ${date.year}',
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${vital.resultValue}',
textAlign: TextAlign.center,
),
),
),
);
for (int i = 0; i < labOrderResultList.length; i++)
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(DateUtil.formatDateToDate(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime)), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(labOrderResultList[i].resultValue, isLast: i == (labOrderResultList.length - 1)),
],
),
]));
});
);
return tableRow;
}
}

@ -38,46 +38,34 @@ class LineChartCurvedState extends State<LineChartCurved> {
@override
Widget build(BuildContext context) {
return AspectRatio(
aspectRatio: 1.23,
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Stack(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 4,
),
Text(
widget.title,
style: TextStyle(
color: Colors.black,
fontSize: 32,
fontWeight: FontWeight.bold,
letterSpacing: 2),
textAlign: TextAlign.center,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 16.0, left: 6.0),
child: LineChart(
sampleData1(),
swapAnimationDuration: const Duration(milliseconds: 250),
),
return Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Stack(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
widget.title,
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
SizedBox(height: 16),
AspectRatio(
aspectRatio: 333 / 288,
child: Padding(
padding: EdgeInsets.only(right: 16.0, left: 6.0),
child: LineChart(
sampleData1(),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
const SizedBox(
height: 10,
),
],
),
],
),
),
],
),
],
),
);
}
@ -91,17 +79,13 @@ class LineChartCurvedState extends State<LineChartCurved> {
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(
show: true, drawVerticalLine: true, drawHorizontalLine: true),
gridData: FlGridData(show: true, drawVerticalLine: false, drawHorizontalLine: true),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontSize: 12,
),
margin: 22,
rotateAngle:-65,
getTextStyles: (value) => TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: 0, height: 18 / 12),
margin: 8,
rotateAngle: -0,
getTitles: (value) {
print(value);
DateTime date = DateUtil.convertStringToDate(widget.labResult[value.toInt()].verifiedOnDateTime);
@ -111,27 +95,20 @@ class LineChartCurvedState extends State<LineChartCurved> {
} else
return '';
} else {
if (value.toInt() == 0)
return '${date.day}/ ${date.year}';
if (value.toInt() == widget.labResult.length - 1)
return '${date.day}/ ${date.year}';
if (value.toInt() == 0) return '${date.day}/ ${date.year}';
if (value.toInt() == widget.labResult.length - 1) return '${date.day}/ ${date.year}';
if (xAxixs.contains(value.toInt())) {
return '${date.day}/ ${date.year}';
}
}
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
getTextStyles: (value) => TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: 0, height: 18 / 12),
getTitles: (value) {
return '${value.toInt()}';
},
@ -140,22 +117,22 @@ class LineChartCurvedState extends State<LineChartCurved> {
),
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom: BorderSide(
color: Colors.black,
width: 0.5,
),
left: BorderSide(
color: Colors.black,
),
right: BorderSide(
color: Colors.black,
),
top: BorderSide(
color: Colors.transparent,
),
),
show: false,
// border: const Border(
// bottom: BorderSide(
// color: Colors.black,
// width: 0.5,
// ),
// // left: BorderSide(
// // color: Colors.black,
// // ),
// // right: BorderSide(
// // color: Colors.black,
// // ),
// top: BorderSide(
// color: Colors.transparent,
// ),
// ),
),
minX: 0,
maxX: (widget.labResult.length - 1).toDouble(),
@ -168,10 +145,10 @@ class LineChartCurvedState extends State<LineChartCurved> {
double getMaxY() {
double max = 0;
widget.labResult.forEach((element) {
try{
double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble > max) max = resultValueDouble;}
catch(e){
try {
double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble > max) max = resultValueDouble;
} catch (e) {
print(e);
}
});
@ -181,13 +158,14 @@ class LineChartCurvedState extends State<LineChartCurved> {
double getMinY() {
double min = 0;
try{
min = double.parse(widget.labResult[0].resultValue);
widget.labResult.forEach((element) {
double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble < min) min = resultValueDouble;
});}catch(e){
try {
min = double.parse(widget.labResult[0].resultValue);
widget.labResult.forEach((element) {
double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble < min) min = resultValueDouble;
});
} catch (e) {
print(e);
}
int value = min.toInt();
@ -198,21 +176,22 @@ class LineChartCurvedState extends State<LineChartCurved> {
List<LineChartBarData> getData() {
List<FlSpot> spots = List();
for (int index = 0; index < widget.labResult.length; index++) {
try{
var resultValueDouble = double.parse(widget.labResult[index].resultValue);
spots.add(FlSpot(index.toDouble(), resultValueDouble));
}catch(e){
try {
var resultValueDouble = double.parse(widget.labResult[index].resultValue);
print("$index:$resultValueDouble");
spots.add(FlSpot(index.toDouble(), resultValueDouble));
} catch (e) {
print(e);
spots.add(FlSpot(index.toDouble(), 0.0));
}
}
final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots,
isCurved: true,
colors: [Theme.of(context).primaryColor],
barWidth: 5,
//preventCurveOverShooting : true,
colors: [Color(0xffD02127)],
barWidth: 1.5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:flutter/material.dart';
@ -20,23 +21,98 @@ class LabResultChartAndDetails extends StatelessWidget {
final List<LabOrderResult> labResult;
final String name;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
AppExpandableNotifier(
headerWidget: Padding(
padding: const EdgeInsets.all(8.0),
child: LineChartCurved(title: name,labResult:labResult,),
return Container(
padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
margin: EdgeInsets.only(left: 21, right: 21, top: 12),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
bodyWidget: LabResultDetailsWidget(
labResult: labResult.reversed.toList(),
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: Text(
TranslationBase.of(context).graphDetails,
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
],
),
isExpand: true,
),
],
SizedBox(height: 8),
LabResultDetailsWidget(
labResult: labResult.reversed.toList(),
)
],
),
);
// todo old was expandable, but new is not expandable
// Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Row(
// mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[
// Expanded(
// child: Text(
// TranslationBase.of(context).generalResult,
// style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
// ),
// ),
// ],
// ),
// LabResultDetailsWidget(
// labResult: labResult.reversed.toList(),
// ),
// AppExpandableNotifier(
// // headerWidget: Container(
// // padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
// // margin: EdgeInsets.only(left: 21, right: 21, top: 21),
// // decoration: BoxDecoration(
// // shape: BoxShape.rectangle,
// // color: Colors.white,
// // borderRadius: BorderRadius.all(
// // Radius.circular(10.0),
// // ),
// // boxShadow: [
// // BoxShadow(
// // color: Color(0xff000000).withOpacity(.05),
// // //spreadRadius: 5,
// // blurRadius: 27,
// // offset: Offset(0, -3),
// // ),
// // ],
// // ),
// // child: LineChartCurved(
// // title: name,
// // labResult: labResult
// // ),
// // ),
// title: TranslationBase.of(context).delete,
// bodyWidget: LabResultDetailsWidget(
// labResult: labResult.reversed.toList(),
// ),
// isExpand: true,
// ),
// ],
// );
}
}

@ -53,7 +53,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
DoctorHeader(
headerModel: new HeaderModel(
headerModel: HeaderModel(
widget.patientLabOrder.doctorName,
widget.patientLabOrder.doctorImageURL,
widget.patientLabOrder.speciality,
@ -105,14 +105,9 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: Row(
children: [
Text(
TranslationBase.of(context).generalResult,
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
// todo 'sikander' discuss about chart flow chart
],
child: Text(
TranslationBase.of(context).generalResult,
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Icon(

@ -20,6 +20,8 @@ class DoctorHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
String _speciality = (headerModel?.speciality ?? []).length > 0 ? headerModel.speciality.first : "";
return Container(
color: Colors.white,
child: Column(
@ -44,7 +46,7 @@ class DoctorHeader extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
(headerModel?.speciality?.toString()?.toLowerCase()?.capitalizeFirstofEach ?? ""),
_speciality,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
myRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo),
@ -64,10 +66,10 @@ class DoctorHeader extends StatelessWidget {
DateUtil.formatDateToTime(headerModel.orderDate),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16),
),
// Padding(
// padding: const EdgeInsets.only(top: 8.0),
// child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16),
// ),
],
)
],
@ -109,7 +111,6 @@ class DoctorHeader extends StatelessWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
// todo: 'change icon for send email'
SvgPicture.asset('assets/images/new/email.svg', width: 19.0),
SizedBox(width: 6),
Text(

@ -65,38 +65,42 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
),
header: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 12, left: 21, right: 21),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (_title.isNotEmpty)
Text(
_title,
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 23 / 12),
),
Text(
_subTitle,
maxLines: 1,
style: TextStyle(fontSize: 24, fontFamily: "Poppins", fontWeight: FontWeight.w700, color: Color(0xff2E303A), letterSpacing: -1.44, height: 25 / 24),
child: InkWell(
onTap: (){
setState(() {
widget.expandFlag = !widget.expandFlag;
widget.controller.expanded = widget.expandFlag;
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (_title.isNotEmpty)
Text(
_title,
style: TextStyle(fontSize: 12, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 23 / 12),
),
Text(
_subTitle,
maxLines: 1,
style: TextStyle(fontSize: 24, fontFamily: "Poppins", fontWeight: FontWeight.w700, color: Color(0xff2E303A), letterSpacing: -1.44, height: 25 / 24),
),
],
),
],
),
),
IconButton(
icon: Icon(
widget.expandFlag ?Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
),
Icon(
widget.expandFlag ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
color: Color(0xff2E303A),
// size: 30.0,
),
onPressed: () {
setState(() {
widget.expandFlag = !widget.expandFlag;
widget.controller.expanded = widget.expandFlag;
});
}),
]),
],
),
),
),
collapsed: widget.collapsed ?? Container(),
expanded: widget.bodyWidget,

Loading…
Cancel
Save