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,21 +60,26 @@ 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(
'${finalRadiology.reportData}', padding: const EdgeInsets.all(8.0),
textAlign: TextAlign.start, child: Texts(
fontSize: 17, '${finalRadiology.reportData}',
color: Colors.grey, textAlign: TextAlign.start,
fontSize: 17,
color: Colors.grey,
),
), ),
SizedBox(height: 25,), SizedBox(height: 25,),
Container( Center(
width: MediaQuery.of(context).size.width * 0.8, child: Container(
child: Button( width: MediaQuery.of(context).size.width * 0.8,
color: Colors.red, child: Button(
onTap: () { color: Colors.red,
launch(model.radImageURL); onTap: () {
}, launch(model.radImageURL);
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, onTap: () => Navigator.push(
(index) => AppExpandableNotifier( context,
title: model.finalRadiologyList[index].filterName, FadePage(
bodyWidget: Column( page: RadiologyDetailsPage(
crossAxisAlignment: CrossAxisAlignment.start, finalRadiology: model.radiologyList[index],
mainAxisAlignment: MainAxisAlignment.spaceBetween, patient: patient,
children: model ),
.finalRadiologyList[index].finalRadiologyList ),
.map((radiology) { ),
return InkWell( child: DoctorCard(
onTap: () => Navigator.push( doctorName: model.radiologyList[index].doctorName,
context, profileUrl: model.radiologyList[index].doctorImageURL,
FadePage( invoiceNO: '${model.radiologyList[index].invoiceNo}',
page: RadiologyDetailsPage( branch: '${model.radiologyList[index].projectName}',
finalRadiology: radiology, appointmentDate: model.radiologyList[index].orderDate,
patient: patient, orderNo: model.radiologyList[index].orderNo.toString(),
), ),
), )),
),
child: DoctorCard(
doctorName: radiology.doctorName,
profileUrl: radiology.doctorImageURL,
invoiceNO: '${radiology.invoiceNo}',
branch: '${radiology.projectName}',
appointmentDate: radiology.orderDate,
orderNo: radiology.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,199 +27,159 @@ 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,
decoration: BoxDecoration( patientType: patientType??"0",
borderRadius: BorderRadius.circular(12), arrivalType: arrivalType??"0",
color: Colors.white, branch: '',
), clinic: prescriptions.clinicDescription,
margin: EdgeInsets.all(12), isPrescriptions: true,
child: Padding( appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate),
padding: const EdgeInsets.all(8.0), doctorName: prescriptions.doctorName,
child: Column( profileUrl: prescriptions.doctorImageURL,
crossAxisAlignment: CrossAxisAlignment.start, // invoiceNO: widget.patientLabOrders.invoiceNo,
children: [
Container(
margin: EdgeInsets.only(left: 18,right: 18),
child: Texts('Name ',bold: true,)),
Row(
children: [
SizedBox(width: 18,),
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(width: 0.5,color: Colors.grey)
),
height: 45,
width: 45,
),
SizedBox(width: 10,),
Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Route: Monthly'),
Texts('Does: 2 Time a day with 1 hour gap'),
SizedBox(height: 12,),
Texts('Note: 2 Time a day with 1 hour gap'),
],
),)
],
)
],
),
),
), ),
if (!prescriptions.isInOutPatient) if (!prescriptions.isInOutPatient)
...List.generate( ...List.generate(
model.prescriptionReportList.length, model.prescriptionReportList.length,
(index) => InkWell( (index) => Container(
onTap: () => Navigator.push( decoration: BoxDecoration(
context, borderRadius: BorderRadius.circular(12),
FadePage( color: Colors.white,
page: PrescriptionDetailsPage(
prescriptionReport:
model.prescriptionReportList[index],
),
),
), ),
child: Container( margin: EdgeInsets.all(12),
width: double.infinity, child: Padding(
margin: padding: const EdgeInsets.all(8.0),
EdgeInsets.only(top: 10, left: 10, right: 10), child: Column(
padding: EdgeInsets.all(8.0), crossAxisAlignment: CrossAxisAlignment.start,
decoration: BoxDecoration( children: [
color: Colors.white, Container(
borderRadius: BorderRadius.all( margin: EdgeInsets.only(left: 18,right: 18),
Radius.circular(10.0), child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty ? model.prescriptionReportList[index].itemDescription : model.prescriptionReportList[index].itemDescriptionN,bold: true,)),
), SizedBox(height: 12,),
border: Border.all( Row(
color: Colors.grey[200], width: 0.5), children: [
), SizedBox(width: 18,),
child: Row( Container(
children: <Widget>[ decoration: BoxDecoration(
ClipRRect( shape: BoxShape.circle,
borderRadius: border: Border.all(width: 0.5,color: Colors.grey)
BorderRadius.all(Radius.circular(5)), ),
child: Image.network( height: 55,
model.prescriptionReportList[index] width: 55,
.imageSRCUrl, child: Padding(
fit: BoxFit.cover, padding: const EdgeInsets.all(8.0),
width: 60, child: Image.network(
height: 70, model.prescriptionReportList[index].imageSRCUrl,
), fit: BoxFit.cover,
), ),
SizedBox( ),
width: 10, ),
), SizedBox(width: 10,),
Expanded( Expanded(child: Column(
child: Padding( crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.all(8.0), children: [
child: Center( Row(
child: Texts(model children: [
.prescriptionReportList[index] Texts(TranslationBase.of(context).route,color: Colors.grey,),
.itemDescription Expanded(child: Texts(model.prescriptionReportList[index].routeN)),
.isNotEmpty ],
? model.prescriptionReportList[index] ),
.itemDescription Row(
: model.prescriptionReportList[index] children: [
.itemDescriptionN)), Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
)), Texts(model.prescriptionReportList[index].frequencyN ?? ''),
Icon( ],
Icons.arrow_forward_ios, ),
size: 18, SizedBox(height: 12,),
color: Colors.grey[500], Texts(model.prescriptionReportList[index].remarks ?? ''),
],
),)
],
) )
], ],
), ),
), ),
)) ))
else else
...List.generate( ...List.generate(
model.prescriptionReportEnhList.length, model.prescriptionReportEnhList.length,
(index) => InkWell( (index) => Container(
onTap: () { decoration: BoxDecoration(
PrescriptionReport prescriptionReport = borderRadius: BorderRadius.circular(12),
PrescriptionReport( color: Colors.white,
imageSRCUrl: model ),
.prescriptionReportEnhList[index].imageSRCUrl, margin: EdgeInsets.all(12),
itemDescription: model child: Padding(
.prescriptionReportEnhList[index] padding: const EdgeInsets.all(8.0),
.itemDescription, child: Column(
itemDescriptionN: model crossAxisAlignment: CrossAxisAlignment.start,
.prescriptionReportEnhList[index] children: [
.itemDescription, Container(
routeN: margin: EdgeInsets.only(left: 18,right: 18),
model.prescriptionReportEnhList[index].route, child: Texts(model.prescriptionReportEnhList[index].itemDescription,bold: true,),),
frequency: model SizedBox(height: 12,),
.prescriptionReportEnhList[index].frequency, Row(
frequencyN: model mainAxisAlignment: MainAxisAlignment.start,
.prescriptionReportEnhList[index].frequency, crossAxisAlignment: CrossAxisAlignment.center,
doseDailyQuantity: model children: [
.prescriptionReportEnhList[index] SizedBox(width: 18,),
.doseDailyQuantity, Container(
days: model.prescriptionReportEnhList[index].days, decoration: BoxDecoration(
itemID: shape: BoxShape.circle,
model.prescriptionReportEnhList[index].itemID, border: Border.all(width: 0.5,color: Colors.grey)
remarks: model ),
.prescriptionReportEnhList[index].remarks); height: 55,
Navigator.push( width: 55,
context, child: Padding(
FadePage( padding: const EdgeInsets.all(8.0),
page: PrescriptionDetailsPage( child: Image.network(
prescriptionReport: prescriptionReport, model.prescriptionReportEnhList[index].imageSRCUrl,
), fit: BoxFit.cover,
),
),
),
SizedBox(width: 10,),
Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
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,),
Texts(model.prescriptionReportEnhList[index].remarks?? ''),
],
),)
],
)
],
), ),
);
},
child: Container(
margin: EdgeInsets.all(8.0),
color: Colors.white,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model
.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.prescriptionReportEnhList[index]
.itemDescription),
],
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
), ),
), ),
), ),
),
], ],
), ),

@ -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,20 +312,22 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String timeConvert; String newDate;
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; if (str.isNotEmpty) {
const end = "+0300)";
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();
} }

@ -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)";
final startIndex = str.indexOf(start); if (str.isNotEmpty) {
final endIndex = str.indexOf(end, startIndex + start.length); final startIndex = str.indexOf(start);
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
- asset: assets/fonts/Poppins/Poppins-Medium.ttf weight: 400
- asset: assets/fonts/Poppins/Poppins-Bold.ttf - asset: assets/fonts/Poppins/Poppins-Medium.ttf
weight: 700 weight: 500
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
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