Merge branch 'new_design_sikander' into development_new_design_2.0

merge-update-with-lab-changes
Sikander Saleem 4 years ago
commit 6a86d8d1c1

@ -83,15 +83,11 @@ class _QRCodeState extends State<QRCode> {
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset(
"assets/images/nfc/ic_nfc.png"),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
),
onTap: () {
showNfcReader(context,
onNcfScan: (String nfcId) {
Future.delayed(
const Duration(milliseconds: 100),
() {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
});
@ -125,23 +121,14 @@ class _QRCodeState extends State<QRCode> {
child: Row(
children: <Widget>[
Container(
margin:
EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0),
child: Image.asset(
"assets/images/new-design/device_icon.png",
width: MediaQuery.of(context).size.width / 3.4,
height: MediaQuery.of(context).size.width / 3.4),
margin: EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0),
child: Image.asset("assets/images/new-design/device_icon.png", width: MediaQuery.of(context).size.width / 3.4, height: MediaQuery.of(context).size.width / 3.4),
),
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital,
style: TextStyle(
color: Colors.red[700],
fontSize: 18.0,
fontWeight: FontWeight.bold)),
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)),
),
),
],
@ -155,13 +142,8 @@ class _QRCodeState extends State<QRCode> {
),
),
Container(
margin: EdgeInsets.only(
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).appoInfo,
style: TextStyle(
fontSize: 18.0,
color: Colors.grey[700],
fontWeight: FontWeight.bold)),
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(left: 20.0, bottom: 20.0),
@ -176,37 +158,20 @@ class _QRCodeState extends State<QRCode> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.doctorNameObj,
style: TextStyle(
fontSize: 18.0,
color: Colors.grey[700],
fontWeight: FontWeight.bold)),
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(
bottom: 10.0, left: 20.0, right: 20.0),
child: Text(
getDoctorSpeciality(
widget.patientShareResponse.doctorSpeciality),
style: TextStyle(
fontSize: 18.0, color: Colors.grey[700])),
margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(
top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.projectName,
style: TextStyle(
fontSize: 18.0, color: Colors.grey[700])),
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(
top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(
getDate(widget.patientShareResponse.appointmentDate),
style: TextStyle(
fontSize: 18.0, color: Colors.grey[700])),
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDate(widget.patientShareResponse.appointmentDate), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
],
),
@ -233,9 +198,7 @@ class _QRCodeState extends State<QRCode> {
// getAppoQR(context);
sendEmail();
},
child: Text(
TranslationBase.of(context).sendEmail.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).sendEmail.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
),
],
@ -262,9 +225,7 @@ class _QRCodeState extends State<QRCode> {
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).close.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).close.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
),
],
@ -281,8 +242,7 @@ class _QRCodeState extends State<QRCode> {
DoctorsListService service = new DoctorsListService();
if (await widget.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await widget.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await widget.sharedPref.getObject(USER_PROFILE));
setState(() {
widget.authUser = data;
});
@ -290,24 +250,14 @@ class _QRCodeState extends State<QRCode> {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: "Send a copy of this QR to the email " +
widget.authUser.emailAddress +
"?",
confirmMessage: "Send a copy of this QR to the email " + widget.authUser.emailAddress + "?",
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () {
GifLoaderDialogUtils.showMyDialog(context);
service
.sendAppointmentQREmail(
widget.authUser.emailAddress,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo.toString(),
widget.patientShareResponse.doctorNameObj,
widget.patientShareResponse.projectName,
widget.appoQR,
getDoctorSpeciality(
widget.patientShareResponse.doctorSpeciality),
context)
.sendAppointmentQREmail(widget.authUser.emailAddress, widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo.toString(),
widget.patientShareResponse.doctorNameObj, widget.patientShareResponse.projectName, widget.appoQR, getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context);
@ -326,8 +276,7 @@ class _QRCodeState extends State<QRCode> {
Navigator.of(context).pushNamed(HOME);
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID,
DoctorList docObject) {}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {}
String getDate(String appoDate) {
var appoDateFormatted = "";
@ -367,10 +316,7 @@ class _QRCodeState extends State<QRCode> {
DoctorsListService service = new DoctorsListService();
service
.sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId,
widget.patientShareResponse.projectID, context)
.then((res) {
service.sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId, widget.patientShareResponse.projectID, context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);

@ -17,15 +17,17 @@ class DoctorView extends StatelessWidget {
final DoctorList doctor;
bool isLiveCareAppointment;
bool isShowFlag;
final VoidCallback onTap;
DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isShowFlag = true});
DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isShowFlag = true, this.onTap});
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
if (isShowFlag) getDoctorsProfile(context, doctor,isAppo: true);
},
onTap: onTap ??
() {
if (isShowFlag) getDoctorsProfile(context, doctor, isAppo: true);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(

@ -35,7 +35,7 @@ class _ContactUsPageState extends State<ContactUsPage> {
body: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(top: 25),
padding: EdgeInsets.all(21),
shrinkWrap: true,
children: [
CardCommonContact(

@ -24,39 +24,24 @@ class CardCommonContact extends StatelessWidget {
onTap: () {
navigateToSearch(context, this.type);
},
child:
// MedicalProfileItem(
// imagePath: image,
// title: text,
// subTitle: subText,
// isPngImage: true,
// )
Container(
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Texts(this.text,
// overflow: TextOverflow.clip,
color: secondaryColor,
fontWeight: FontWeight.w700,
fontSize: 20.0),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
child: Texts(this.subText, color: Colors.black, fontSize: 15.0),
),
Align(
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0),
),
Image.asset(this.image, width: 42.0, height: 42.0),
Text(
text + "${subText.isEmpty ? "" : "\n$subText"}",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
),
],
),

@ -21,7 +21,6 @@ class ErOptions extends StatefulWidget {
const ErOptions({Key key, this.isAppbar}) : super(key: key);
@override
_ErOptionsState createState() => _ErOptionsState();
}
@ -32,13 +31,12 @@ class _ErOptionsState extends State<ErOptions> {
@override
void initState() {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
super.initState();
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
@ -48,90 +46,133 @@ class _ErOptionsState extends State<ErOptions> {
isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
height: 170,
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
child: CardCommonEr(
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).ambulancerequest,
subText: TranslationBase.of(context).requestA,
onTap: (){
Navigator.push(
context,
FadePage(
page: AmbulanceReq()));
},
),
),
Expanded(
child: CardCommonEr(
image: 'assets/images/new-design/emergency_icon.png',
text: TranslationBase.of(context).nearester,
subText: TranslationBase.of(context).locationa,
onTap:(){
Navigator.push(
context,
FadePage(
page: NearestEr()));
}),
)
],
),
),
Container(
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
height: 170,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
child: CardCommonEr(
image: 'assets/images/new-design/AM.PNG',
text:'ED service',
subText: 'ED service',
onTap: (){
Navigator.push(
context,
FadePage(page: DdServicesPage())
);
},
),
),
Expanded(
child: CardCommonEr(
locked: rrtLocked,
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).rrtService,
subText: TranslationBase.of(context).rapidResponseTeam,
onTap:(){
Navigator.push(
context,
FadePage(
page: RRTMainScreen()));
}),
)
],
),
),
],
),
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),
body: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21),
shrinkWrap: true,
children: [
CardCommonEr(
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).ambulancerequest,
subText: TranslationBase.of(context).requestA,
onTap: () {
Navigator.push(context, FadePage(page: AmbulanceReq()));
},
),
CardCommonEr(
image: 'assets/images/new-design/emergency_icon.png',
text: TranslationBase.of(context).nearester,
subText: TranslationBase.of(context).locationa,
onTap: () {
Navigator.push(context, FadePage(page: NearestEr()));
}),
CardCommonEr(
image: 'assets/images/new-design/AM.PNG',
text: 'ED service',
subText: 'ED service',
onTap: () {
Navigator.push(context, FadePage(page: DdServicesPage()));
},
),
CardCommonEr(
locked: rrtLocked,
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).rrtService,
subText: TranslationBase.of(context).rapidResponseTeam,
onTap: () {
Navigator.push(context, FadePage(page: RRTMainScreen()));
}),
],
),
//
// body: Container(
// margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
//
// Container(
// height: 170,
// margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.start,
// children: <Widget>[
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/AM.PNG',
// text: TranslationBase.of(context).ambulancerequest,
// subText: TranslationBase.of(context).requestA,
// onTap: (){
// Navigator.push(
// context,
// FadePage(
// page: AmbulanceReq()));
// },
//
// ),
// ),
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/emergency_icon.png',
// text: TranslationBase.of(context).nearester,
// subText: TranslationBase.of(context).locationa,
// onTap:(){
// Navigator.push(
// context,
// FadePage(
// page: NearestEr()));
// }),
//
// )
// ],
// ),
// ),
// Container(
// margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
// height: 170,
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.start,
// children: <Widget>[
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/AM.PNG',
// text:'ED service',
// subText: 'ED service',
// onTap: (){
// Navigator.push(
// context,
// FadePage(page: DdServicesPage())
// );
// },
//
// ),
// ),
// Expanded(
// child: CardCommonEr(
// locked: rrtLocked,
// image: 'assets/images/new-design/AM.PNG',
// text: TranslationBase.of(context).rrtService,
// subText: TranslationBase.of(context).rapidResponseTeam,
// onTap:(){
// Navigator.push(
// context,
// FadePage(
// page: RRTMainScreen()));
// }),
// )
// ],
// ),
// ),
// ],
// ),
// ),
);
}
}

@ -1,11 +1,5 @@
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import '../AmbulanceReq.dart';
import '../NearestEr.dart';
class CardCommonEr extends StatelessWidget {
final image;
final text;
@ -13,14 +7,13 @@ class CardCommonEr extends StatelessWidget {
final bool locked;
final Function onTap;
const CardCommonEr(
{
this.locked = false,
@required this.image,
@required this.text,
@required this.subText,
@required this.onTap,
});
const CardCommonEr({
this.locked = false,
@required this.image,
@required this.text,
@required this.subText,
@required this.onTap,
});
@override
Widget build(BuildContext context) {
@ -31,51 +24,38 @@ class CardCommonEr extends StatelessWidget {
child: Stack(
children: [
Container(
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
decoration: BoxDecoration(boxShadow: [
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Text(this.text,
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xFFc5272d),
letterSpacing: 1.0,
fontSize: 20.0)),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
child: Text(this.subText,
overflow: TextOverflow.clip,
style: TextStyle(
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
),
Spacer(),
Container(
alignment: Alignment.bottomRight,
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0),
width: double.infinity,
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(this.image, width: 42.0, height: 42.0),
Text(
text + "${subText.isEmpty ? "" : "\n$subText"}",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
),
],
),
),
),
if(locked)
Align(
alignment: Alignment.center,
child: lock()
)
] ,
if (locked) Align(alignment: Alignment.center, child: lock())
],
),
),
);
}
Widget lock(){
return Container(child: Icon(Icons.lock_rounded, size: 80),);
Widget lock() {
return Container(
child: Icon(Icons.lock_rounded, size: 80),
);
}
}

@ -89,135 +89,67 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// Container(
// margin: EdgeInsets.only(top: 20.0),
// alignment: Alignment.center,
// child: ClipRRect(
// borderRadius: BorderRadius.circular(100.0),
// child: Image.network(widget.appo.doctorImageURL, fit: BoxFit.fill, height: 120.0, width: 120.0),
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
// alignment: Alignment.center,
// child:
// Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, color: Colors.grey[900], letterSpacing: 1.0)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// alignment: Alignment.center,
// child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality), style: TextStyle(fontSize: 12.0, color: Colors.grey[900], letterSpacing: 1.0)),
// ),
// Container(
// margin: EdgeInsets.only(top: 5.0),
// alignment: Alignment.center,
// child: RatingBar.readOnly(
// initialRating: widget.appo.actualDoctorRate.toDouble(),
// size: 35.0,
// filledColor: Colors.yellow[700],
// emptyColor: Colors.grey[500],
// isHalfAllowed: true,
// halfFilledIcon: Icons.star_half,
// filledIcon: Icons.star,
// emptyIcon: Icons.star,
// ),
// ),
// InkWell(
// onTap: () {
// getDoctorRatingsDetails();
// },
// child: Container(
// margin: EdgeInsets.only(top: 5.0),
// alignment: Alignment.center,
// child: Text("(" + widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews + ")",
// style: TextStyle(
// fontSize: 14.0,
// color: Colors.blue[800],
// letterSpacing: 1.0,
// decoration: TextDecoration.underline,
// )),
// ),
// ),
// Container(
// alignment: Alignment.center,
// child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(DateUtil.convertStringToDate(widget.appo.appointmentDate), projectViewModel.isArabic ? "ar" : "en")),
// ),
// Container(
// alignment: Alignment.center,
// child: Text(widget.appo.startTime.substring(0, 5)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// child: Divider(
// color: Colors.grey[500],
// ),
// ),
DoctorHeader(
headerModel: HeaderModel(
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
widget.appo.doctorImageURL,
widget.appo.doctorSpeciality,
"",
widget.appo.projectName,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.startTime.substring(0, 5),
null,
widget.appo.doctorRate,
widget.appo.actualDoctorRate,
widget.appo.noOfPatientsRate,
"",
//model.user.emailAddress,
),
isNeedToShowButton: _tabController.index == 1,
buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
onRatingAndReviewTap: getDoctorRatingsDetails,
onTap: () {
Navigator.push(
context,
FadePage(
page: SchedulePage(doctorList: doctorList, appo: widget.appo),
),
).then((value) {
setState(() {
widget.doctorSchedule = value;
});
});
},
),
SizedBox(height: 10),
TabBar(
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor) {
_tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
AppointmentDetails.showFooterButton = true;
}
}
});
},
tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor
? Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)
: Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.black)),
)
],
controller: _tabController,
DoctorHeader(
headerModel: HeaderModel(
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
widget.appo.doctorImageURL,
widget.appo.doctorSpeciality,
"",
widget.appo.projectName,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.startTime.substring(0, 5),
null,
widget.appo.doctorRate,
widget.appo.actualDoctorRate,
widget.appo.noOfPatientsRate,
"",
//model.user.emailAddress,
),
isNeedToShowButton: _tabController.index == 1,
buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
onRatingAndReviewTap: getDoctorRatingsDetails,
onTap: () {
Navigator.push(
context,
FadePage(
page: SchedulePage(doctorList: doctorList, appo: widget.appo),
),
).then((value) {
setState(() {
widget.doctorSchedule = value;
});
});
},
),
SizedBox(height: 10),
Material(
color: Color(0xffF8F8F8),
child: TabBar(
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor) {
_tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
AppointmentDetails.showFooterButton = true;
}
}
});
},
tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor
? Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)
: Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.black)),
)
],
controller: _tabController,
),
),
Container(

@ -20,12 +20,12 @@ class AskDoctorPage extends StatelessWidget {
onModelReady: (model) => model.getMyDoctor(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
body: _appointmentExpandableList(model.patientDoctorAppointmentListHospital),
body: _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model),
),
);
}
Widget _appointmentExpandableList(List<PatientDoctorAppointmentList> _patientDoctorAppointmentList) {
Widget _appointmentExpandableList(List<PatientDoctorAppointmentList> _patientDoctorAppointmentList, model) {
return ListView.separated(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 12),
@ -64,6 +64,21 @@ class AskDoctorPage extends StatelessWidget {
return DoctorView(
doctor: doctorList,
isLiveCareAppointment: false,
onTap: () {
model.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((value) {
if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) {
// Navigator.pop(context);
Navigator.push(
context,
FadePage(
page: RequestTypePage(doctorList: _doctor),
),
);
} else {
AppToast.showErrorToast(message: model.error);
}
});
},
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),

@ -43,16 +43,13 @@ class _RequestTypePageState extends State<RequestTypePage> {
(index) => Container(
width: double.maxFinite,
height: 55,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0)),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8.0)),
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
setState(() {
selected = model.askDoctorReqTypes[index].description;
parameterCode =
model.askDoctorReqTypes[index].parameterCode;
parameterCode = model.askDoctorReqTypes[index].parameterCode;
});
},
child: Row(
@ -60,8 +57,7 @@ class _RequestTypePageState extends State<RequestTypePage> {
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
model.askDoctorReqTypes[index].description),
child: Text(model.askDoctorReqTypes[index].description),
),
Radio(
value: model.askDoctorReqTypes[index].description,
@ -70,8 +66,7 @@ class _RequestTypePageState extends State<RequestTypePage> {
onChanged: (value) {
setState(() {
selected = value;
parameterCode = model
.askDoctorReqTypes[index].parameterCode;
parameterCode = model.askDoctorReqTypes[index].parameterCode;
});
},
),
@ -113,14 +108,8 @@ class _RequestTypePageState extends State<RequestTypePage> {
loading: model.state == ViewState.BusyLocal,
textColor: Colors.white,
onTap: () {
model
.sendRequestLOV(
doctorList: widget.doctorList,
requestType: parameterCode.toString(),
remark: question)
.then((value) {
if (model.state != ViewState.ErrorLocal ||
model.state != ViewState.Error) {
model.sendRequestLOV(doctorList: widget.doctorList, requestType: parameterCode.toString(), remark: question).then((value) {
if (model.state != ViewState.ErrorLocal || model.state != ViewState.Error) {
Navigator.pop(context);
}
});

@ -53,7 +53,7 @@ class PrescriptionItemsPage extends StatelessWidget {
"",
prescriptions.name,
DateUtil.convertStringToDate(prescriptions.appointmentDate),
null,
DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
prescriptions.nationalityFlagURL,
prescriptions.doctorRate,
prescriptions.actualDoctorRate,

@ -40,7 +40,7 @@ class DoctorHeader extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 21),
padding: EdgeInsets.only(left: 21, right: 21, bottom: 12),
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@ -57,10 +57,11 @@ class DoctorHeader extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_speciality,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (_speciality.isNotEmpty)
Text(
_speciality,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
headerModel.invoiceNo.isNotEmpty ? myRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo) : Container(),
myRichText(TranslationBase.of(context).branch, headerModel.projectName),
],
@ -70,89 +71,92 @@ class DoctorHeader extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
if (headerModel.date != null) Text(
DateUtil.formatDateToDate(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel.time != null) Text(
headerModel.time ?? DateUtil.formatDateToTime(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16),
),
if (headerModel.date != null)
Text(
DateUtil.formatDateToDate(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel.time != null)
Text(
headerModel.time ?? DateUtil.formatDateToTime(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel?.nationalityFlagURL != null)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16),
),
],
)
],
),
),
if(headerModel.actualDoctorRate!=null)
SizedBox(
height: 43,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: onRatingAndReviewTap,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 21),
RatingBar.readOnly(
initialRating: headerModel.actualDoctorRate + 0.0,
size: 15.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
SizedBox(width: 6),
Text(
"${headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12,
decoration: onRatingAndReviewTap != null ? TextDecoration.underline : null,
if (headerModel.actualDoctorRate != null)
SizedBox(
height: 43,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: onRatingAndReviewTap,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 21),
RatingBar.readOnly(
initialRating: headerModel.actualDoctorRate + 0.0,
size: 15.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
),
],
),
),
isNeedToShowButton
? InkWell(
onTap: () {
if (showConfirmMessageDialog)
showConfirmMessage(context, onTap, headerModel.email);
else
onTap();
},
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
decoration: BoxDecoration(color: Color(0XFFD02127), borderRadius: BorderRadius.only(topLeft: Radius.circular(10))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
SizedBox(width: 6),
Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 25 / 16),
),
],
SizedBox(width: 6),
Text(
"${headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12,
decoration: onRatingAndReviewTap != null ? TextDecoration.underline : null,
),
),
)
: Container(),
],
),
)
],
),
),
isNeedToShowButton
? InkWell(
onTap: () {
if (showConfirmMessageDialog)
showConfirmMessage(context, onTap, headerModel.email);
else
onTap();
},
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
decoration: BoxDecoration(color: Color(0XFFD02127), borderRadius: BorderRadius.only(topLeft: Radius.circular(10))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
SizedBox(width: 6),
Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 25 / 16),
),
],
),
),
)
: Container(),
],
),
)
],
),
);

Loading…
Cancel
Save