Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patient_app_services

merge-requests/457/head
Mohammad Aljammal 4 years ago
commit 3449567086

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_head
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -80,27 +81,27 @@ class RadiologyDetailsPage extends StatelessWidget {
SizedBox( SizedBox(
height: 100, height: 100,
), ),
], ],
), ),
), ),
], ],
), ),
), ),
bottomSheet: model.radImageURL.isNotEmpty ?Container( bottomSheet: model.radImageURL.isNotEmpty
? Container(
width: double.maxFinite, width: double.maxFinite,
height: 100,
child: Container( child: Container(
margin: EdgeInsets.only(left: 35,right: 35,top: 12,bottom: 12), margin:
child: Button( EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12),
color: Colors.red, child: AppButton(
onTap: () { onPressed: () {
launch(model.radImageURL); launch(model.radImageURL);
}, },
title: TranslationBase.of(context).openRad, title: TranslationBase.of(context).openRad,
), ),
), ),
):null, )
: null,
), ),
); );
} }

@ -58,13 +58,13 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
@ -73,8 +73,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(selectedStepId: index, stepId: 0,), StatusLabel(
selectedStepId: index,
stepId: 0,
),
], ],
), ),
], ],
@ -83,10 +85,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
left: MediaQuery left: MediaQuery.of(context).size.width * 0.28,
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 1 ? changeCurrentTab(1) : null, onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column( child: Column(
@ -110,9 +109,11 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -125,9 +126,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(
StatusLabel(selectedStepId: index, stepId: 1,), selectedStepId: index,
stepId: 1,
),
], ],
), ),
], ],
@ -136,14 +138,10 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
left: MediaQuery left: MediaQuery.of(context).size.width * 0.52,
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (index >= 3) if (index >= 3) changeCurrentTab(2);
changeCurrentTab(2);
}, },
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -162,13 +160,15 @@ class StepsWidget extends StatelessWidget {
color: index == 2 color: index == 2
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 2 : index > 2
? Color(0xFFCC9B14) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -181,7 +181,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(selectedStepId: index, stepId: 2,), StatusLabel(
selectedStepId: index,
stepId: 2,
),
], ],
), ),
], ],
@ -214,9 +217,11 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -231,7 +236,10 @@ class StepsWidget extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(selectedStepId: index, stepId: 3,), StatusLabel(
selectedStepId: index,
stepId: 3,
),
], ],
), ),
), ),
@ -245,10 +253,7 @@ class StepsWidget extends StatelessWidget {
children: [ children: [
Container( Container(
height: height == 0 ? 150 : height, height: height == 0 ? 150 : height,
width: MediaQuery width: MediaQuery.of(context).size.width,
.of(context)
.size
.width,
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: Divider( child: Divider(
@ -284,13 +289,13 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
AppText( AppText(
"شخصي", "شخصي",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -302,10 +307,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
right: MediaQuery right: MediaQuery.of(context).size.width * 0.28,
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Column( child: Column(
@ -329,13 +331,13 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
AppText( AppText(
"هدف", "هدف",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -347,10 +349,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
right: MediaQuery right: MediaQuery.of(context).size.width * 0.52,
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(2) : null, onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column( child: Column(
@ -374,15 +373,16 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Padding( Padding(
padding: const EdgeInsets.only(right: 2), padding: const EdgeInsets.only(right: 2),
child: AppText( child: AppText(
"تقدير", "تقدير",
@ -420,9 +420,11 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -446,7 +448,9 @@ class StepsWidget extends StatelessWidget {
class StatusLabel extends StatelessWidget { class StatusLabel extends StatelessWidget {
const StatusLabel({ const StatusLabel({
Key key, this.stepId, this.selectedStepId, Key key,
this.stepId,
this.selectedStepId,
}) : super(key: key); }) : super(key: key);
final int stepId; final int stepId;
@ -458,24 +462,30 @@ class StatusLabel extends StatelessWidget {
width: 65, width: 65,
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3), padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
decoration: BoxDecoration( decoration: BoxDecoration(
color: stepId == selectedStepId ? Color(0xFFF1E9D3) : stepId < color: stepId == selectedStepId
selectedStepId ? Color(0xFFD8E8DB) : Color(0xFFCCCCCC), ? Color(0xFFF1E9D3)
: stepId < selectedStepId
? Color(0xFFD8E8DB)
: Color(0xFFCCCCCC),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5.0), Radius.circular(5.0),
), ),
border: Border.all( border: Border.all(color: HexColor('#707070'), width: 0.30),
color: HexColor('#707070'),
width: 0.30),
), ),
child: AppText( child: AppText(
stepId == selectedStepId ? "inProgress" : stepId < selectedStepId stepId == selectedStepId
? "inProgress"
: stepId < selectedStepId
? "Completed" ? "Completed"
: " Locked ", : " Locked ",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: 10, fontSize: 10,
color: stepId == selectedStepId ? Color(0xFFCC9B14) : stepId < color: stepId == selectedStepId
selectedStepId ? Color(0xFF359846) : Color(0xFF969696), ? Color(0xFFCC9B14)
: stepId < selectedStepId
? Color(0xFF359846)
: Color(0xFF969696),
), ),
); );
} }

@ -134,8 +134,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: border: Border.all(color: Colors.grey[200], width: 0.5),
Border.all(color: Colors.grey[200], width: 0.5),
), ),
child: HeaderBodyExpandableNotifier( child: HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
@ -145,14 +144,10 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Row( child: Row(
children: [ children: [
Texts( Texts(TranslationBase.of(context).assessment,
TranslationBase.of(context) variant:
.assessment, isAssessmentExpand ? "bodyText" : '',
variant: isAssessmentExpand bold: isAssessmentExpand ? true : false,
? "bodyText"
: '',
bold:
isAssessmentExpand ? true : false,
color: Colors.black), color: Colors.black),
Icon( Icon(
FontAwesomeIcons.asterisk, FontAwesomeIcons.asterisk,
@ -165,8 +160,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isAssessmentExpand = isAssessmentExpand = !isAssessmentExpand;
!isAssessmentExpand;
}); });
}, },
child: Icon(isAssessmentExpand child: Icon(isAssessmentExpand
@ -181,8 +175,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
Column( Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only( margin:
left: 5, right: 5, top: 15), EdgeInsets.only(left: 5, right: 5, top: 15),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context)
.addAssessment, .addAssessment,
@ -231,13 +225,11 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
), ),
Container( Container(
child: AppText( child: AppText(
assessment.selectedICD assessment.selectedICD.code
.code
.trim() .trim()
.toUpperCase() ?? .toUpperCase() ??
"", "",
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
fontSize: 11, fontSize: 11,
), ),
), ),
@ -250,25 +242,22 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context)
context)
.ICDName + .ICDName +
" : ", " : ",
fontSize: 13, fontSize: 13,
color: Colors.grey, color: Colors.grey,
), ),
Container( Container(
width: width: MediaQuery.of(context)
MediaQuery.of(context)
.size .size
.width * .width *
0.29, 0.29,
child: AppText( child: AppText(
assessment.selectedICD assessment
.description .selectedICD.description
.toString(), .toString(),
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
fontSize: 10, fontSize: 10,
), ),
), ),
@ -279,8 +268,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context)
context)
.appointmentNo, .appointmentNo,
fontSize: 10, fontSize: 10,
color: Colors.grey, color: Colors.grey,
@ -289,8 +277,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
assessment.appointmentId assessment.appointmentId
.toString(), .toString(),
fontSize: 11, fontSize: 11,
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
), ),
], ],
), ),
@ -299,8 +286,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context)
context)
.condition + .condition +
" : ", " : ",
fontSize: 10, fontSize: 10,
@ -315,8 +301,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
.selectedDiagnosisCondition .selectedDiagnosisCondition
.nameEn, .nameEn,
fontSize: 11, fontSize: 11,
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
), ),
], ],
), ),
@ -325,8 +310,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context)
context)
.dType + .dType +
' : ', ' : ',
fontSize: 10, fontSize: 10,
@ -341,30 +325,25 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
.selectedDiagnosisType .selectedDiagnosisType
.nameEn, .nameEn,
fontSize: 11, fontSize: 11,
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
), ),
], ],
), ),
if (assessment.doctorName != if (assessment.doctorName != null)
null)
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context)
context)
.doc, .doc,
fontSize: 10, fontSize: 10,
color: Colors.grey, color: Colors.grey,
), ),
AppText( AppText(
assessment.doctorName ?? assessment.doctorName ?? '',
'',
fontSize: 11, fontSize: 11,
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
), ),
], ],
), ),
@ -379,10 +358,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
height: 6, height: 6,
), ),
AppText( AppText(
assessment.remark != assessment.remark != null ||
null || assessment.remark ==
assessment
.remark ==
'' ''
? TranslationBase.of( ? TranslationBase.of(
context) context)
@ -393,16 +370,14 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
color: Colors.grey, color: Colors.grey,
), ),
Container( Container(
width: width: MediaQuery.of(context)
MediaQuery.of(context)
.size .size
.width * .width *
0.38, 0.38,
child: AppText( child: AppText(
assessment.remark ?? "", assessment.remark ?? "",
fontSize: 11, fontSize: 11,
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
), ),
), ),
], ],
@ -416,8 +391,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
Row( Row(
children: [ children: [
AppText( AppText(
assessment.createdOn != assessment.createdOn != null
null
? DateTime.parse( ? DateTime.parse(
assessment assessment
.createdOn) .createdOn)
@ -426,8 +400,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
: DateTime.now() : DateTime.now()
.day .day
.toString(), .toString(),
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold,
fontSize: 15, fontSize: 15,
), ),
AppText(" "), AppText(" "),
@ -455,8 +428,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
openAssessmentDialog( openAssessmentDialog(context,
context,
isUpdate: true, isUpdate: true,
assessment: assessment, assessment: assessment,
model: model); model: model);
@ -496,7 +468,57 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
DividerWithSpacesAround( DividerWithSpacesAround(
height: 30, height: 30,
), ),
Row( // Row(
// children: [
// Container(
// width: MediaQuery.of(context).size.width * 0.4,
// child: AppButton(
// title: 'Previous',
// color: Colors.white38,
// fontColor: Colors.black,
// fontWeight: FontWeight.w700,
// loading: model.state == ViewState.BusyLocal,
// onPressed: () async {
// Navigator.pop(context);
// },
// ),
// ),
// SizedBox(
// width: MediaQuery.of(context).size.width * 0.05,
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.4,
// child: AppButton(
// title: TranslationBase.of(context).next,
// fontWeight: FontWeight.w700,
// loading: model.state == ViewState.BusyLocal,
// onPressed: () async {
// if (widget.mySelectedAssessmentList.isEmpty) {
// helpers.showErrorToast(
// TranslationBase.of(context)
// .assessmentErrorMsg);
// } else {
// widget.changePageViewIndex(3);
// widget.changeLoadingState(true);
// }
// },
// ),
// ),
// ],
// ),
SizedBox(
height: 130,
),
],
),
),
),
),
),
bottomSheet: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.4, width: MediaQuery.of(context).size.width * 0.4,
@ -507,7 +529,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
Navigator.pop(context); widget.changePageViewIndex(1);
}, },
), ),
), ),
@ -523,8 +545,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
onPressed: () async { onPressed: () async {
if (widget.mySelectedAssessmentList.isEmpty) { if (widget.mySelectedAssessmentList.isEmpty) {
helpers.showErrorToast( helpers.showErrorToast(
TranslationBase.of(context) TranslationBase.of(context).assessmentErrorMsg);
.assessmentErrorMsg);
} else { } else {
widget.changePageViewIndex(3); widget.changePageViewIndex(3);
widget.changeLoadingState(true); widget.changeLoadingState(true);
@ -534,15 +555,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
), ),
], ],
), ),
SizedBox(
height: 30,
),
],
), ),
), ),
), );
),
)));
} }
openAssessmentDialog(BuildContext context, openAssessmentDialog(BuildContext context,

Loading…
Cancel
Save