change the font type in the app and Prescription

merge-requests/395/head
Mohammad Aljammal 4 years ago
parent 2bd505290d
commit d45b8a9cc5

@ -40,6 +40,10 @@ class ProcedureViewModel extends BaseViewModel {
filterType == FilterType.Clinic filterType == FilterType.Clinic
? _finalRadiologyListClinic ? _finalRadiologyListClinic
: _finalRadiologyListHospital; : _finalRadiologyListHospital;
List<FinalRadiology> get radiologyList =>
_radiologyService.finalRadiologyList;
List<LabOrderResult> get labOrdersResultsList => List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList; _labsService.labOrdersResultsList;

@ -61,7 +61,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.grey, primarySwatch: Colors.grey,
primaryColor: Colors.grey, primaryColor: Colors.grey,
buttonColor: HexColor('#B8382C'), buttonColor: HexColor('#B8382C'),
fontFamily: 'WorkSans', fontFamily: 'Poppins',
dividerColor: Colors.grey[350], dividerColor: Colors.grey[350],
backgroundColor: Color.fromRGBO(255, 255, 255, 1), backgroundColor: Color.fromRGBO(255, 255, 255, 1),
), ),

@ -37,6 +37,7 @@ class RadiologyDetailsPage extends StatelessWidget {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
PatientProfileHeaderWhitAppointment(patient: patient, PatientProfileHeaderWhitAppointment(patient: patient,
patientType: patientType??"0", patientType: patientType??"0",
arrivalType: arrivalType??"0", arrivalType: arrivalType??"0",
@ -46,10 +47,9 @@ class RadiologyDetailsPage extends StatelessWidget {
profileUrl: finalRadiology.doctorImageURL, profileUrl: finalRadiology.doctorImageURL,
invoiceNO: finalRadiology.invoiceNo.toString(), invoiceNO: finalRadiology.invoiceNo.toString(),
), ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.2,
),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
@ -60,14 +60,18 @@ class RadiologyDetailsPage extends StatelessWidget {
SizedBox(height: 5,), SizedBox(height: 5,),
Texts(TranslationBase.of(context).generalResult), Texts(TranslationBase.of(context).generalResult),
SizedBox(height: 5,), SizedBox(height: 5,),
Texts( Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'${finalRadiology.reportData}', '${finalRadiology.reportData}',
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 17, fontSize: 17,
color: Colors.grey, color: Colors.grey,
), ),
),
SizedBox(height: 25,), SizedBox(height: 25,),
Container( Center(
child: Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: Button(
color: Colors.red, color: Colors.red,
@ -77,6 +81,7 @@ class RadiologyDetailsPage extends StatelessWidget {
title: TranslationBase.of(context).openRad, title: TranslationBase.of(context).openRad,
), ),
), ),
),
], ],
), ),
), ),

@ -26,7 +26,7 @@ class RadiologyHomePage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
ProcedureViewModel model2 = ProcedureViewModel();
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient), onModelReady: (model) => model.getPatientRadOrders(patient),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -39,7 +39,7 @@ class RadiologyHomePage extends StatelessWidget {
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
children: <Widget>[ children: <Widget>[
PatientProfileHeaderNewDesign( PatientProfileHeaderNewDesign(
patient, patient.patientType.toString() ?? '0', patientType), patient, patient.patientType.toString() ?? '0', arrivalType),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -108,38 +108,26 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
), ),
...List.generate( ...List.generate(model.radiologyList.length, (index) => InkWell(
model.finalRadiologyList.length,
(index) => AppExpandableNotifier(
title: model.finalRadiologyList[index].filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: model
.finalRadiologyList[index].finalRadiologyList
.map((radiology) {
return InkWell(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: RadiologyDetailsPage( page: RadiologyDetailsPage(
finalRadiology: radiology, finalRadiology: model.radiologyList[index],
patient: patient, patient: patient,
), ),
), ),
), ),
child: DoctorCard( child: DoctorCard(
doctorName: radiology.doctorName, doctorName: model.radiologyList[index].doctorName,
profileUrl: radiology.doctorImageURL, profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${radiology.invoiceNo}', invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${radiology.projectName}', branch: '${model.radiologyList[index].projectName}',
appointmentDate: radiology.orderDate, appointmentDate: model.radiologyList[index].orderDate,
orderNo: radiology.orderNo.toString(), orderNo: model.radiologyList[index].orderNo.toString(),
), ),
);
}).toList(),
)), )),
)
], ],
), ),
), ),

@ -5,7 +5,9 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_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/screens/prescription/prescription_details_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_details_page.dart';
import 'package:doctor_app_flutter/util/date-utils.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/patient_profile_header_with_appointment_card.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
@ -15,7 +17,9 @@ import 'package:flutter/material.dart';
class PrescriptionItemsPage extends StatelessWidget { class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions; final Prescriptions prescriptions;
final PatiantInformtion patient; final PatiantInformtion patient;
PrescriptionItemsPage({Key key, this.prescriptions, this.patient}); final String patientType;
final String arrivalType;
PrescriptionItemsPage({Key key, this.prescriptions, this.patient, this.patientType, this.arrivalType});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -23,14 +27,28 @@ class PrescriptionItemsPage extends StatelessWidget {
onModelReady: (model) => onModelReady: (model) =>
model.getPrescriptionReport(prescriptions: prescriptions,patient: patient), model.getPrescriptionReport(prescriptions: prescriptions,patient: patient),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: false,
appBarTitle: TranslationBase.of(context).prescriptions,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Container( PatientProfileHeaderWhitAppointment(patient: patient,
patientType: patientType??"0",
arrivalType: arrivalType??"0",
branch: '',
clinic: prescriptions.clinicDescription,
isPrescriptions: true,
appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate),
doctorName: prescriptions.doctorName,
profileUrl: prescriptions.doctorImageURL,
// invoiceNO: widget.patientLabOrders.invoiceNo,
),
if (!prescriptions.isInOutPatient)
...List.generate(
model.prescriptionReportList.length,
(index) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: Colors.white, color: Colors.white,
@ -43,7 +61,8 @@ class PrescriptionItemsPage extends StatelessWidget {
children: [ children: [
Container( Container(
margin: EdgeInsets.only(left: 18,right: 18), margin: EdgeInsets.only(left: 18,right: 18),
child: Texts('Name ',bold: true,)), child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty ? model.prescriptionReportList[index].itemDescription : model.prescriptionReportList[index].itemDescriptionN,bold: true,)),
SizedBox(height: 12,),
Row( Row(
children: [ children: [
SizedBox(width: 18,), SizedBox(width: 18,),
@ -52,17 +71,34 @@ class PrescriptionItemsPage extends StatelessWidget {
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all(width: 0.5,color: Colors.grey) border: Border.all(width: 0.5,color: Colors.grey)
), ),
height: 45, height: 55,
width: 45, width: 55,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.network(
model.prescriptionReportList[index].imageSRCUrl,
fit: BoxFit.cover,
),
),
), ),
SizedBox(width: 10,), SizedBox(width: 10,),
Expanded(child: Column( Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts('Route: Monthly'), Row(
Texts('Does: 2 Time a day with 1 hour gap'), children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportList[index].routeN)),
],
),
Row(
children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportList[index].frequencyN ?? ''),
],
),
SizedBox(height: 12,), SizedBox(height: 12,),
Texts('Note: 2 Time a day with 1 hour gap'), Texts(model.prescriptionReportList[index].remarks ?? ''),
], ],
),) ),)
@ -72,144 +108,70 @@ class PrescriptionItemsPage extends StatelessWidget {
], ],
), ),
), ),
), ))
if (!prescriptions.isInOutPatient) else
...List.generate( ...List.generate(
model.prescriptionReportList.length, model.prescriptionReportEnhList.length,
(index) => InkWell( (index) => Container(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport:
model.prescriptionReportList[index],
),
),
),
child: Container(
width: double.infinity,
margin:
EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: Colors.grey[200], width: 0.5),
), ),
child: Row( margin: EdgeInsets.all(12),
children: <Widget>[
ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportList[index]
.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Column(
child: Texts(model crossAxisAlignment: CrossAxisAlignment.start,
.prescriptionReportList[index] children: [
.itemDescription Container(
.isNotEmpty margin: EdgeInsets.only(left: 18,right: 18),
? model.prescriptionReportList[index] child: Texts(model.prescriptionReportEnhList[index].itemDescription,bold: true,),),
.itemDescription SizedBox(height: 12,),
: model.prescriptionReportList[index] Row(
.itemDescriptionN)), mainAxisAlignment: MainAxisAlignment.start,
)), crossAxisAlignment: CrossAxisAlignment.center,
Icon( children: [
Icons.arrow_forward_ios, SizedBox(width: 18,),
size: 18, Container(
color: Colors.grey[500], decoration: BoxDecoration(
) shape: BoxShape.circle,
], border: Border.all(width: 0.5,color: Colors.grey)
),
),
))
else
...List.generate(
model.prescriptionReportEnhList.length,
(index) => InkWell(
onTap: () {
PrescriptionReport prescriptionReport =
PrescriptionReport(
imageSRCUrl: model
.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model
.prescriptionReportEnhList[index]
.itemDescription,
itemDescriptionN: model
.prescriptionReportEnhList[index]
.itemDescription,
routeN:
model.prescriptionReportEnhList[index].route,
frequency: model
.prescriptionReportEnhList[index].frequency,
frequencyN: model
.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model
.prescriptionReportEnhList[index]
.doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID:
model.prescriptionReportEnhList[index].itemID,
remarks: model
.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
),
), ),
); height: 55,
}, width: 55,
child: Container( child: Padding(
margin: EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
color: Colors.white,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network( child: Image.network(
model model.prescriptionReportEnhList[index].imageSRCUrl,
.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover, fit: BoxFit.cover,
width: 60,
height: 70,
), ),
), ),
SizedBox(
width: 10,
), ),
Expanded( SizedBox(width: 10,),
child: Padding( Expanded(child: Column(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: [
Texts(model.prescriptionReportEnhList[index] Row(
.itemDescription), children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportEnhList[index].route??'')),
], ],
), ),
Row(
children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportEnhList[index].frequency ?? ''),
],
), ),
), SizedBox(height: 12,),
Icon( Texts(model.prescriptionReportEnhList[index].remarks?? ''),
Icons.arrow_forward_ios, ],
size: 18, ),)
color: Colors.grey[500],
],
) )
], ],
), ),
@ -217,6 +179,8 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
), ),
], ],
), ),
), ),

@ -91,6 +91,8 @@ class PrescriptionsPage extends StatelessWidget {
page: PrescriptionItemsPage( page: PrescriptionItemsPage(
prescriptions: model.prescriptionsList[index], prescriptions: model.prescriptionsList[index],
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
), ),
@ -98,10 +100,9 @@ class PrescriptionsPage extends StatelessWidget {
doctorName: model.prescriptionsList[index].doctorName, doctorName: model.prescriptionsList[index].doctorName,
profileUrl: model.prescriptionsList[index].doctorImageURL, profileUrl: model.prescriptionsList[index].doctorImageURL,
branch: model.prescriptionsList[index].name, branch: model.prescriptionsList[index].name,
clinic: model.prescriptionsList[index].clinicDescription,
isPrescriptions: true,
appointmentDate: DateUtils.getDateTimeFromServerFormat(model.prescriptionsList[index].appointmentDate,), appointmentDate: DateUtils.getDateTimeFromServerFormat(model.prescriptionsList[index].appointmentDate,),
orderNo: model.prescriptionsList[index].appointmentNo.toString(),
invoiceNO:model.prescriptionsList[index].appointmentNo.toString(),
) )
)) ))

@ -28,7 +28,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
} }
TextEditingController procedureController = TextEditingController(); TextEditingController procedureController = TextEditingController();
//TODO Jammal
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;

@ -22,7 +22,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5), left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -188,9 +188,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient convertDateFormat2(patient.appointmentDate.toString()?? ''),
.appointmentDate
.toString()),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -314,8 +312,9 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String timeConvert; String newDate;
const start = "/Date("; const start = "/Date(";
if (str.isNotEmpty) {
const end = "+0300)"; const end = "+0300)";
final startIndex = str.indexOf(start); final startIndex = str.indexOf(start);
@ -323,11 +322,12 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
}
return newDate.toString(); return newDate.toString();
} }

@ -26,7 +26,8 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
final String profileUrl; final String profileUrl;
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final bool isPrescriptions;
final String clinic;
PatientProfileHeaderWhitAppointment( PatientProfileHeaderWhitAppointment(
{this.patient, {this.patient,
this.patientType, this.patientType,
@ -36,7 +37,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
this.appointmentDate, this.appointmentDate,
this.profileUrl, this.profileUrl,
this.invoiceNO, this.invoiceNO,
this.orderNo}); this.orderNo, this.isPrescriptions = false, this.clinic});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -209,9 +210,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient convertDateFormat2(patient.appointmentDate??''),
.appointmentDate
.toString()),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -371,7 +370,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if (orderNo != null) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -383,7 +382,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
) )
], ],
), ),
if (invoiceNO != null) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -395,10 +394,34 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
) )
], ],
), ),
if(isPrescriptions)
Row(
children: [
Texts(
'Branch:',
color: Colors.grey[800],
),
Texts(
branch?? '',
)
],
),
if(isPrescriptions)
Row(
children: [
Texts(
'Clinic:',
color: Colors.grey[800],
),
Texts(
clinic?? '',
)
],
),
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
'Result Date:', !isPrescriptions? 'Result Date:': 'Prescriptions Date',
color: Colors.grey[800], color: Colors.grey[800],
), ),
Expanded( Expanded(
@ -425,20 +448,22 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String timeConvert; String newDate ="";
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
if (str.isNotEmpty) {
final startIndex = str.indexOf(start); final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length); final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
}
return newDate.toString(); return newDate.toString();
} }

@ -217,6 +217,7 @@ class _TextsState extends State<Texts> {
letterSpacing: letterSpacing:
widget.variant == "overline" ? 1.5 : null, widget.variant == "overline" ? 1.5 : null,
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: 'Poppins',
decoration: decoration:
widget.textDecoration //TextDecoration.lineThrough widget.textDecoration //TextDecoration.lineThrough
)), )),
@ -251,7 +252,7 @@ class _TextsState extends State<Texts> {
style: _getFontStyle().copyWith( style: _getFontStyle().copyWith(
color: HexColor('#FF0000'), color: HexColor('#FF0000'),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: "WorkSans", fontFamily: "Poppins",
)), )),
), ),
), ),

@ -138,7 +138,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
color: Colors.white, color: Colors.white,
fontSize: 17.0, fontSize: 17.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: "WorkSans")), fontFamily: "Poppins")),
) )
], ],
), ),

@ -25,7 +25,7 @@ class AppText extends StatefulWidget {
{this.color = Colors.black, {this.color = Colors.black,
this.fontWeight = FontWeight.normal, this.fontWeight = FontWeight.normal,
this.fontSize, this.fontSize,
this.fontFamily = 'WorkSans', this.fontFamily = 'Poppins',
this.margin, this.margin,
this.marginTop = 0, this.marginTop = 0,
this.marginRight = 0, this.marginRight = 0,

@ -19,6 +19,8 @@ class DoctorCard extends StatelessWidget {
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final Function onTap; final Function onTap;
final bool isPrescriptions;
final String clinic;
DoctorCard( DoctorCard(
{this.doctorName, {this.doctorName,
@ -27,7 +29,7 @@ class DoctorCard extends StatelessWidget {
this.invoiceNO, this.invoiceNO,
this.onTap, this.onTap,
this.appointmentDate, this.appointmentDate,
this.orderNo}); this.orderNo, this.isPrescriptions=false, this.clinic});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -67,6 +69,7 @@ class DoctorCard extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if(!isPrescriptions)
Texts( Texts(
'${DateUtils.getHour(appointmentDate)}', '${DateUtils.getHour(appointmentDate)}',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -96,7 +99,7 @@ class DoctorCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (orderNo != null) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -108,7 +111,7 @@ class DoctorCard extends StatelessWidget {
) )
], ],
), ),
if (invoiceNO != null) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -120,6 +123,19 @@ class DoctorCard extends StatelessWidget {
) )
], ],
), ),
if(isPrescriptions)
Row(
children: <Widget>[
Texts(
'Clinic:',
color: Colors.grey[500],
),
Texts(
clinic,
)
],
),
if(branch!=null)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -135,7 +151,7 @@ class DoctorCard extends StatelessWidget {
), ),
), ),
Icon( Icon(
EvaIcons.eye, isPrescriptions? Icons.arrow_forward: EvaIcons.eye,
) )
], ],
), ),

@ -121,19 +121,19 @@ flutter:
# list giving the asset and other descriptors for the font. For # list giving the asset and other descriptors for the font. For
# example: # example:
fonts: fonts:
- family: WorkSans
fonts:
- asset: assets/fonts/Work_Sans/WorkSans-Regular.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
weight: 700
- family: Poppins - family: Poppins
fonts: fonts:
- asset: assets/fonts/Poppins/Poppins-Regular.ttf - asset: assets/fonts/Poppins/Poppins-Regular.ttf
weight: 400
- asset: assets/fonts/Poppins/Poppins-Medium.ttf - asset: assets/fonts/Poppins/Poppins-Medium.ttf
weight: 500
- asset: assets/fonts/Poppins/Poppins-Bold.ttf - asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 700 weight: 700
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 800
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 900
# - family: Trajan Pro # - family: Trajan Pro

Loading…
Cancel
Save