Merge branch 'new_design_sikander' into development_new_design_2.0

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

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

@ -17,14 +17,16 @@ class DoctorView extends StatelessWidget {
final DoctorList doctor; final DoctorList doctor;
bool isLiveCareAppointment; bool isLiveCareAppointment;
bool isShowFlag; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InkWell( return InkWell(
onTap: () { onTap: onTap ??
if (isShowFlag) getDoctorsProfile(context, doctor,isAppo: true); () {
if (isShowFlag) getDoctorsProfile(context, doctor, isAppo: true);
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(

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

@ -24,39 +24,24 @@ class CardCommonContact extends StatelessWidget {
onTap: () { onTap: () {
navigateToSearch(context, this.type); navigateToSearch(context, this.type);
}, },
child: child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
// MedicalProfileItem( decoration: BoxDecoration(
// imagePath: image, borderRadius: BorderRadius.circular(15),
// title: text, color: Colors.white,
// subTitle: subText, border: Border.all(
// isPngImage: true, color: Color(0xffefefef),
// ) width: 1,
),
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( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Container( Image.asset(this.image, width: 42.0, height: 42.0),
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), Text(
child: Texts(this.text, text + "${subText.isEmpty ? "" : "\n$subText"}",
// overflow: TextOverflow.clip, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
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),
),
), ),
], ],
), ),

@ -21,7 +21,6 @@ class ErOptions extends StatefulWidget {
const ErOptions({Key key, this.isAppbar}) : super(key: key); const ErOptions({Key key, this.isAppbar}) : super(key: key);
@override @override
_ErOptionsState createState() => _ErOptionsState(); _ErOptionsState createState() => _ErOptionsState();
} }
@ -32,13 +31,12 @@ class _ErOptionsState extends State<ErOptions> {
@override @override
void initState() { void initState() {
locationUtils = locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
new LocationUtils(isShowConfirmDialog: true, context: context); WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context); projectViewModel = Provider.of<ProjectViewModel>(context);
@ -48,90 +46,133 @@ class _ErOptionsState extends State<ErOptions> {
isShowAppBar: widget.isAppbar, isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false, isShowDecPage: false,
body: Container( showNewAppBar: true,
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), showNewAppBarTitle: true,
child: Column( backgroundColor: Color(0xffF8F8F8),
crossAxisAlignment: CrossAxisAlignment.start, body: GridView(
children: <Widget>[ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
Container( padding: EdgeInsets.all(21),
height: 170, shrinkWrap: true,
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), children: [
child: Row( CardCommonEr(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
child: CardCommonEr(
image: 'assets/images/new-design/AM.PNG', image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).ambulancerequest, text: TranslationBase.of(context).ambulancerequest,
subText: TranslationBase.of(context).requestA, subText: TranslationBase.of(context).requestA,
onTap: (){ onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: AmbulanceReq()));
context,
FadePage(
page: AmbulanceReq()));
}, },
),
), ),
Expanded( CardCommonEr(
child: CardCommonEr(
image: 'assets/images/new-design/emergency_icon.png', image: 'assets/images/new-design/emergency_icon.png',
text: TranslationBase.of(context).nearester, text: TranslationBase.of(context).nearester,
subText: TranslationBase.of(context).locationa, subText: TranslationBase.of(context).locationa,
onTap:(){ onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: NearestEr()));
context,
FadePage(
page: NearestEr()));
}), }),
CardCommonEr(
)
],
),
),
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', image: 'assets/images/new-design/AM.PNG',
text:'ED service', text: 'ED service',
subText: 'ED service', subText: 'ED service',
onTap: (){ onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: DdServicesPage()));
context,
FadePage(page: DdServicesPage())
);
}, },
),
), ),
Expanded( CardCommonEr(
child: CardCommonEr(
locked: rrtLocked, locked: rrtLocked,
image: 'assets/images/new-design/AM.PNG', image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).rrtService, text: TranslationBase.of(context).rrtService,
subText: TranslationBase.of(context).rapidResponseTeam, subText: TranslationBase.of(context).rapidResponseTeam,
onTap:(){ onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: RRTMainScreen()));
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 'package:flutter/material.dart';
import '../AmbulanceReq.dart';
import '../NearestEr.dart';
class CardCommonEr extends StatelessWidget { class CardCommonEr extends StatelessWidget {
final image; final image;
final text; final text;
@ -13,8 +7,7 @@ class CardCommonEr extends StatelessWidget {
final bool locked; final bool locked;
final Function onTap; final Function onTap;
const CardCommonEr( const CardCommonEr({
{
this.locked = false, this.locked = false,
@required this.image, @required this.image,
@required this.text, @required this.text,
@ -31,51 +24,38 @@ class CardCommonEr extends StatelessWidget {
child: Stack( child: Stack(
children: [ children: [
Container( Container(
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0), width: double.infinity,
decoration: BoxDecoration(boxShadow: [ padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0) decoration: BoxDecoration(
], borderRadius: BorderRadius.circular(10), color: Colors.white), borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Container( Image.asset(this.image, width: 42.0, height: 42.0),
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), Text(
child: Text(this.text, text + "${subText.isEmpty ? "" : "\n$subText"}",
overflow: TextOverflow.clip, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
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),
), ),
], ],
), ),
), ),
if(locked) if (locked) Align(alignment: Alignment.center, child: lock())
Align( ],
alignment: Alignment.center,
child: lock()
)
] ,
), ),
), ),
); );
} }
Widget lock(){ Widget lock() {
return Container(child: Icon(Icons.lock_rounded, size: 80),); return Container(
child: Icon(Icons.lock_rounded, size: 80),
);
} }
} }

@ -89,74 +89,6 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ 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( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
@ -192,7 +124,9 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
}, },
), ),
SizedBox(height: 10), SizedBox(height: 10),
TabBar( Material(
color: Color(0xffF8F8F8),
child: TabBar(
onTap: (index) { onTap: (index) {
setState(() { setState(() {
if (index == 1) { if (index == 1) {
@ -217,8 +151,6 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
], ],
controller: _tabController, controller: _tabController,
), ),
],
),
), ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.87, height: MediaQuery.of(context).size.height * 0.87,

@ -20,12 +20,12 @@ class AskDoctorPage extends StatelessWidget {
onModelReady: (model) => model.getMyDoctor(), onModelReady: (model) => model.getMyDoctor(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, 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( return ListView.separated(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 12),
@ -64,6 +64,21 @@ class AskDoctorPage extends StatelessWidget {
return DoctorView( return DoctorView(
doctor: doctorList, doctor: doctorList,
isLiveCareAppointment: false, 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), separatorBuilder: (context, index) => SizedBox(height: 14),

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

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

@ -40,7 +40,7 @@ class DoctorHeader extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 21), padding: EdgeInsets.only(left: 21, right: 21, bottom: 12),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -57,6 +57,7 @@ class DoctorHeader extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (_speciality.isNotEmpty)
Text( Text(
_speciality, _speciality,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
@ -70,14 +71,17 @@ class DoctorHeader extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
if (headerModel.date != null) Text( if (headerModel.date != null)
Text(
DateUtil.formatDateToDate(headerModel.date), DateUtil.formatDateToDate(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
if (headerModel.time != null) Text( if (headerModel.time != null)
Text(
headerModel.time ?? DateUtil.formatDateToTime(headerModel.date), headerModel.time ?? DateUtil.formatDateToTime(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
if (headerModel?.nationalityFlagURL != null)
Padding( Padding(
padding: const EdgeInsets.only(top: 8.0), padding: const EdgeInsets.only(top: 8.0),
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16), child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16),
@ -87,7 +91,7 @@ class DoctorHeader extends StatelessWidget {
], ],
), ),
), ),
if(headerModel.actualDoctorRate!=null) if (headerModel.actualDoctorRate != null)
SizedBox( SizedBox(
height: 43, height: 43,
child: Row( child: Row(

Loading…
Cancel
Save