Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into fix-issues

merge-requests/440/head
hussam al-habibeh 5 years ago
commit 9adf55710e

@ -68,6 +68,7 @@ class BaseAppClient {
body['LanguageID'] = 2; body['LanguageID'] = 2;
body['stamp'] = STAMP; body['stamp'] = STAMP;
// if(!body.containsKey("IPAdress"))
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
@ -85,6 +86,9 @@ class BaseAppClient {
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
String bodyData= json.encode(body);
var asd="";
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(url, final response = await http.post(url,
@ -148,7 +152,7 @@ class BaseAppClient {
: SETUP_ID; : SETUP_ID;
} }
body['VersionID'] = VERSION_ID; body['VersionID'] = 6.3;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = languageID == 'ar' ? 1 : 2;

@ -121,7 +121,7 @@ const GET_DASHBOARD =
const GET_SICKLEAVE_STATISTIC = const GET_SICKLEAVE_STATISTIC =
'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics';
const ARRIVED_PATIENT_URL = const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList'; 'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves'; const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';

@ -1,8 +1,9 @@
class MedicalFileRequestModel { class MedicalFileRequestModel {
int patientMRN; int patientMRN;
String vidaAuthTokenID; String vidaAuthTokenID;
String iPAdress;
MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID}); MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID,this.iPAdress});
MedicalFileRequestModel.fromJson(Map<String, dynamic> json) { MedicalFileRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
@ -13,6 +14,7 @@ class MedicalFileRequestModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['IPAdress'] = this.iPAdress;
return data; return data;
} }
} }

@ -15,18 +15,18 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval; List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo , int projectId}) async {
hasError = false; hasError = false;
// _cardList.clear(); // _cardList.clear();
if (appointmentNo != null) { // if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo; // _insuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null; // _insuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null; // _insuranceApprovalModel.projectID = projectId;
} else { // } else {
_insuranceApprovalModel.appointmentNo = null; _insuranceApprovalModel.appointmentNo = null;
_insuranceApprovalModel.eXuldAPPNO = 0; _insuranceApprovalModel.eXuldAPPNO = 0;
_insuranceApprovalModel.projectID = 0; _insuranceApprovalModel.projectID = 0;
} // }
await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS,
patient: patient, patient: patient,

@ -16,6 +16,7 @@ class MedicalFileService extends BaseService {
Future getMedicalFile({int mrn}) async { Future getMedicalFile({int mrn}) async {
_fileRequestModel = MedicalFileRequestModel(patientMRN: mrn); _fileRequestModel = MedicalFileRequestModel(patientMRN: mrn);
_fileRequestModel.iPAdress = "9.9.9.9";
hasError = false; hasError = false;
_medicalFileList.clear(); _medicalFileList.clear();
await baseAppClient.post(GET_MEDICAL_FILE, await baseAppClient.post(GET_MEDICAL_FILE,

@ -14,12 +14,12 @@ class InsuranceViewModel extends BaseViewModel{
List<InsuranceApprovalModel> get insuranceApproval => List<InsuranceApprovalModel> get insuranceApproval =>
_insuranceCardService.insuranceApproval; _insuranceCardService.insuranceApproval;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo, int projectId}) async {
error = ""; error = "";
setState(ViewState.Busy); setState(ViewState.Busy);
if (appointmentNo != null) if (appointmentNo != null)
await _insuranceCardService.getInsuranceApproval(patient, await _insuranceCardService.getInsuranceApproval(patient,
appointmentNo: appointmentNo); appointmentNo: appointmentNo,projectId: projectId);
else else
await _insuranceCardService.getInsuranceApproval(patient); await _insuranceCardService.getInsuranceApproval(patient);
if (_insuranceCardService.hasError) { if (_insuranceCardService.hasError) {

@ -43,11 +43,11 @@ class DoctorReplayChat extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 150, height: 115,
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 10, right: 10, bottom: 10), left: 10, right: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 40),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -300,15 +300,24 @@ class DoctorReplayChat extends StatelessWidget {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
child:TextFields( 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 != '' hasLabelText: msgController.text != ''
? true ? true
: false, : false,
showLabelText: false, showLabelText: false,
hintText: TranslationBase hintText: "\n"+TranslationBase
.of(context) .of(context)
.typeHereToReply, .typeHereToReply,
fontSize: 13.5, fontSize: 13.5,
suffixIcon: FontAwesomeIcons.arrowRight, suffixIcon: FontAwesomeIcons.arrowRight,
suffixIconColor: Colors.green, suffixIconColor: Colors.green,
// hintColor: Colors.black, // hintColor: Colors.black,
@ -323,8 +332,12 @@ class DoctorReplayChat extends StatelessWidget {
else else
return null; return null;
}), }),
height: MediaQuery.of(context).size.height * 0.1,
), ),
),
],
),
)
)); ));
} }
} }

@ -40,13 +40,14 @@ class DoctorReplyScreen extends StatelessWidget {
model.listDoctorWorkingHoursTable.map((reply) { model.listDoctorWorkingHoursTable.map((reply) {
return InkWell( return InkWell(
onTap: () { onTap: () {
Navigator.push( // Navigator.push(
context, // context,
MaterialPageRoute( // MaterialPageRoute(
builder: (BuildContext context) => // builder: (BuildContext context) =>
DoctorReplayChat(reply: reply))); // DoctorReplayChat(reply: reply)));
}, },
child: DoctorReplyWidget(reply: reply)); child: DoctorReplyWidget(reply: reply),
);
}).toList(), }).toList(),
) )
], ],

@ -42,7 +42,7 @@ class _InsuranceApprovalScreenNewState
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: patient.appointmentNo != null onModelReady: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
appointmentNo: patient.appointmentNo) appointmentNo: patient.appointmentNo,projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient), : (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -147,7 +147,7 @@ class _InsuranceApprovalScreenNewState
.toString(), .toString(),
isPrescriptions: true, isPrescriptions: true,
approvalStatus: model.insuranceApproval[index] approvalStatus: model.insuranceApproval[index]
.approvalDetails.status, .approvalDetails?.status??'',
), ),
), ),
), ),

@ -37,7 +37,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: patient.appointmentNo != null onModelReady: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
appointmentNo: patient.appointmentNo) appointmentNo: patient.appointmentNo,projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient), : (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -93,14 +93,12 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
Texts( Texts(
model.insuranceApproval[indexInsurance] model.insuranceApproval[indexInsurance].approvalDetails!=null?
.approvalDetails.status, model.insuranceApproval[indexInsurance].approvalDetails.status ??"":"",
color: color:
model.insuranceApproval[indexInsurance] model.insuranceApproval[indexInsurance].approvalDetails!=null?
.approvalDetails.status == "${model.insuranceApproval[indexInsurance].approvalDetails.status}"
"Approved" == "Approved" ? Color(0xff359846) : Color(0xffD02127): Color(0xffD02127),
? Color(0xff359846)
: Color(0xffD02127),
), ),
], ],
), ),
@ -210,9 +208,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Texts('Sample') Texts('Sample')
], ],
), ),
SizedBox(
height: 25.0,
),
Row( Row(
children: [ children: [
Texts( Texts(
@ -315,8 +311,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
.approvalDetails ?.approvalDetails
.procedureName), ?.procedureName??""),
), ),
Container( Container(
height: MediaQuery.of(context) height: MediaQuery.of(context)
@ -330,8 +326,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
.approvalDetails ?.approvalDetails
.status), ?.status??""),
), ),
Container( Container(
height: MediaQuery.of(context) height: MediaQuery.of(context)
@ -345,8 +341,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
.approvalDetails ?.approvalDetails
.isInvoicedDesc), ?.isInvoicedDesc??""),
), ),
], ],
), ),

@ -167,16 +167,24 @@ class _PatientsScreenState extends State<PatientsScreen> {
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
if (true) { if (true) {
List<PatiantInformtion> filterDate = []; List<PatiantInformtion> filterDate = [];
String patiantAppointment = "";
for (var i = 0; i < responseModelList2.length; i++) { for (var i = 0; i < responseModelList2.length; i++) {
String patiantAppointment = try {
if (responseModelList[i].appointmentDate == "") {
patiantAppointment = responseModelList[i].arrivedOn;
} else {
patiantAppointment =
convertDateFormat(responseModelList[i].appointmentDate); convertDateFormat(responseModelList[i].appointmentDate);
}
String dateAppointment = checkDate(patiantAppointment); String dateAppointment = checkDate(patiantAppointment);
if (dateAppointment.contains(str)) { if (dateAppointment.contains(str) || str == 'All') {
filterDate.add(responseModelList[i]); filterDate.add(responseModelList[i]);
} }
} catch (e) {
print(e);
}
} }
setState(() { setState(() {
@ -446,11 +454,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
.size .size
.height * .height *
0.03), 0.03),
child: SERVICES_PATIANT2[ child: _locationBar(context)
int.parse(patientType)] == // child: SERVICES_PATIANT2[
"List_MyOutPatient" // int.parse(patientType)] ==
? _locationBar(context) // "List_MyOutPatient"
: Container(), // ? _locationBar(context)
// : Container(),
), ),
// Row( // Row(
// mainAxisAlignment: // mainAxisAlignment:

@ -19,7 +19,13 @@ class RadiologyDetailsPage extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
RadiologyDetailsPage({Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType});
RadiologyDetailsPage(
{Key key,
this.finalRadiology,
this.patient,
this.patientType,
this.arrivalType});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -32,10 +38,9 @@ class RadiologyDetailsPage extends StatelessWidget {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBar: PatientProfileHeaderWhitAppointmentAppBar( appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient: patient, patient: patient,
patientType: patientType??"0", patientType: patientType ?? "0",
arrivalType: arrivalType??"0", arrivalType: arrivalType ?? "0",
orderNo: finalRadiology.orderNo.toString(), appointmentDate: finalRadiology.orderDate,
appointmentDate:finalRadiology.orderDate,
doctorName: finalRadiology.doctorName, doctorName: finalRadiology.doctorName,
profileUrl: finalRadiology.doctorImageURL, profileUrl: finalRadiology.doctorImageURL,
invoiceNO: finalRadiology.invoiceNo.toString(), invoiceNO: finalRadiology.invoiceNo.toString(),
@ -56,9 +61,13 @@ class RadiologyDetailsPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 5,), SizedBox(
height: 5,
),
Texts(TranslationBase.of(context).generalResult), Texts(TranslationBase.of(context).generalResult),
SizedBox(height: 5,), SizedBox(
height: 5,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
@ -68,13 +77,22 @@ class RadiologyDetailsPage extends StatelessWidget {
color: Colors.grey, color: Colors.grey,
), ),
), ),
SizedBox(height: 25,), SizedBox(
if(model.radImageURL.isNotEmpty) height: 100,
Center( ),
],
),
),
],
),
),
bottomSheet: model.radImageURL.isNotEmpty ?Container(
width: double.maxFinite,
height: 100,
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.8, margin: EdgeInsets.only(left: 35,right: 35,top: 12,bottom: 12),
child: Button( child: Button(
color: Colors.red, color: Colors.red,
onTap: () { onTap: () {
launch(model.radImageURL); launch(model.radImageURL);
@ -82,13 +100,7 @@ class RadiologyDetailsPage extends StatelessWidget {
title: TranslationBase.of(context).openRad, title: TranslationBase.of(context).openRad,
), ),
), ),
), ):null,
],
),
),
],
),
),
), ),
); );
} }

@ -124,7 +124,6 @@ class RadiologyHomePage extends StatelessWidget {
invoiceNO: '${model.radiologyList[index].invoiceNo}', invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}', branch: '${model.radiologyList[index].projectName}',
appointmentDate: model.radiologyList[index].orderDate, appointmentDate: model.radiologyList[index].orderDate,
orderNo: model.radiologyList[index].orderNo.toString(),
), ),
)), )),

@ -115,6 +115,7 @@ class LineChartCurved extends StatelessWidget {
//rotateAngle:-65, //rotateAngle:-65,
margin: 22, margin: 22,
getTitles: (value) { getTitles: (value) {
if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) { if (timeSeries.length > value.toInt()) {
DateTime dateTime = timeSeries[value.toInt()].time; DateTime dateTime = timeSeries[value.toInt()].time;
if (isDatesSameYear) { if (isDatesSameYear) {
@ -125,6 +126,19 @@ class LineChartCurved extends StatelessWidget {
} else { } else {
return ''; return '';
} }
} else {
if (value.toInt() == 0 ||
value.toInt() == timeSeries.length - 1 ||
xAxixs.contains(value.toInt())) {
DateTime dateTime = timeSeries[value.toInt()].time;
if (isDatesSameYear) {
return monthFormat.format(dateTime);
} else {
return yearFormat.format(dateTime);
}
}
}
/*if (timeSeries.length < 15) { /*if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) { if (timeSeries.length > value.toInt()) {
DateTime dateTime = timeSeries[value.toInt()].time; DateTime dateTime = timeSeries[value.toInt()].time;
@ -232,7 +246,7 @@ class LineChartCurved extends StatelessWidget {
final LineChartBarData lineChartBarData1 = LineChartBarData( final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots, spots: spots,
isCurved: true, isCurved: true,
colors: [Colors.red]/*[Theme.of(context).primaryColor]*/, colors: [Colors.red] /*[Theme.of(context).primaryColor]*/,
barWidth: 5, barWidth: 5,
isStrokeCapRound: true, isStrokeCapRound: true,
dotData: FlDotData( dotData: FlDotData(

@ -100,13 +100,25 @@ class PrescriptionItemsPage extends StatelessWidget {
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,), Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportList[index].routeN)), Expanded(child: Texts(" "+model.prescriptionReportList[index].routeN)),
], ],
), ),
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,), Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportList[index].frequencyN ?? ''), Texts(" "+model.prescriptionReportList[index].frequencyN ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,),
Texts(" "+model.prescriptionReportList[index].doseDailyQuantity ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).duration,color: Colors.grey,),
Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''),
], ],
), ),
SizedBox(height: 12,), SizedBox(height: 12,),
@ -178,13 +190,25 @@ class PrescriptionItemsPage extends StatelessWidget {
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,), Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportEnhList[index].route??'')), Expanded(child: Texts(" "+model.prescriptionReportEnhList[index].route??'')),
], ],
), ),
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,), Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportEnhList[index].frequency ?? ''), Texts(" "+model.prescriptionReportEnhList[index].frequency ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,),
Texts(" "+model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).duration,color: Colors.grey,),
Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''),
], ],
), ),
SizedBox(height: 12,), SizedBox(height: 12,),

@ -21,7 +21,8 @@ class MyScheduleWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Column( Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -30,7 +31,7 @@ class MyScheduleWidget extends StatelessWidget {
), ),
AppText( AppText(
workingHoursTable.dayName, workingHoursTable.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier, fontSize: 18,
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
), ),
@ -39,14 +40,14 @@ class MyScheduleWidget extends StatelessWidget {
), ),
AppText( AppText(
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 2.5 * SizeConfig.textMultiplier, fontSize: 18,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
), ),
], ],
), ),
),
Container( Container(
width: MediaQuery.of(context).size.width * 0.55, width: MediaQuery.of(context).size.width * 0.55,
child: CardWithBgWidget( child: CardWithBgWidget(
@ -80,16 +81,11 @@ class MyScheduleWidget extends StatelessWidget {
), ),
Container( Container(
width: MediaQuery.of(context).size.width*0.55, width: MediaQuery.of(context).size.width*0.55,
child: Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: AppText( child: AppText(
work.from + ' - ' + work.to, '${work.from} - ${work.to}',
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
), ),
),
),
) )
], ],
), ),

@ -20,9 +20,13 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return PreferredSize( int gender = 1;
preferredSize: Size(double.infinity, 200), if (patient.patientDetails != null) {
child: Container( gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,), left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -43,18 +47,20 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
color: Colors.black, //Colors.black, color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( Expanded(
child: AppText(
patient.firstName != null ? patient.firstName != null ?
(Helpers.capitalize(patient.firstName) + (Helpers.capitalize(patient.firstName) +
" " + " " +
Helpers.capitalize( Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier *2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
patient.gender == 1 ),
gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -72,7 +78,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -134,10 +140,9 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
FontWeight.w600, FontWeight.w600,
) )
: AppText( : AppText(
DateUtils.convertStringToDateFormat( patient.arrivedOn!=null? DateUtils.convertStringToDateFormat(
patient patient.arrivedOn,
.arrivedOn, 'MM-dd-yyyy HH:mm'):'',
'MM-dd-yyyy HH:mm'),
fontFamily: fontFamily:
'Poppins', 'Poppins',
fontWeight: fontWeight:
@ -256,8 +261,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
.circular( .circular(
20.0), 20.0),
child: Image.network( child: Image.network(
patient patient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder:
@ -295,7 +299,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
fontSize: 14)), fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,
@ -311,7 +315,6 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
], ],
), ),
), ),
),
); );
} }

@ -11,25 +11,34 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
class PatientProfileHeaderNewDesign extends StatelessWidget { class PatientProfileHeaderNewDesign extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
PatientProfileHeaderNewDesign(this.patient, this.patientType, this.arrivalType); PatientProfileHeaderNewDesign(
this.patient, this.patientType, this.arrivalType);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
int gender = 1;
if (patient.patientDetails != null) {
gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,), left: 0,
right: 5,
bottom: 5,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 200, height: 200,
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 50),
child: Column( child: Column(
children: [ children: [
@ -43,18 +52,18 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
patient.firstName != null ? patient.firstName != null
(Helpers.capitalize(patient.firstName) + ? (Helpers.capitalize(patient.firstName) +
" " + " " +
Helpers.capitalize( Helpers.capitalize(patient.lastName))
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.5, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
patient.gender == 1 gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -72,7 +81,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -84,79 +93,55 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
SERVICES_PATIANT2[ SERVICES_PATIANT2[int.parse(patientType)] ==
int.parse(patientType)] ==
"patientArrivalList" "patientArrivalList"
? Container( ? Container(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment
.spaceBetween,
children: [ children: [
patient.patientStatusType == patient.patientStatusType == 43
43
? AppText( ? AppText(
TranslationBase.of( TranslationBase.of(context).arrivedP,
context)
.arrivedP,
color: Colors.green, color: Colors.green,
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold, fontFamily: 'Poppins',
fontFamily:
'Poppins',
fontSize: 12, fontSize: 12,
) )
: AppText( : AppText(
TranslationBase.of( TranslationBase.of(context).notArrived,
context) color: Colors.red[800],
.notArrived, fontWeight: FontWeight.bold,
color: fontFamily: 'Poppins',
Colors.red[800],
fontWeight:
FontWeight.bold,
fontFamily:
'Poppins',
fontSize: 12, fontSize: 12,
), ),
arrivalType == '1' arrivalType == '1'
? AppText( ? AppText(
patient.startTime != patient.startTime != null
null ? patient.startTime
? patient
.startTime
: '', : '',
fontFamily: fontFamily: 'Poppins',
'Poppins', fontWeight: FontWeight.w600,
fontWeight:
FontWeight.w600,
) )
: AppText( : AppText(
DateUtils.convertStringToDateFormat( DateUtils.convertStringToDateFormat(
patient patient.arrivedOn,
.arrivedOn,
'MM-dd-yyyy HH:mm'), 'MM-dd-yyyy HH:mm'),
fontFamily: fontFamily: 'Poppins',
'Poppins', fontWeight: FontWeight.w600,
fontWeight:
FontWeight.w600,
) )
], ],
)) ))
: SizedBox(), : SizedBox(),
if (SERVICES_PATIANT2[ if (SERVICES_PATIANT2[int.parse(patientType)] ==
int.parse(patientType)] ==
"List_MyOutPatient") "List_MyOutPatient")
Container( Container(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).appointmentDate +
.appointmentDate +
" : ", " : ",
fontSize: 14, fontSize: 14,
), ),
@ -164,25 +149,16 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
? Container( ? Container(
height: 15, height: 15,
width: 60, width: 60,
decoration: decoration: BoxDecoration(
BoxDecoration( borderRadius: BorderRadius.circular(25),
borderRadius: color: HexColor("#20A169"),
BorderRadius
.circular(
25),
color: HexColor(
"#20A169"),
), ),
child: AppText( child: AppText(
patient.startTime, patient.startTime,
color: Colors.white, color: Colors.white,
fontSize: 1.5 * fontSize: 1.5 * SizeConfig.textMultiplier,
SizeConfig textAlign: TextAlign.center,
.textMultiplier, fontWeight: FontWeight.bold,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
), ),
) )
: SizedBox(), : SizedBox(),
@ -191,12 +167,10 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient.appointmentDate.toString()?? ''), convertDateFormat2(
fontSize: 1.5 * patient.appointmentDate.toString() ?? ''),
SizeConfig fontSize: 1.5 * SizeConfig.textMultiplier,
.textMultiplier, fontWeight: FontWeight.bold,
fontWeight:
FontWeight.bold,
), ),
), ),
SizedBox( SizedBox(
@ -209,34 +183,23 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(
fontSize: 1.6 * fontSize: 1.6 * SizeConfig.textMultiplier,
SizeConfig
.textMultiplier,
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: text: TranslationBase.of(context).fileNumber,
TranslationBase.of(
context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12, fontFamily: 'Poppins')),
fontFamily:
'Poppins')),
new TextSpan( new TextSpan(
text: patient.patientId text: patient.patientId.toString(),
.toString(),
style: TextStyle( style: TextStyle(
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700, fontFamily: 'Poppins',
fontFamily:
'Poppins',
fontSize: 14)), fontSize: 14)),
], ],
), ),
@ -244,31 +207,21 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
patient.nationalityName ?? patient.nationalityName ?? patient.nationality,
patient.nationality,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
patient.nationality != null patient.nationality != null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(20.0),
BorderRadius
.circular(
20.0),
child: Image.network( child: Image.network(
patient patient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder: (BuildContext context,
(BuildContext Object exception,
context, StackTrace stackTrace) {
Object return Text('No Image');
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
}, },
)) ))
: SizedBox() : SizedBox()
@ -280,26 +233,19 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 1.6 * fontSize: 1.6 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
color: Colors.black, color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of( text: TranslationBase.of(context).age + " : ",
context) style: TextStyle(fontSize: 14)),
.age +
" : ",
style: TextStyle(
fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight: FontWeight.w700, fontSize: 14)),
FontWeight.w700,
fontSize: 14)),
], ],
), ),
), ),

@ -41,6 +41,13 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
int gender = 1;
if (patient.patientDetails != null) {
gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@ -63,17 +70,20 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
color: Colors.black, //Colors.black, color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( Expanded(
child: AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) + (Helpers.capitalize(patient.firstName) +
" " + " " +
Helpers.capitalize( Helpers.capitalize(
patient.lastName)), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier *2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
patient.gender == 1 ),
gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -91,7 +101,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -210,7 +220,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient.appointmentDate??''), convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -275,8 +285,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
.circular( .circular(
20.0), 20.0),
child: Image.network( child: Image.network(
patient patient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder:
@ -314,7 +323,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
fontSize: 14)), fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,

@ -42,6 +42,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
int gender = 1;
if (patient.patientDetails != null) {
gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5), left: 0, right: 5, bottom: 5, top: 5),
@ -63,18 +70,20 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
color: Colors.black, //Colors.black, color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( Expanded(
child: AppText(
patient.firstName != null ? patient.firstName != null ?
(Helpers.capitalize(patient.firstName) + (Helpers.capitalize(patient.firstName) +
" " + " " +
Helpers.capitalize( Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier *2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
patient.gender == 1 ),
gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -92,7 +101,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -211,7 +220,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient.appointmentDate??''), convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -276,8 +285,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
.circular( .circular(
20.0), 20.0),
child: Image.network( child: Image.network(
patient patient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder:
@ -315,7 +323,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
fontSize: 14)), fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,

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

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

@ -1,10 +1,10 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; 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/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:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../custom_validation_error.dart';
class UpdateChiefComplaints extends StatelessWidget { class UpdateChiefComplaints extends StatelessWidget {
const UpdateChiefComplaints({ const UpdateChiefComplaints({
@ -13,95 +13,84 @@ class UpdateChiefComplaints extends StatelessWidget {
@required this.complaintsController, @required this.complaintsController,
@required this.illnessController, @required this.illnessController,
@required this.medicationController, @required this.medicationController,
this.complaintsControllerError,
this.illnessControllerError,
this.medicationControllerError,
}) : super(key: key); }) : super(key: key);
final GlobalKey<FormState> formKey; final GlobalKey<FormState> formKey;
final TextEditingController complaintsController; final TextEditingController complaintsController;
final TextEditingController illnessController; final TextEditingController illnessController;
final TextEditingController medicationController; final TextEditingController medicationController;
final String complaintsControllerError;
final String illnessControllerError;
final String medicationControllerError;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Form( return Form(
key: formKey, key: formKey,
child: Column(children: [ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox( SizedBox(
height: 20, height: 20,
), ),
//TODO handel error cases
Container( NewTextFields(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
),
child: NewTextFields(
hintText: TranslationBase.of(context).addChiefComplaints, hintText: TranslationBase.of(context).addChiefComplaints,
controller: complaintsController, 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, maxLines: 25,
minLines: 13, minLines: 3,
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;
}),
), ),
Container(
child: CustomValidationError(
error: complaintsControllerError,
)),
// 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( SizedBox(
height: 20, height: 20,
), ),
Container(
margin: NewTextFields(
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText:
illnessController.text != '' ? true : false,
showLabelText: true,
hintText: TranslationBase hintText: TranslationBase
.of(context) .of(context)
.historyOfPresentIllness, .historyOfPresentIllness,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: illnessController, controller: illnessController,
validator: (value) { maxLines: 25,
if (value == null || value == "") minLines: 3,
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
), ),
Container(
child: CustomValidationError(error: illnessControllerError,)),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
@ -114,32 +103,16 @@ class UpdateChiefComplaints extends StatelessWidget {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( NewTextFields(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText: medicationController.text != ''
? true
: false,
showLabelText: true,
hintText: TranslationBase hintText: TranslationBase
.of(context) .of(context)
.currentMedications, .currentMedications,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 23,
minLines: 10,
controller: medicationController, controller: medicationController,
validator: (value) { maxLines: 25,
if (value == null || value == "") minLines: 3,
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
), ),
Container(child: CustomValidationError(
error: medicationControllerError,)),
SizedBox( SizedBox(
height: 10, 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:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.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';
import '../custom_validation_error.dart'; import '../custom_validation_error.dart';
@ -40,17 +41,19 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
return Column( return Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context).addMedication, hintText: TranslationBase.of(context).addMedication,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5, fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () { onTapTextFields: () {
openMedicationList(context); openMedicationList(context);
}, },
readOnly: true, readOnly: true,
// hintColor: Colors.black, // hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor, suffixIconColor: Color(0xFF2B353E),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController, // controller: messageController,
validator: (value) { 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_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_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_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_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/material.dart'; import 'package:flutter/material.dart';
@ -53,7 +51,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
TextEditingController illnessController = TextEditingController(); TextEditingController illnessController = TextEditingController();
TextEditingController complaintsController = TextEditingController(); TextEditingController complaintsController = TextEditingController();
TextEditingController medicationController = TextEditingController(); TextEditingController medicationController = TextEditingController();
String complaintsControllerError = '';
String medicationControllerError = '';
String illnessControllerError = '';
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
getHistory(SOAPViewModel model) async { getHistory(SOAPViewModel model) async {
@ -235,16 +235,23 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
height: 30, height: 30,
), ),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase headerTitle: TranslationBase.of(context)
.of(context)
.chiefComplaints .chiefComplaints
.toUpperCase(), ,
onTap: () { onTap: () {
setState(() { setState(() {
isChiefExpand = !isChiefExpand; 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, isExpanded: isChiefExpand,
), ),
SizedBox( SizedBox(
@ -255,8 +262,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase headerTitle: TranslationBase
.of(context) .of(context)
.histories .histories,
.toUpperCase(),
onTap: () { onTap: () {
setState(() { setState(() {
isHistoryExpand = !isHistoryExpand; isHistoryExpand = !isHistoryExpand;
@ -278,7 +284,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
headerTitle: TranslationBase headerTitle: TranslationBase
.of(context) .of(context)
.allergiesSoap .allergiesSoap
.toUpperCase(), ,
onTap: () { onTap: () {
setState(() { setState(() {
isAllergiesExpand = !isAllergiesExpand; isAllergiesExpand = !isAllergiesExpand;
@ -356,7 +362,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
formKey.currentState.save(); formKey.currentState.save();
formKey.currentState.validate(); formKey.currentState.validate();
complaintsControllerError = '';
medicationControllerError = '';
illnessControllerError = '';
if (complaintsController.text.isNotEmpty && if (complaintsController.text.isNotEmpty &&
illnessController.text.isNotEmpty && illnessController.text.isNotEmpty &&
complaintsController.text.length > 25) { complaintsController.text.length > 25) {
@ -382,6 +390,29 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.changePageViewIndex(1); widget.changePageViewIndex(1);
} else { } 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 helpers.showErrorToast(TranslationBase
.of(context) .of(context)
.chiefComplaintErrorMsg); .chiefComplaintErrorMsg);

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.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/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.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/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.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/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/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.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_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:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class UpdateObjectivePage extends StatefulWidget { class UpdateObjectivePage extends StatefulWidget {
@ -33,8 +36,13 @@ class UpdateObjectivePage extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination; final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
UpdateObjectivePage( UpdateObjectivePage(
{Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState}); {Key key,
this.changePageViewIndex,
this.mySelectedExamination,
this.patientInfo,
this.changeLoadingState});
@override @override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState(); _UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -55,6 +63,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
)), )),
); );
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
@ -97,30 +106,55 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
// baseViewModel: model, // baseViewModel: model,
body: Column(
body: SingleChildScrollView( mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container(
color: Color.fromRGBO(248, 248, 248, 1),
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.9, 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,
)),
),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox(
height: 30,
),
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).physicalSystemExamination, 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 variant: isSysExaminationExpand
? "bodyText" ? "bodyText"
: '', : '',
bold: isSysExaminationExpand ? true : false, bold: isSysExaminationExpand
color: Colors.black), ? true
: false,
color: Colors.black),*/
Icon( Icon(
FontAwesomeIcons.asterisk, FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor, color: AppGlobal.appPrimaryColor,
@ -136,8 +170,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
}); });
}, },
child: Icon(isSysExaminationExpand child: Icon(isSysExaminationExpand
? EvaIcons.minus ? Icons.keyboard_arrow_up
: EvaIcons.plus)) : Icons.keyboard_arrow_down))
], ],
), ),
bodyWidget: Column(children: [ bodyWidget: Column(children: [
@ -147,18 +181,21 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Column( Column(
children: [ children: [
Container( Container(
margin: margin: EdgeInsets.only(
EdgeInsets.only(left: 10, right: 10, top: 15), left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context).physicalSystemExamination, hintText: TranslationBase.of(context)
.physicalSystemExamination,
fontSize: 13.5, fontSize: 13.5,
onTapTextFields: () { onTapTextFields: () {
openExaminationList(context); openExaminationList(context);
}, },
readOnly: true, readOnly: true,
// hintColor: Colors.black, // hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon:
suffixIconColor: AppGlobal.appPrimaryColor, EvaIcons.plusCircleOutline,
suffixIconColor:
AppGlobal.appPrimaryColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {
@ -173,9 +210,12 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
height: 20, height: 20,
), ),
Column( Column(
children: children: widget.mySelectedExamination
widget.mySelectedExamination.map((examination) { .map((examination) {
TextEditingController remarksController= TextEditingController(text :examination.remark); TextEditingController
remarksController =
TextEditingController(
text: examination.remark);
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -183,11 +223,13 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
child: Column(children: [ child: Column(children: [
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment
.spaceBetween,
children: [ children: [
Texts( Texts(
( examination (examination
.selectedExamination.nameEn ) .selectedExamination
.nameEn)
.toUpperCase(), .toUpperCase(),
variant: "bodyText", variant: "bodyText",
bold: true, bold: true,
@ -199,44 +241,46 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment
.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
InkWell( InkWell(
child: Center( child: Center(
child: Container( child: Container(
height: height: screenSize
screenSize.height * .height *
0.070, 0.070,
decoration: decoration: containerBorderDecoration(
containerBorderDecoration(
examination examination
.isNormal .isNormal
? Color( ? Color(
0xFF515A5D) 0xFF515A5D)
: Colors : Colors
.white, .white,
Colors.grey), Colors
.grey),
child: Center( child: Center(
child: Padding( child:
Padding(
padding: padding:
const EdgeInsets const EdgeInsets.all(
.all(8.0), 8.0),
child: Text( child: Text(
TranslationBase.of(context).normal, TranslationBase.of(
style: TextStyle( context)
fontSize: 12, .normal,
color: style:
examination TextStyle(
.isNormal fontSize:
12,
color: examination.isNormal
? Colors.white ? Colors.white
: Colors : Colors.black,
.black,
//Colors.black, //Colors.black,
fontWeight: fontWeight:
FontWeight FontWeight.bold,
.bold,
), ),
), ),
), ),
@ -244,11 +288,15 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
examination.isAbnormal = examination
.isAbnormal =
false; false;
examination.isNormal = examination
.isNormal =
true; true;
examination.notExamined = false; examination
.notExamined =
false;
}); });
}), }),
SizedBox( SizedBox(
@ -257,37 +305,38 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
InkWell( InkWell(
child: Center( child: Center(
child: Container( child: Container(
height: height: screenSize
screenSize.height * .height *
0.070, 0.070,
decoration: decoration: containerBorderDecoration(
containerBorderDecoration(
examination examination
.isAbnormal .isAbnormal
? Color( ? Color(
0xFF515A5D) 0xFF515A5D)
: Colors : Colors
.white, .white,
Colors.black), Colors
.black),
child: Center( child: Center(
child: Padding( child:
Padding(
padding: padding:
const EdgeInsets const EdgeInsets.all(
.all(8.0), 8.0),
child: Text( child: Text(
TranslationBase.of(context).abnormal, TranslationBase.of(
style: TextStyle( context)
fontSize: 12, .abnormal,
color: style:
examination TextStyle(
.isAbnormal fontSize:
12,
color: examination.isAbnormal
? Colors.white ? Colors.white
: Colors : Colors.black,
.black,
//Colors.black, //Colors.black,
fontWeight: fontWeight:
FontWeight FontWeight.bold,
.bold,
), ),
), ),
), ),
@ -295,49 +344,53 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
examination.isNormal = examination
.isNormal =
false; false;
examination.isAbnormal = examination
.isAbnormal =
true; true;
examination.notExamined = false; examination
.notExamined =
false;
}); });
}),SizedBox( }),
SizedBox(
width: 12, width: 12,
), ),
InkWell( InkWell(
child: Center( child: Center(
child: Container( child: Container(
height: height: screenSize
screenSize.height * .height *
0.070, 0.070,
decoration: decoration: containerBorderDecoration(
containerBorderDecoration(
examination examination
.notExamined .notExamined
? Color( ? Color(
0xFF515A5D) 0xFF515A5D)
: Colors : Colors
.white, .white,
Colors.black), Colors
.black),
child: Center( child: Center(
child: Padding( child:
Padding(
padding: padding:
const EdgeInsets const EdgeInsets.all(
.all(8.0), 8.0),
child: Text( child: Text(
"Not Examined", "Not Examined",
style: TextStyle( style:
fontSize: 12, TextStyle(
color: fontSize:
examination 12,
.notExamined color: examination.notExamined
? Colors.white ? Colors.white
: Colors : Colors.black,
.black,
//Colors.black, //Colors.black,
fontWeight: fontWeight:
FontWeight FontWeight.bold,
.bold,
), ),
), ),
), ),
@ -345,24 +398,28 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
examination.isAbnormal = examination
.isAbnormal =
false; false;
examination.isNormal = examination
.isNormal =
false; false;
examination.notExamined = true; examination
.notExamined =
true;
}); });
}), }),
], ],
), ),
InkWell( InkWell(
child: Icon( child: Icon(
FontAwesomeIcons.trash, FontAwesomeIcons.trash,
color: Colors.grey, color: Colors.grey,
size: 20, size: 20,
), ),
onTap: () => removeExamination( onTap: () => removeExamination(
examination.selectedExamination), examination
.selectedExamination),
) )
], ],
), ),
@ -373,21 +430,31 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 0, right: 0, top: 15), left: 0, right: 0, top: 15),
child: TextFields( child: TextFields(
hasLabelText: remarksController.text != ''?true:false, hasLabelText:
remarksController
.text !=
''
? true
: false,
showLabelText: true, showLabelText: true,
hintText: TranslationBase.of(context).remarks, hintText:
TranslationBase.of(
context)
.remarks,
fontSize: 13.5, fontSize: 13.5,
// hintColor: Colors.black, // hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
maxLines: 25, maxLines: 25,
minLines: 4, minLines: 4,
controller: remarksController, controller:
remarksController,
onChanged: (val) { onChanged: (val) {
examination.remark = val; examination.remark = val;
}, },
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase.of(context) return TranslationBase
.of(context)
.emptyMessage; .emptyMessage;
else else
return null; return null;
@ -404,43 +471,70 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
]), ]),
isExpand: isSysExaminationExpand, isExpand: isSysExaminationExpand,
), ),
DividerWithSpacesAround(height: 30,), ],
AppButton( ),
),
),
),
),
),
),
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,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
color: HexColor("#A5A5A5"),
fontColor: HexColor("#5A5A5A"),
fontWeight: FontWeight.bold,
onPressed: () async { onPressed: () async {
await submitUpdateObjectivePage(model); await submitUpdateObjectivePage(model);
}, },
), ),
SizedBox(
height: 30,
), ),
], ],
), ),
), ),
), ],
))); )));
} }
submitUpdateObjectivePage(SOAPViewModel model) async { submitUpdateObjectivePage(SOAPViewModel model) async {
if (widget.mySelectedExamination.isNotEmpty) {
if(widget.mySelectedExamination.isNotEmpty){
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel(); PostPhysicalExamRequestModel postPhysicalExamRequestModel =
new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) { widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null) null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = []; postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
[];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add( postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
ListHisProgNotePhysicalExaminationVM( .add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '', remarks: exam.remark ?? '',
createdBy: exam.createdBy??doctorProfile.doctorID, createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(), createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID, editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(), editedOn: DateTime.now().toIso8601String(),
@ -450,15 +544,20 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
isNormal: exam.isNormal, isNormal: exam.isNormal,
// masterDescription: exam.selectedExamination, // masterDescription: exam.selectedExamination,
notExamined: exam.notExamined, notExamined: exam.notExamined,
examinationType: exam.isNormal?1:exam.isAbnormal?2:3, examinationType: exam.isNormal
examinationTypeName: exam.isNormal?"Normal":exam.isAbnormal?'AbNormal':"Not Examined", ? 1
isNew:exam.isNew : 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); await model.postPhysicalExam(postPhysicalExamRequestModel);
} else { } else {
await model.patchPhysicalExam(postPhysicalExamRequestModel); await model.patchPhysicalExam(postPhysicalExamRequestModel);
@ -482,8 +581,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
removeExamination(MasterKeyModel masterKey) { removeExamination(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> history = widget.mySelectedExamination Iterable<MySelectedExamination> history = widget.mySelectedExamination
.where( .where((element) =>
(element) =>
masterKey.id == element.selectedExamination.id && masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId); masterKey.typeId == element.selectedExamination.typeId);
@ -494,11 +592,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
} }
openExaminationList(BuildContext context) { openExaminationList(BuildContext context) {
final screenSize = MediaQuery final screenSize = MediaQuery.of(context).size;
.of(context) InputDecoration textFieldSelectorDecoration(
.size; String hintText, String selectedText, bool isDropDown) {
InputDecoration textFieldSelectorDecoration(String hintText,
String selectedText, bool isDropDown) {
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -533,7 +629,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Navigator.of(context).pop(); 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 { class AddExaminationDailog extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination; final List<MySelectedExamination> mySelectedExamination;
final Function addSelectedExamination; final Function addSelectedExamination;
final Function (MasterKeyModel) removeExamination; final Function(MasterKeyModel) removeExamination;
const AddExaminationDailog( const AddExaminationDailog(
{Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination}) {Key key,
this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination})
: super(key: key); : super(key: key);
@override @override
@ -559,12 +659,11 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
child: BaseView<SOAPViewModel>( child: BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) { if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup( await model
MasterKeysService.PhysicalExamination); .getMasterLookup(MasterKeysService.PhysicalExamination);
} }
}, },
builder: (_, model, w) => builder: (_, model, w) => AppScaffold(
AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
body: Center( body: Center(
@ -587,29 +686,30 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
), ),
MasterKeyCheckboxSearchWidget( MasterKeyCheckboxSearchWidget(
model: model, model: model,
hintSearchText: TranslationBase.of(context).searchExamination, hintSearchText:
buttonName: TranslationBase.of(context).addExamination, TranslationBase.of(context).searchExamination,
buttonName:
TranslationBase.of(context).addExamination,
masterList: model.physicalExaminationList, masterList: model.physicalExaminationList,
removeHistory: (history){ removeHistory: (history) {
setState(() { setState(() {
widget.removeExamination(history); widget.removeExamination(history);
}); });
}, },
addHistory: (history){ addHistory: (history) {
setState(() { setState(() {
MySelectedExamination mySelectedExamination = new MySelectedExamination( MySelectedExamination mySelectedExamination =
selectedExamination: history new MySelectedExamination(
); selectedExamination: history);
widget widget.mySelectedExamination
.mySelectedExamination .add(mySelectedExamination);
.add(
mySelectedExamination);
}); });
}, },
addSelectedHistories: (){ addSelectedHistories: () {
widget.addSelectedExamination(); widget.addSelectedExamination();
}, },
isServiceSelected: (master) =>isServiceSelected(master), isServiceSelected: (master) =>
isServiceSelected(master),
), ),
]), ]),
))), ))),
@ -618,10 +718,8 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
} }
isServiceSelected(MasterKeyModel masterKey) { isServiceSelected(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> exam = Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
widget (element) =>
.mySelectedExamination
.where((element) =>
masterKey.id == element.selectedExamination.id && masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId); masterKey.typeId == element.selectedExamination.typeId);
if (exam.length > 0) { if (exam.length > 0) {

@ -77,7 +77,7 @@ class TextFields extends StatefulWidget {
this.hasBorder = true, this.hasBorder = true,
this.onTapTextFields, this.onTapTextFields,
this.hasLabelText = false, this.hasLabelText = false,
this.showLabelText = false}) this.showLabelText = false, this.borderRadius= 8.0, this.borderColor, this.borderWidth = 1, })
: super(key: key); : super(key: key);
final String hintText; final String hintText;
@ -116,6 +116,9 @@ class TextFields extends StatefulWidget {
final Color fillColor; final Color fillColor;
final bool hasBorder; final bool hasBorder;
final bool showLabelText; final bool showLabelText;
Color borderColor;
final double borderRadius;
final double borderWidth;
bool hasLabelText; bool hasLabelText;
@override @override
@ -200,6 +203,8 @@ class _TextFieldsState extends State<TextFields> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
widget.borderColor = widget.borderColor?? Colors.grey;
return (AnimatedContainer( return (AnimatedContainer(
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
decoration: widget.bare decoration: widget.bare
@ -276,6 +281,7 @@ class _TextFieldsState extends State<TextFields> {
hintText: widget.hintText, hintText: widget.hintText,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: widget.fontSize, fontSize: widget.fontSize,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor, color: widget.hintColor ?? Theme.of(context).hintColor,
), ),
@ -304,7 +310,7 @@ class _TextFieldsState extends State<TextFields> {
width: 1.0) width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
@ -315,28 +321,28 @@ class _TextFieldsState extends State<TextFields> {
.withOpacity(widget.bare ? 0.0 : 0.5), .withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0) width: 1.0)
: BorderSide(color: Colors.transparent, width: 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( focusedBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
disabledBorder: OutlineInputBorder( disabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0)), : BorderRadius.circular(0.0)),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : 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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
class NumberTextInputFormatter extends TextInputFormatter { class NumberTextInputFormatter extends TextInputFormatter {
@override @override
@ -70,8 +71,8 @@ class NewTextFields extends StatefulWidget {
this.prefixIcon, this.prefixIcon,
this.bare = false, this.bare = false,
this.onTap, this.onTap,
this.fontSize = 16.0, this.fontSize = 15.0,
this.fontWeight = FontWeight.w700, this.fontWeight = FontWeight.w500,
this.autoValidate = false, this.autoValidate = false,
this.hintColor, this.hintColor,
this.isEnabled = true}) this.isEnabled = true})
@ -158,9 +159,15 @@ class _NewTextFieldsState extends State<NewTextFields> {
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
color: Colors.white), color: Colors.white),
child: Container( child: Container(
margin: EdgeInsets.only(top: 8), margin: EdgeInsets.only(top: 8),
padding: EdgeInsets.only(top: 8),
child: TextFormField( child: TextFormField(
enabled: widget.isEnabled, enabled: widget.isEnabled,
initialValue: widget.initialValue, initialValue: widget.initialValue,
@ -190,7 +197,7 @@ class _NewTextFieldsState extends State<NewTextFields> {
validator: widget.validator, validator: widget.validator,
onSaved: widget.onSaved, onSaved: widget.onSaved,
style: Theme.of(context).textTheme.body2.copyWith( 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 inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[ ? <TextInputFormatter>[
WhitelistingTextInputFormatter.digitsOnly, WhitelistingTextInputFormatter.digitsOnly,
@ -200,7 +207,7 @@ class _NewTextFieldsState extends State<NewTextFields> {
decoration: InputDecoration( decoration: InputDecoration(
labelText: widget.hintText, labelText: widget.hintText,
labelStyle: labelStyle:
TextStyle(color: Theme.of(context).textTheme.bodyText1.color), TextStyle(color: Color(0xFF2E303A), fontSize:15,fontWeight: FontWeight.w700),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context).errorColor.withOpacity(0.5), color: Theme.of(context).errorColor.withOpacity(0.5),

Loading…
Cancel
Save