LiveCare design fixes

merge-requests/459/head
haroon amjad 4 years ago
parent 3b4e12a5de
commit 2cff7c3246

@ -1290,7 +1290,7 @@ const Map localizedValues = {
"pay-options": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
"livecare-service": {"en": "LiveCare Service", "ar": "خدمة لايف كير"},
"livecare-service-desc": {"en": "is to obtain medical advice with a specialist doctor Via a video call", "ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو"},
"why-livecare": {"en": "WHY LIVECARE", "ar": "لماذا خدمة اللايف كير"},
"why-livecare": {"en": "Why LiveCare?", "ar": "?لماذا خدمة اللايف كير"},
"livecare-point-1": {"en": "No need to wait you will get Medical consultation immediately via Video call", "ar": "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو"},
"doc-virtual-appo-ins4": {"en": "The doctor will see your medical file", "ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كامل"},
"doc-virtual-appo-ins5": {"en": "Free prescription delivery service", "ar": "خدمة توصيل الادوية مجانا"},
@ -1298,7 +1298,7 @@ const Map localizedValues = {
"en": "** The service is included with some insurance companies according to the terms and conditions with our best wishes for health and wellness",
"ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية"
},
"livecare-option-1": {"en": "Get Medical consultation immediately", "ar": "الحصول على الاستشارة فورا"},
"livecare-option-1": {"en": "Get consultation immediately", "ar": "الحصول على الاستشارة فورا"},
"livecare-option-2": {"en": "Instant video call", "ar": "اتصال فيديو فوري"},
"livecare-option-3": {"en": "Book Appointment", "ar": "حجز موعد"},
"livecare-option-4": {"en": "Schedule video call", "ar": "اتصال فيديو مجدول"},

@ -70,15 +70,6 @@ class _PaymentMethodState extends State<PaymentMethod> {
padding: EdgeInsets.all(7.0),
child: Image.asset("assets/images/new/payment/Mada.png"),
),
// mWidth(12),
// Text(
// "Mada",
// style: TextStyle(
// color: Colors.black,
// fontSize: 14,
// fontWeight: FontWeight.bold,
// ),
// ),
mFlex(1),
if (selectedPaymentMethod == "MADA")
Container(

@ -1,7 +1,5 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
@ -62,7 +60,24 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
body: Container(
child: Column(children: [
TabBar(
labelColor: Colors.black,
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20),
labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [
Tab(
child: Text(
@ -87,7 +102,6 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
),
),
],
controller: _tabController,
),
Expanded(
child: TabBarView(

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -28,188 +29,71 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).livecare.toUpperCase(),
// appBar: AppBar(
// leading: InkWell(
// onTap: () {
// Navigator.pop(context, null);
// },
// child: Icon(
// Icons.close,
// color: Colors.white,
// ),
// ),
// title: Text(TranslationBase.of(context).bookAppo,
// style: TextStyle(color: Colors.white)),
// ),
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 20.0, right: 20.0),
margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(child: Text(TranslationBase.of(context).livecareService, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
alignment: Alignment.center,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0),
child: Image.asset(
languageID == 'ar'
? "assets/images/new-design/liveCare_ar_bg.png"
: "assets/images/new-design/liveCare_en_bg.png",
width: 120),
),
Container(
alignment: Alignment.center,
child: Text(TranslationBase.of(context).livecareService,
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))),
Container(
margin: EdgeInsets.only(top: 0.0),
alignment: Alignment.center,
child: Text(
TranslationBase.of(context).livecareServiceDesc,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18.0))),
margin: EdgeInsets.only(top: 7.0),
child: Text(TranslationBase.of(context).livecareServiceDesc, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Text(TranslationBase.of(context).whyLivecare,
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))),
margin: EdgeInsets.only(top: 20.0),
child: Text(TranslationBase.of(context).whyLivecare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
margin: EdgeInsets.only(top: 0.0, left: 20.0),
child: Row(
children: <Widget>[
SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25),
SvgPicture.asset("assets/images/new-design/allow.svg", width: 20),
Container(
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
child: Text(
TranslationBase.of(context).livecarePoint1,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)),
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Text(TranslationBase.of(context).livecarePoint1,
overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0, letterSpacing: -0.64, color: CustomColors.black, fontWeight: FontWeight.w600)),
)
],
),
),
Container(
margin: EdgeInsets.only(top: 5.0, left: 20.0),
child: Row(
children: <Widget>[
SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25),
SvgPicture.asset("assets/images/new-design/allow.svg", width: 20),
Container(
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Text(TranslationBase.of(context).docVirtualAppoIns4,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)),
overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0, letterSpacing: -0.64, color: CustomColors.black, fontWeight: FontWeight.w600)),
)
],
),
),
Container(
margin: EdgeInsets.only(top: 5.0, left: 20.0),
child: Row(
children: <Widget>[
SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25),
SvgPicture.asset("assets/images/new-design/allow.svg", width: 20),
Container(
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Text(TranslationBase.of(context).docVirtualAppoIns5,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)),
overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0, letterSpacing: -0.64, color: CustomColors.black, fontWeight: FontWeight.w600)),
)
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
TranslationBase.of(context).livecareSummary,
style: TextStyle(fontSize: 12.0))),
InkWell(
onTap: (){
Navigator.pop(context, "immediate");
},
child: Container(
decoration: BoxDecoration(
color: Colors.red[900],
borderRadius: BorderRadius.all(Radius.circular(10.0))),
height: 100.0,
margin: EdgeInsets.only(top: 20.0),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: SvgPicture.asset(
"assets/images/new-design/liveCare_logo_icon_white.svg",
width: 80),
),
Container(
width: MediaQuery.of(context).size.width * 0.56,
margin: EdgeInsets.fromLTRB(30.0, 10.0, 0.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(TranslationBase.of(context).livecareOption1,
overflow: TextOverflow.clip,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
color: Colors.white)),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Text(TranslationBase.of(context).livecareOption2, textAlign: TextAlign.start,
style: TextStyle(
fontSize: 18.0, color: Colors.white)),
)
],
),
),
],
)),
),
InkWell(
onTap: (){
Navigator.pop(context, "schedule");
},
child: Container(
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.all(Radius.circular(10.0))),
height: 100.0,
margin: EdgeInsets.only(top: 20.0),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Image.asset(
"assets/images/new-design/calendar.png",
width: 60),
),
Container(
width: MediaQuery.of(context).size.width * 0.53,
margin: EdgeInsets.fromLTRB(30.0, 10.0, 0.0, 0.0),
child: Column(
children: <Widget>[
Container(
child: Text(TranslationBase.of(context).livecareOption3,
overflow: TextOverflow.clip,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
color: Colors.white)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).livecareOption4,
style: TextStyle(
fontSize: 18.0, color: Colors.white)),
)
],
),
),
],
)),
margin: EdgeInsets.only(top: 20.0),
child: Text(TranslationBase.of(context).livecareSummary, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(top: 40.0),
shrinkWrap: true,
children: [
_loginOptionButton(TranslationBase.of(context).livecareOption1, 'assets/images/new/Live_Care.svg', 1),
_loginOptionButton(TranslationBase.of(context).livecareOption4, 'assets/images/new/book appointment.svg', 2),
],
),
SizedBox(
height: 40.0,
@ -221,6 +105,44 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
);
}
Widget _loginOptionButton(String _title, String _icon, int _loginIndex) {
return InkWell(
onTap: () {
if (_loginIndex == 1) {
Navigator.pop(context, "immediate");
} else {
Navigator.pop(context, "schedule");
}
},
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>[
SvgPicture.asset(
_icon,
height: _loginIndex == 1 ? 60 : 50,
width: _loginIndex == 1 ? 60 : 50,
),
Text(
_title,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
),
],
),
),
);
}
getLanguageID() async {
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
setState(() {

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsResponse.dart';
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
@ -14,11 +15,7 @@ class ClinicCard extends StatefulWidget {
var languageID;
int isOnline;
ClinicCard(
{this.isSelected,
this.languageID,
this.isOnline,
@required this.patientERGetClinicsList});
ClinicCard({this.isSelected, this.languageID, this.isOnline, @required this.patientERGetClinicsList});
@override
_State createState() => _State();
@ -35,90 +32,69 @@ class _State extends State<ClinicCard> {
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Color(0xff06b806) : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
return Container(
width: double.infinity,
margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 8.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
child: Container(
width: MediaQuery.of(context).size.width * 0.75,
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
border: Border.all(width: 2, color: widget.isSelected ? CustomColors.green : Color(0xffEFEFEF)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Container(
padding: EdgeInsets.fromLTRB(12.0, 25.0, 12.0, 25.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
child: Text(widget.languageID == 'ar' ? widget.patientERGetClinicsList.serviceNameN : widget.patientERGetClinicsList.serviceName,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16)),
),
Row(
children: [
Container(
child: Text(
widget.languageID == 'ar'
? widget.patientERGetClinicsList.serviceNameN
: widget.patientERGetClinicsList.serviceName,
style: TextStyle(
fontSize: 16.0,
color:
widget.isSelected ? Colors.white : Colors.black)),
child: Text(".", style: TextStyle(fontSize: 30.0)),
),
Container(
child: Text("Online"),
),
],
),
),
),
InkWell(
onTap: () {
getClinicTimings(widget.patientERGetClinicsList);
},
child: Card(
margin: EdgeInsets.fromLTRB(8.0, 10.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
child: Container(
padding: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Icon(Icons.access_time, size: 26.0, color: Colors.red[800]),
],
),
),
),
],
),
],
),
);
}
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context)
.then((res) {
service.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
clinicsServiceTimingsResponse =
ClinicsServiceTimingsResponse.fromJson(res);
print(clinicsServiceTimingsResponse
.patientERGetClinicsServiceTimingsList.length);
clinicsServiceTimingsResponse = ClinicsServiceTimingsResponse.fromJson(res);
print(clinicsServiceTimingsResponse.patientERGetClinicsServiceTimingsList.length);
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: ClinicTimingsDialog(
clinicName: patientERGetClinicsList.serviceName,
patientERGetClinicsServiceTimingsList:
clinicsServiceTimingsResponse
.patientERGetClinicsServiceTimingsList,
patientERGetClinicsServiceTimingsList: clinicsServiceTimingsResponse.patientERGetClinicsServiceTimingsList,
),
),
);

@ -76,11 +76,8 @@ class _clinic_listState extends State<ClinicList> {
if (LiveCareHome.isLiveCareTypeSelected != true) {
openLiveCareSelectionDialog();
} else {
print("LiveCare Type Selected");
setState(() {
currentSelectedLiveCareType = "immediate";
// isDataLoaded = true;
// print(liveCareOnlineClinicsListResponse.length);
getLiveCareClinicsList();
});
}
@ -440,33 +437,35 @@ class _clinic_listState extends State<ClinicList> {
isDataLoaded
? Container(
height: MediaQuery.of(context).size.height * 0.7,
child: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length > 0 ? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
},
child: ScheduleClinicCard(
isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
languageID: languageID,
child: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length > 0
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
},
child: ScheduleClinicCard(
isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
languageID: languageID,
),
);
},
),
);
},
),
Container(
height: 10.0,
),
],
): getNoDataWidget(context),
Container(
height: 10.0,
),
],
)
: getNoDataWidget(context),
)
: Container(),
isDataLoaded
@ -509,16 +508,11 @@ class _clinic_listState extends State<ClinicList> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.all(15.0),
child: Text(TranslationBase.of(context).onlineClinics, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
// itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
padding: const EdgeInsets.only(top: 16.0),
itemCount: liveCareOnlineClinicsListResponse.length,
itemBuilder: (context, index) {
return InkWell(
@ -533,10 +527,10 @@ class _clinic_listState extends State<ClinicList> {
);
},
),
Container(
margin: EdgeInsets.all(15.0),
child: Text(TranslationBase.of(context).offlineClinics, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
// Container(
// margin: EdgeInsets.all(15.0),
// child: Text(TranslationBase.of(context).offlineClinics, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
@ -12,6 +13,7 @@ import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authent
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/login/register_new.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -21,6 +23,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -34,13 +37,12 @@ import 'package:intl/intl.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/pages/login/register_new.dart';
class ConfirmLogin extends StatefulWidget {
final Function changePageViewIndex;
const ConfirmLogin({Key key, this.changePageViewIndex}) : super(key: key);
@override
_ConfirmLogin createState() => _ConfirmLogin();
}
@ -640,15 +642,14 @@ class _ConfirmLogin extends State<ConfirmLogin> {
if (result.isNeedUserAgreement == true) {
//move to agreement page.
} else {
insertIMEI();
goToHome();
}
}
insertIMEI() {
authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) {
authService.insertDeviceImei(selectedOption).then((value) => {}).catchError((err) {
print(err);
});
// authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
}
getToDoCount() {
@ -670,7 +671,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true);
getToDoCount();
// getToDoCount();
appointmentRateViewModel
.getIsLastAppointmentRatedList()
@ -694,13 +695,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
page: LandingPage(),
),
(r) => false)
}
},
insertIMEI()
})
.catchError((err) {
print(err);
//GifLoaderDialogUtils.hideDialog(context);
});
// SMSOTP.showLoadingDialog(context, false),
}
loading(flag) {
@ -752,37 +752,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
),
),
);
// return InkWell(
// onTap: () {
// if (_flag == 0) {
// setState(() {
// isMoreOption = true;
// });
// } else {
// authenticateUser(4, isActive: _loginIndex);
// }
// },
// child: RoundedContainer(
// height: 150,
// borderColor: Colors.grey,
// showBorder: true,
// child: Padding(
// padding: EdgeInsets.fromLTRB(30, 15, 30, 15),
// child: Column(
// children: <Widget>[
// Image.asset(
// _icon,
// height: SizeConfig.imageSizeMultiplier * 13,
// width: SizeConfig.imageSizeMultiplier * 16,
// ),
// SizedBox(
// height: 20,
// ),
// Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black)
// ],
// ),
// )));
}
// todo 'sikander' optimize this after knowing usage

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/pages/packages_offers/PackageOrderCompleted
import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart' as utils;
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesCartItemCard.dart';
@ -170,9 +171,10 @@ class _PackagesCartPageState extends State<PackagesCartPage>
width: 100,
color: Colors.grey[300],
),
_paymentOptions(context, (paymentMethod) {
setState(() => _selectedPaymentMethod = paymentMethod);
}),
Padding(
padding: const EdgeInsets.only(left: 12.0, right: 12.0),
child: getPaymentMethods(),
),
Container(
height: 0.25,
color: Colors.grey[300],

@ -77,16 +77,16 @@ class PackagesCartItemCardState extends State<PackagesCartItemCard> {
),
),
Positioned(
bottom: 8,
left: 10,
child: Row(
children: [
_totalLabel(context: context),
_totalPrice((widget.itemModel.product.price * widget.itemModel.quantity), context: context),
],
),
)
// Positioned(
// bottom: 8,
// left: 10,
// child: Row(
// children: [
// _totalLabel(context: context),
// _totalPrice((widget.itemModel.product.price * widget.itemModel.quantity), context: context),
// ],
// ),
// )
],
)
)

Loading…
Cancel
Save