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

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

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

Loading…
Cancel
Save