solve lab results design issue

merge-requests/832/head
mosazaid 4 years ago
parent ca3dddd581
commit 6ca3baf7cb

@ -323,7 +323,11 @@ class _DischargedPatientState extends State<DischargedPatient> {
), ),
], ],
), ),
) ),
Icon(
Icons.arrow_forward,
size: 24,
),
], ],
) )
], ],

@ -121,43 +121,6 @@ class LabResultWidget extends StatelessWidget {
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -191,20 +154,67 @@ class LabResultWidget extends StatelessWidget {
), ),
), ),
Expanded( Expanded(
child: Container( child: Column(
padding: EdgeInsets.all(10), children: [
color: Colors.white, Container(
child: Center( padding: EdgeInsets.all(10),
child: AppText( color: Colors.white,
patientLabResultList[index].referanceRange, child: Center(
textAlign: TextAlign.center, child: AppText(
isCopyable: true, patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
isCopyable: true,
),
),
), ),
), SizedBox(
height: 12,
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
)
],
), ),
), ),
], ],
), ),
// SizedBox(
// height: 12,
// ),
Divider(), Divider(),
], ],
)) ))

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrde
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -136,37 +137,44 @@ class _LabsHomePageState extends State<LabsHomePage> {
Radius.circular(8.0), Radius.circular(8.0),
), ),
color: Colors.white), color: Colors.white),
child: Row( child: Stack(
children: [ children: [
Container( Positioned(
width: 20, bottom: 1,
height: 160, top: 1,
decoration: BoxDecoration( left: 1,
color: model.patientLabOrdersList[index].isLiveCareAppointment child: Container(
? Colors.red[900] width: 20,
: !model.patientLabOrdersList[index].isInOutPatient decoration: BoxDecoration(
? Colors.black color: model.patientLabOrdersList[index].isLiveCareAppointment
: Color(0xffa9a089), ? Colors.red[900]
borderRadius: BorderRadius.only( : !model.patientLabOrdersList[index].isInOutPatient
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), ? Colors.black
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), : Color(0xffa9a089),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0), borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)), topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
), ),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
), ),
Expanded( Container(
color: Colors.white,
padding: EdgeInsets.all(0),
margin: EdgeInsets.only(left: 20),
child: DoctorCard( child: DoctorCard(
isNoMargin: true, isNoMargin: true,
onTap: () => Navigator.push( onTap: () => Navigator.push(

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -26,7 +25,7 @@ class CardWithBgWidget extends StatelessWidget {
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all( border: Border.all(
color: hasBorder ? HexColor('#707070') : Colors.transparent, color: hasBorder ? Color(0xFF707070) : Colors.transparent,
width: hasBorder ? 0.30 : 0), width: hasBorder ? 0.30 : 0),
), ),
child: Material( child: Material(
@ -37,8 +36,7 @@ class CardWithBgWidget extends StatelessWidget {
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'), color: bgColor ?? Color(0xFF58434F),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10), topRight: Radius.circular(10),
bottomRight: Radius.circular(10),),), bottomRight: Radius.circular(10),),),
@ -52,8 +50,7 @@ class CardWithBgWidget extends StatelessWidget {
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'), color: bgColor ?? Color(0xFF58434F),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10), topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),),), bottomLeft: Radius.circular(10),),),

@ -157,6 +157,7 @@ class DoctorCard extends StatelessWidget {
), ),
if (branch != null) if (branch != null)
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).branch + TranslationBase.of(context).branch +
@ -164,9 +165,11 @@ class DoctorCard extends StatelessWidget {
fontSize: 14, fontSize: 14,
color: Colors.grey[500], color: Colors.grey[500],
), ),
AppText( Expanded(
branch, child: AppText(
fontSize: 14, branch,
fontSize: 14,
),
) )
], ],
) )

@ -692,7 +692,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.4" version: "1.3.0-nullsafety.3"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -1026,7 +1026,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.2" version: "1.10.0-nullsafety.1"
sticky_headers: sticky_headers:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1231,5 +1231,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.2 <=2.11.0-213.1.beta" dart: ">=2.10.2 <2.11.0"
flutter: ">=1.22.2 <2.0.0" flutter: ">=1.22.2 <2.0.0"

Loading…
Cancel
Save