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

 Conflicts:
	lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart
	lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart
merge-requests/437/head
Mohammad Aljammal 4 years ago
commit a6f104c352

@ -43,11 +43,11 @@ class DoctorReplayChat extends StatelessWidget {
decoration: BoxDecoration(
color: Colors.white,
),
height: 150,
height: 115,
child: Container(
padding: EdgeInsets.only(
left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
left: 10, right: 10),
margin: EdgeInsets.only(top: 40),
child: Column(
children: [
Row(
@ -300,31 +300,44 @@ class DoctorReplayChat extends StatelessWidget {
),
),
bottomSheet: Container(
child:TextFields(
hasLabelText: msgController.text != ''
? true
: false,
showLabelText: false,
hintText: TranslationBase
.of(context)
.typeHereToReply,
fontSize: 13.5,
suffixIcon: FontAwesomeIcons.arrowRight,
suffixIconColor: Colors.green,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 50,
minLines: 3,
controller: msgController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
height: MediaQuery.of(context).size.height * 0.1,
),
width: double.infinity,
// height: MediaQuery.of(context).size.height * 0.12,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FractionallySizedBox(
child: Container(
child: TextFields(
borderRadius: 0,
hasLabelText: msgController.text != ''
? true
: false,
showLabelText: false,
hintText: "\n"+TranslationBase
.of(context)
.typeHereToReply,
fontSize: 13.5,
suffixIcon: FontAwesomeIcons.arrowRight,
suffixIconColor: Colors.green,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 50,
minLines: 3,
controller: msgController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
),
],
),
)
));
}
}

@ -31,7 +31,7 @@ class MyScheduleWidget extends StatelessWidget {
),
AppText(
workingHoursTable.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier,
fontSize: 18,
fontFamily: 'Poppins',
// fontSize: 18
),
@ -40,7 +40,7 @@ class MyScheduleWidget extends StatelessWidget {
),
AppText(
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 2.5 * SizeConfig.textMultiplier,
fontSize: 18,
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
// fontSize: 18

@ -20,59 +20,59 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
@override
Widget build(BuildContext context) {
return PreferredSize(
preferredSize: Size(double.infinity, 200),
return Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration(
color: Colors.white,
),
height: 200,
child: Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration(
color: Colors.white,
),
height: 200,
child: Container(
padding: EdgeInsets.only(
left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Column(
children: [
Container(
padding: EdgeInsets.only(left: 12.0),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
AppText(
left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Column(
children: [
Container(
padding: EdgeInsets.only(left: 12.0),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
Expanded(
child: AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.3,
fontSize: SizeConfig.textMultiplier *2.3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
patient.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
),
Row(children: [
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.asset(
patient.gender == 1
),
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
),
Row(children: [
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.asset(
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
@ -137,178 +137,176 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
patient.arrivedOn!=null? DateUtils.convertStringToDateFormat(
patient.arrivedOn,
'MM-dd-yyyy HH:mm'):'',
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
],
))
: SizedBox(),
if (SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient")
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context)
.appointmentDate +
" : ",
fontSize: 14,
),
patient.startTime != null
? Container(
height: 15,
width: 60,
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.circular(
25),
color: HexColor(
"#20A169"),
),
child: AppText(
patient.startTime,
color: Colors.white,
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
),
)
: SizedBox(),
SizedBox(
width: 3.5,
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
],
))
: SizedBox(),
if (SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient")
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context)
.appointmentDate +
" : ",
fontSize: 14,
),
patient.startTime != null
? Container(
height: 15,
width: 60,
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.circular(
25),
color: HexColor(
"#20A169"),
),
Container(
child: AppText(
convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold,
),
child: AppText(
patient.startTime,
color: Colors.white,
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
),
SizedBox(
height: 0.5,
)
],
),
margin: EdgeInsets.only(
top: 8,
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 1.6 *
SizeConfig
.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(
context)
.fileNumber,
style: TextStyle(
fontSize: 12,
fontFamily:
'Poppins')),
new TextSpan(
text: patient.patientId
.toString(),
style: TextStyle(
fontWeight:
FontWeight.w700,
fontFamily:
'Poppins',
fontSize: 14)),
],
)
: SizedBox(),
SizedBox(
width: 3.5,
),
),
Row(
children: [
AppText(
patient.nationalityName ??
patient.nationality,
fontWeight: FontWeight.bold,
fontSize: 12,
Container(
child: AppText(
convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold,
),
patient.nationality != null
? ClipRRect(
borderRadius:
BorderRadius
.circular(
20.0),
child: Image.network(
patient
.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
(BuildContext
context,
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
: SizedBox()
],
)
],
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 1.6 *
SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
SizedBox(
height: 0.5,
)
],
),
margin: EdgeInsets.only(
top: 8,
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 1.6 *
SizeConfig
.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
text:
TranslationBase.of(
context)
.age +
" : ",
.fileNumber,
style: TextStyle(
fontSize: 14)),
fontSize: 12,
fontFamily:
'Poppins')),
new TextSpan(
text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}",
text: patient.patientId
.toString(),
style: TextStyle(
fontWeight:
FontWeight.w700,
fontFamily:
'Poppins',
fontSize: 14)),
],
),
),
Row(
children: [
AppText(
patient.nationalityName ??
patient.nationality,
fontWeight: FontWeight.bold,
fontSize: 12,
),
patient.nationality != null
? ClipRRect(
borderRadius:
BorderRadius
.circular(
20.0),
child: Image.network(
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
(BuildContext
context,
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
: SizedBox()
],
)
],
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 1.6 *
SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.age +
" : ",
style: TextStyle(
fontSize: 14)),
new TextSpan(
text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle(
fontWeight:
FontWeight.w700,
fontSize: 14)),
],
),
),
],
),
),
],
),
]),
],
),
),
]),
],
),
),
);

@ -54,7 +54,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
fontFamily: 'Poppins',
),
),
patient.gender == 1
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
@ -72,7 +72,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
width: 60,
height: 60,
child: Image.asset(
patient.gender == 1
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
@ -256,8 +256,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
.circular(
20.0),
child: Image.network(
patient
.nationalityFlagURL,
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
@ -295,7 +294,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
fontSize: 14)),
new TextSpan(
text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}",
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle(
fontWeight:
FontWeight.w700,

@ -63,17 +63,20 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
AppText(
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)),
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
Expanded(
child: AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
),
patient.gender == 1
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
@ -91,7 +94,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
width: 60,
height: 60,
child: Image.asset(
patient.gender == 1
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
@ -210,7 +213,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
),
Container(
child: AppText(
convertDateFormat2(patient.appointmentDate??''),
convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 *
SizeConfig
.textMultiplier,
@ -275,8 +278,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
.circular(
20.0),
child: Image.network(
patient
.nationalityFlagURL,
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
@ -314,7 +316,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
fontSize: 14)),
new TextSpan(
text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}",
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle(
fontWeight:
FontWeight.w700,

@ -63,18 +63,20 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
Expanded(
child: AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
),
patient.gender == 1
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
@ -92,7 +94,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
width: 60,
height: 60,
child: Image.asset(
patient.gender == 1
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
@ -211,7 +213,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
),
Container(
child: AppText(
convertDateFormat2(patient.appointmentDate??''),
convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 *
SizeConfig
.textMultiplier,
@ -276,8 +278,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
.circular(
20.0),
child: Image.network(
patient
.nationalityFlagURL,
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
@ -315,7 +316,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
fontSize: 14)),
new TextSpan(
text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}",
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle(
fontWeight:
FontWeight.w700,

@ -38,7 +38,7 @@ class ExpandableSOAPWidget extends StatelessWidget {
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
bold: isExpanded ? true : false,
fontSize: 20,
fontSize: 15,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,

@ -32,7 +32,7 @@ class StepsWidget extends StatelessWidget {
),
),
Positioned(
top: 45,
top: 50,
left: 0,
child: InkWell(
onTap: () => changeCurrentTab(0),
@ -40,8 +40,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 50,
height:50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -57,7 +57,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -70,7 +70,7 @@ class StepsWidget extends StatelessWidget {
AppText(
"Subjective",
fontWeight: FontWeight.bold,
fontSize: 14,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 0,),
@ -81,7 +81,7 @@ class StepsWidget extends StatelessWidget {
),
),
Positioned(
top: 45,
top: 50,
left: MediaQuery
.of(context)
.size
@ -92,8 +92,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 50,
height: 50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -109,7 +109,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -122,7 +122,7 @@ class StepsWidget extends StatelessWidget {
AppText(
"Objective",
fontWeight: FontWeight.bold,
fontSize: 14,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 1,),
@ -134,7 +134,7 @@ class StepsWidget extends StatelessWidget {
),
),
Positioned(
top: 45,
top: 50,
left: MediaQuery
.of(context)
.size
@ -148,8 +148,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width:50,
height:50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -165,7 +165,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -178,7 +178,7 @@ class StepsWidget extends StatelessWidget {
AppText(
"Assessment",
fontWeight: FontWeight.bold,
fontSize: 14,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 2,),
],
@ -188,16 +188,16 @@ class StepsWidget extends StatelessWidget {
),
),
Positioned(
top: 45,
top: 50,
right: 0,
child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width:50,
height:50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -213,7 +213,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -222,12 +222,13 @@ class StepsWidget extends StatelessWidget {
),
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
"Plan",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 14,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 3,),
],
@ -257,7 +258,7 @@ class StepsWidget extends StatelessWidget {
),
),
Positioned(
top: 45,
top: 50,
right: 0,
child: InkWell(
onTap: () => changeCurrentTab(0),
@ -265,8 +266,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 50,
height:50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -282,7 +283,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -299,7 +300,7 @@ class StepsWidget extends StatelessWidget {
),
),
Positioned(
top: 45,
top: 50,
right: MediaQuery
.of(context)
.size
@ -310,8 +311,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 50,
height: 50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -327,7 +328,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -355,8 +356,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width:50,
height:50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -372,7 +373,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -393,7 +394,7 @@ class StepsWidget extends StatelessWidget {
),
),
Positioned(
top: 45,
top: 50,
left: 0,
child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
@ -401,8 +402,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width:50,
height:50,
width: 38,
height: 38,
decoration: BoxDecoration(
border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -418,7 +419,7 @@ class StepsWidget extends StatelessWidget {
: Color(0xFFCCCCCC),
),
child: Center(
child: Icon(FontAwesomeIcons.check, size: 25,
child: Icon(FontAwesomeIcons.check, size: 20,
color: Colors.white,)
),
),
@ -453,7 +454,8 @@ class StatusLabel extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 3),
width: 65,
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
decoration: BoxDecoration(
color: stepId == selectedStepId ? Color(0xFFF1E9D3) : stepId <
selectedStepId ? Color(0xFFD8E8DB) : Color(0xFFCCCCCC),

@ -1,10 +1,10 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../custom_validation_error.dart';
class UpdateChiefComplaints extends StatelessWidget {
const UpdateChiefComplaints({
@ -13,137 +13,110 @@ class UpdateChiefComplaints extends StatelessWidget {
@required this.complaintsController,
@required this.illnessController,
@required this.medicationController,
this.complaintsControllerError,
this.illnessControllerError,
this.medicationControllerError,
}) : super(key: key);
final GlobalKey<FormState> formKey;
final TextEditingController complaintsController;
final TextEditingController illnessController;
final TextEditingController medicationController;
final String complaintsControllerError;
final String illnessControllerError;
final String medicationControllerError;
@override
Widget build(BuildContext context) {
return Form(
key: formKey,
child: Column(children: [
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
height: 20,
),
//TODO handel error cases
NewTextFields(
hintText: TranslationBase.of(context).addChiefComplaints,
controller: complaintsController,
maxLines: 25,
minLines: 3,
),
Container(
child: CustomValidationError(
error: complaintsControllerError,
)),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
// Container(
// margin:
// EdgeInsets.only(left: 10, right: 10, top: 15),
// child: TextFields(
// hasLabelText: complaintsController.text != ''
// ? true
// : false,
// hintText: TranslationBase
// .of(context)
// .addChiefComplaints,
// fontSize: 13.5,
// // hintColor: Colors.black,
// showLabelText: true,
// fontWeight: FontWeight.w600,
// maxLines: 25,
// minLines: 13,
// controller: complaintsController,
// validator: (value) {
// if (value == null || value == "")
// return TranslationBase.of(context)
// .emptyMessage;
// else if (value.length < 25)
// return TranslationBase
// .of(context)
// .chiefComplaintLength;
// //"";
// else
// return null;
// }),
// ),
SizedBox(
height: 20,
),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
),
child: NewTextFields(
hintText: TranslationBase.of(context).addChiefComplaints,
controller: complaintsController,
),
),
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText: complaintsController.text != ''
? true
: false,
hintText: TranslationBase
.of(context)
.addChiefComplaints,
fontSize: 13.5,
// hintColor: Colors.black,
showLabelText: true,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: complaintsController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else if (value.length < 25)
return TranslationBase
.of(context)
.chiefComplaintLength;
//"";
else
return null;
}),
),
SizedBox(
height: 20,
),
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText:
illnessController.text != '' ? true : false,
showLabelText: true,
NewTextFields(
hintText: TranslationBase
.of(context)
.historyOfPresentIllness,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: illnessController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
SizedBox(
height: 10,
),
UpdateMedicationWidget(
medicationController: medicationController,
),
SizedBox(
height: 10,
),
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText: medicationController.text != ''
? true
: false,
showLabelText: true,
maxLines: 25,
minLines: 3,
),
Container(
child: CustomValidationError(error: illnessControllerError,)),
SizedBox(
height: 20,
),
SizedBox(
height: 10,
),
UpdateMedicationWidget(
medicationController: medicationController,
),
SizedBox(
height: 10,
),
NewTextFields(
hintText: TranslationBase
.of(context)
.currentMedications,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 23,
minLines: 10,
controller: medicationController,
validator: (value) {
if (value == null || value == "")
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
]),
maxLines: 25,
minLines: 3,
),
Container(child: CustomValidationError(
error: medicationControllerError,)),
SizedBox(
height: 10,
),
]),
);
}
}

@ -16,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../custom_validation_error.dart';
@ -40,17 +41,19 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
return Column(
children: [
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).addMedication,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () {
openMedicationList(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor,
suffixIconColor: Color(0xFF2B353E),
fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) {

@ -19,8 +19,6 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.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/material.dart';
@ -53,7 +51,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
TextEditingController illnessController = TextEditingController();
TextEditingController complaintsController = TextEditingController();
TextEditingController medicationController = TextEditingController();
String complaintsControllerError = '';
String medicationControllerError = '';
String illnessControllerError = '';
final formKey = GlobalKey<FormState>();
getHistory(SOAPViewModel model) async {
@ -235,16 +235,23 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
height: 30,
),
ExpandableSOAPWidget(
headerTitle: TranslationBase
.of(context)
headerTitle: TranslationBase.of(context)
.chiefComplaints
.toUpperCase(),
,
onTap: () {
setState(() {
isChiefExpand = !isChiefExpand;
});
},
child: UpdateChiefComplaints(formKey: formKey, complaintsController: complaintsController, illnessController: illnessController, medicationController: medicationController),
child: UpdateChiefComplaints(
formKey: formKey,
complaintsController: complaintsController,
illnessController: illnessController,
medicationController: medicationController,
complaintsControllerError: complaintsControllerError,
illnessControllerError: illnessControllerError,
medicationControllerError: medicationControllerError,
),
isExpanded: isChiefExpand,
),
SizedBox(
@ -255,8 +262,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
ExpandableSOAPWidget(
headerTitle: TranslationBase
.of(context)
.histories
.toUpperCase(),
.histories,
onTap: () {
setState(() {
isHistoryExpand = !isHistoryExpand;
@ -278,7 +284,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
headerTitle: TranslationBase
.of(context)
.allergiesSoap
.toUpperCase(),
,
onTap: () {
setState(() {
isAllergiesExpand = !isAllergiesExpand;
@ -356,7 +362,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
formKey.currentState.save();
formKey.currentState.validate();
complaintsControllerError = '';
medicationControllerError = '';
illnessControllerError = '';
if (complaintsController.text.isNotEmpty &&
illnessController.text.isNotEmpty &&
complaintsController.text.length > 25) {
@ -382,6 +390,29 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.changePageViewIndex(1);
} else {
setState(() {
if (complaintsController.text.isEmpty) {
complaintsControllerError = TranslationBase
.of(context)
.emptyMessage;
} else if (complaintsController.text.length < 25) {
complaintsControllerError = TranslationBase
.of(context)
.chiefComplaintLength;
}
if (illnessController.text.isEmpty) {
illnessControllerError = TranslationBase
.of(context)
.emptyMessage;
}
if (medicationController.text.isEmpty) {
medicationControllerError = TranslationBase
.of(context)
.emptyMessage;
}
});
helpers.showErrorToast(TranslationBase
.of(context)
.chiefComplaintErrorMsg);

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -13,6 +14,7 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
@ -25,6 +27,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class UpdateObjectivePage extends StatefulWidget {
@ -33,8 +36,13 @@ class UpdateObjectivePage extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo;
UpdateObjectivePage(
{Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState});
{Key key,
this.changePageViewIndex,
this.mySelectedExamination,
this.patientInfo,
this.changeLoadingState});
@override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -55,6 +63,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
)),
);
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
@ -97,350 +106,435 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 30,
),
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts(TranslationBase.of(context).physicalSystemExamination,
variant: isSysExaminationExpand
? "bodyText"
: '',
bold: isSysExaminationExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
color: Color.fromRGBO(248, 248, 248, 1),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.95,
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(12.0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey.shade400,
width: 0.4,
)),
),
InkWell(
onTap: () {
setState(() {
isSysExaminationExpand =
!isSysExaminationExpand;
});
},
child: Icon(isSysExaminationExpand
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget: Column(children: [
SizedBox(
height: 20,
),
Column(
children: [
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).physicalSystemExamination,
fontSize: 13.5,
onTapTextFields: () {
openExaminationList(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor,
fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
Column(
children:
widget.mySelectedExamination.map((examination) {
TextEditingController remarksController= TextEditingController(text :examination.remark);
return Container(
margin: EdgeInsets.only(
left: 15, right: 15, top: 15),
child: Column(children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(
( examination
.selectedExamination.nameEn )
.toUpperCase(),
variant: "bodyText",
bold: true,
color: Colors.black)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).physicalSystemExamination}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: isSysExaminationExpand ? FontWeight.w700 : FontWeight.normal,
),
/*Texts(
TranslationBase.of(context)
.physicalSystemExamination,
variant: isSysExaminationExpand
? "bodyText"
: '',
bold: isSysExaminationExpand
? true
: false,
color: Colors.black),*/
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isSysExaminationExpand =
!isSysExaminationExpand;
});
},
child: Icon(isSysExaminationExpand
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down))
],
),
bodyWidget: Column(children: [
SizedBox(
height: 8,
height: 20,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
Column(
children: [
Row(
children: [
InkWell(
child: Center(
child: Container(
height:
screenSize.height *
0.070,
decoration:
containerBorderDecoration(
examination
.isNormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors.grey),
child: Center(
child: Padding(
padding:
const EdgeInsets
.all(8.0),
child: Text(
TranslationBase.of(context).normal,
style: TextStyle(
fontSize: 12,
color:
examination
.isNormal
? Colors.white
: Colors
.black,
//Colors.black,
fontWeight:
FontWeight
.bold,
),
),
),
)),
),
onTap: () {
setState(() {
examination.isAbnormal =
false;
examination.isNormal =
true;
examination.notExamined = false;
});
}),
SizedBox(
width: 12,
),
InkWell(
child: Center(
child: Container(
height:
screenSize.height *
0.070,
decoration:
containerBorderDecoration(
examination
.isAbnormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors.black),
child: Center(
child: Padding(
padding:
const EdgeInsets
.all(8.0),
child: Text(
TranslationBase.of(context).abnormal,
style: TextStyle(
fontSize: 12,
color:
examination
.isAbnormal
? Colors.white
: Colors
.black,
//Colors.black,
fontWeight:
FontWeight
.bold,
),
Container(
margin: EdgeInsets.only(
left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context)
.physicalSystemExamination,
fontSize: 13.5,
onTapTextFields: () {
openExaminationList(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon:
EvaIcons.plusCircleOutline,
suffixIconColor:
AppGlobal.appPrimaryColor,
fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
Column(
children: widget.mySelectedExamination
.map((examination) {
TextEditingController
remarksController =
TextEditingController(
text: examination.remark);
return Container(
margin: EdgeInsets.only(
left: 15, right: 15, top: 15),
child: Column(children: [
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Texts(
(examination
.selectedExamination
.nameEn)
.toUpperCase(),
variant: "bodyText",
bold: true,
color: Colors.black)
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Row(
children: [
InkWell(
child: Center(
child: Container(
height: screenSize
.height *
0.070,
decoration: containerBorderDecoration(
examination
.isNormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors
.grey),
child: Center(
child:
Padding(
padding:
const EdgeInsets.all(
8.0),
child: Text(
TranslationBase.of(
context)
.normal,
style:
TextStyle(
fontSize:
12,
color: examination.isNormal
? Colors.white
: Colors.black,
//Colors.black,
fontWeight:
FontWeight.bold,
),
),
),
)),
),
onTap: () {
setState(() {
examination
.isAbnormal =
false;
examination
.isNormal =
true;
examination
.notExamined =
false;
});
}),
SizedBox(
width: 12,
),
),
)),
),
onTap: () {
setState(() {
examination.isNormal =
false;
examination.isAbnormal =
true;
examination.notExamined = false;
});
}),SizedBox(
width: 12,
),
InkWell(
child: Center(
child: Container(
height:
screenSize.height *
0.070,
decoration:
containerBorderDecoration(
examination
.notExamined
? Color(
0xFF515A5D)
: Colors
.white,
Colors.black),
child: Center(
child: Padding(
padding:
const EdgeInsets
.all(8.0),
child: Text(
"Not Examined",
style: TextStyle(
fontSize: 12,
color:
examination
.notExamined
? Colors.white
: Colors
.black,
//Colors.black,
fontWeight:
FontWeight
.bold,
),
InkWell(
child: Center(
child: Container(
height: screenSize
.height *
0.070,
decoration: containerBorderDecoration(
examination
.isAbnormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors
.black),
child: Center(
child:
Padding(
padding:
const EdgeInsets.all(
8.0),
child: Text(
TranslationBase.of(
context)
.abnormal,
style:
TextStyle(
fontSize:
12,
color: examination.isAbnormal
? Colors.white
: Colors.black,
//Colors.black,
fontWeight:
FontWeight.bold,
),
),
),
)),
),
onTap: () {
setState(() {
examination
.isNormal =
false;
examination
.isAbnormal =
true;
examination
.notExamined =
false;
});
}),
SizedBox(
width: 12,
),
InkWell(
child: Center(
child: Container(
height: screenSize
.height *
0.070,
decoration: containerBorderDecoration(
examination
.notExamined
? Color(
0xFF515A5D)
: Colors
.white,
Colors
.black),
child: Center(
child:
Padding(
padding:
const EdgeInsets.all(
8.0),
child: Text(
"Not Examined",
style:
TextStyle(
fontSize:
12,
color: examination.notExamined
? Colors.white
: Colors.black,
//Colors.black,
fontWeight:
FontWeight.bold,
),
),
),
)),
),
onTap: () {
setState(() {
examination
.isAbnormal =
false;
examination
.isNormal =
false;
examination
.notExamined =
true;
});
}),
],
),
InkWell(
child: Icon(
FontAwesomeIcons.trash,
color: Colors.grey,
size: 20,
),
)),
),
onTap: () {
setState(() {
examination.isAbnormal =
false;
examination.isNormal =
false;
examination.notExamined = true;
});
}),
],
),
InkWell(
child: Icon(
FontAwesomeIcons.trash,
color: Colors.grey,
size: 20,
),
onTap: () => removeExamination(
examination.selectedExamination),
onTap: () => removeExamination(
examination
.selectedExamination),
)
],
),
SizedBox(
height: 20,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hasLabelText:
remarksController
.text !=
''
? true
: false,
showLabelText: true,
hintText:
TranslationBase.of(
context)
.remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 4,
controller:
remarksController,
onChanged: (val) {
examination.remark = val;
},
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
]));
}).toList(),
)
],
),
SizedBox(
height: 20,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hasLabelText: remarksController.text != ''?true:false,
showLabelText: true,
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 4,
controller: remarksController,
onChanged: (val) {
examination.remark = val;
},
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
]));
}).toList(),
)
],
)
]),
isExpand: isSysExaminationExpand,
)
]),
isExpand: isSysExaminationExpand,
),
],
),
),
),
),
),
),
DividerWithSpacesAround(height: 30,),
AppButton(
title: TranslationBase.of(context).next,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: HexColor("#EAEAEA"),
fontColor: Colors.black,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: 10,
),
SizedBox(
height: 30,
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
loading: model.state == ViewState.BusyLocal,
color: HexColor("#A5A5A5"),
fontColor: HexColor("#5A5A5A"),
fontWeight: FontWeight.bold,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
),
],
),
),
),
)));
),
],
)));
}
submitUpdateObjectivePage(SOAPViewModel model) async {
if(widget.mySelectedExamination.isNotEmpty){
if (widget.mySelectedExamination.isNotEmpty) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
PostPhysicalExamRequestModel postPhysicalExamRequestModel =
new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
[];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
ListHisProgNotePhysicalExaminationVM(
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
.add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '',
createdBy: exam.createdBy??doctorProfile.doctorID,
createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
@ -450,15 +544,20 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
isNormal: exam.isNormal,
// masterDescription: exam.selectedExamination,
notExamined: exam.notExamined,
examinationType: exam.isNormal?1:exam.isAbnormal?2:3,
examinationTypeName: exam.isNormal?"Normal":exam.isAbnormal?'AbNormal':"Not Examined",
isNew:exam.isNew
));
examinationType: exam.isNormal
? 1
: exam.isAbnormal
? 2
: 3,
examinationTypeName: exam.isNormal
? "Normal"
: exam.isAbnormal
? 'AbNormal'
: "Not Examined",
isNew: exam.isNew));
});
if(model.patientPhysicalExamList.isEmpty) {
if (model.patientPhysicalExamList.isEmpty) {
await model.postPhysicalExam(postPhysicalExamRequestModel);
} else {
await model.patchPhysicalExam(postPhysicalExamRequestModel);
@ -482,9 +581,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
removeExamination(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> history = widget.mySelectedExamination
.where(
(element) =>
masterKey.id == element.selectedExamination.id &&
.where((element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
if (history.length > 0)
@ -494,11 +592,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
}
openExaminationList(BuildContext context) {
final screenSize = MediaQuery
.of(context)
.size;
InputDecoration textFieldSelectorDecoration(String hintText,
String selectedText, bool isDropDown) {
final screenSize = MediaQuery.of(context).size;
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -533,7 +629,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Navigator.of(context).pop();
});
},
removeExamination: (masterKey) => removeExamination(masterKey),);
removeExamination: (masterKey) => removeExamination(masterKey),
);
});
}
}
@ -541,10 +638,13 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
class AddExaminationDailog extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination;
final Function addSelectedExamination;
final Function (MasterKeyModel) removeExamination;
final Function(MasterKeyModel) removeExamination;
const AddExaminationDailog(
{Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination})
{Key key,
this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination})
: super(key: key);
@override
@ -559,71 +659,69 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(
MasterKeysService.PhysicalExamination);
await model
.getMasterLookup(MasterKeysService.PhysicalExamination);
}
},
builder: (_, model, w) =>
AppScaffold(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
body: Center(
child: Container(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).physicalSystemExamination,
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
MasterKeyCheckboxSearchWidget(
model: model,
hintSearchText: TranslationBase.of(context).searchExamination,
buttonName: TranslationBase.of(context).addExamination,
masterList: model.physicalExaminationList,
removeHistory: (history){
setState(() {
widget.removeExamination(history);
});
},
addHistory: (history){
setState(() {
MySelectedExamination mySelectedExamination = new MySelectedExamination(
selectedExamination: history
);
widget
.mySelectedExamination
.add(
mySelectedExamination);
});
},
addSelectedHistories: (){
widget.addSelectedExamination();
},
isServiceSelected: (master) =>isServiceSelected(master),
),
]),
))),
widthFactor: 0.9,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).physicalSystemExamination,
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
MasterKeyCheckboxSearchWidget(
model: model,
hintSearchText:
TranslationBase.of(context).searchExamination,
buttonName:
TranslationBase.of(context).addExamination,
masterList: model.physicalExaminationList,
removeHistory: (history) {
setState(() {
widget.removeExamination(history);
});
},
addHistory: (history) {
setState(() {
MySelectedExamination mySelectedExamination =
new MySelectedExamination(
selectedExamination: history);
widget.mySelectedExamination
.add(mySelectedExamination);
});
},
addSelectedHistories: () {
widget.addSelectedExamination();
},
isServiceSelected: (master) =>
isServiceSelected(master),
),
]),
))),
)),
);
}
isServiceSelected(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> exam =
widget
.mySelectedExamination
.where((element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
(element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
if (exam.length > 0) {
return true;
}

@ -77,7 +77,7 @@ class TextFields extends StatefulWidget {
this.hasBorder = true,
this.onTapTextFields,
this.hasLabelText = false,
this.showLabelText = false})
this.showLabelText = false, this.borderRadius= 8.0, this.borderColor, this.borderWidth = 1, })
: super(key: key);
final String hintText;
@ -116,6 +116,9 @@ class TextFields extends StatefulWidget {
final Color fillColor;
final bool hasBorder;
final bool showLabelText;
Color borderColor;
final double borderRadius;
final double borderWidth;
bool hasLabelText;
@override
@ -200,6 +203,8 @@ class _TextFieldsState extends State<TextFields> {
@override
Widget build(BuildContext context) {
widget.borderColor = widget.borderColor?? Colors.grey;
return (AnimatedContainer(
duration: Duration(milliseconds: 300),
decoration: widget.bare
@ -276,6 +281,7 @@ class _TextFieldsState extends State<TextFields> {
hintText: widget.hintText,
hintStyle: TextStyle(
fontSize: widget.fontSize,
fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor,
),
@ -304,7 +310,7 @@ class _TextFieldsState extends State<TextFields> {
width: 1.0)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0),
),
focusedErrorBorder: OutlineInputBorder(
@ -315,28 +321,28 @@ class _TextFieldsState extends State<TextFields> {
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)),
focusedBorder: OutlineInputBorder(
borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0)
? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0),
),
disabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0)
? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0)),
enabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0)
? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0),
),
),

@ -2,6 +2,7 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
class NumberTextInputFormatter extends TextInputFormatter {
@override
@ -70,8 +71,8 @@ class NewTextFields extends StatefulWidget {
this.prefixIcon,
this.bare = false,
this.onTap,
this.fontSize = 16.0,
this.fontWeight = FontWeight.w700,
this.fontSize = 15.0,
this.fontWeight = FontWeight.w500,
this.autoValidate = false,
this.hintColor,
this.isEnabled = true})
@ -158,9 +159,15 @@ class _NewTextFieldsState extends State<NewTextFields> {
duration: Duration(milliseconds: 300),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
color: Colors.white),
child: Container(
margin: EdgeInsets.only(top: 8),
padding: EdgeInsets.only(top: 8),
child: TextFormField(
enabled: widget.isEnabled,
initialValue: widget.initialValue,
@ -190,7 +197,7 @@ class _NewTextFieldsState extends State<NewTextFields> {
validator: widget.validator,
onSaved: widget.onSaved,
style: Theme.of(context).textTheme.body2.copyWith(
fontSize: widget.fontSize, fontWeight: widget.fontWeight),
fontSize: widget.fontSize, fontWeight: widget.fontWeight, color: Color(0xFF575757), fontFamily: 'Poppins'),
inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[
WhitelistingTextInputFormatter.digitsOnly,
@ -200,7 +207,7 @@ class _NewTextFieldsState extends State<NewTextFields> {
decoration: InputDecoration(
labelText: widget.hintText,
labelStyle:
TextStyle(color: Theme.of(context).textTheme.bodyText1.color),
TextStyle(color: Color(0xFF2E303A), fontSize:15,fontWeight: FontWeight.w700),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context).errorColor.withOpacity(0.5),

Loading…
Cancel
Save