diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 27fcb103..c5ef0ced 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -41,7 +41,7 @@ class BaseAppClient { body['DoctorID'] = doctorProfile?.doctorID; body['EditedBy'] = doctorProfile?.doctorID; body['ProjectID'] = doctorProfile?.projectID; - // if (!body.containsKey('ClinicID')) + if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID; } body['TokenID'] = token ?? ''; diff --git a/lib/models/patient/get_pending_patient_er_model.dart b/lib/models/patient/get_pending_patient_er_model.dart new file mode 100644 index 00000000..e1b50a81 --- /dev/null +++ b/lib/models/patient/get_pending_patient_er_model.dart @@ -0,0 +1,183 @@ +/* + *@author: Amjad Amireh + *@Date:15/6/2020 + *@param: + *@return: + *@desc: Find list of pending patients Model + */ +import 'dart:convert'; + +ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => ListPendingPatientListModel.fromJson(json.decode(str)); + +String listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson()); + +class ListPendingPatientListModel { + ListPendingPatientListModel({ + this.acceptedBy, + this.acceptedOn, + this.age, + this.appointmentNo, + this.arrivalTime, + this.arrivalTimeD, + this.callStatus, + this.clientRequestId, + this.clinicName, + this.consoltationEnd, + this.consultationNotes, + this.createdOn, + this.dateOfBirth, + this.deviceToken, + this.deviceType, + this.doctorName, + this.editOn, + this.gender, + this.isFollowUp, + this.isFromVida, + this.isLoginB, + this.isOutKsa, + this.isRejected, + this.language, + this.latitude, + this.longitude, + this.mobileNumber, + this.openSession, + this.openTokenId, + this.patientId, + this.patientName, + this.patientStatus, + this.preferredLanguage, + this.projectId, + this.scoring, + this.serviceId, + this.tokenId, + this.vcId, + this.voipToken, + }); + + dynamic acceptedBy; + dynamic acceptedOn; + int age; + dynamic appointmentNo; + String arrivalTime; + String arrivalTimeD; + int callStatus; + String clientRequestId; + String clinicName; + dynamic consoltationEnd; + dynamic consultationNotes; + dynamic createdOn; + DateTime dateOfBirth; + String deviceToken; + String deviceType; + dynamic doctorName; + String editOn; + String gender; + bool isFollowUp; + dynamic isFromVida; + int isLoginB; + bool isOutKsa; + int isRejected; + String language; + double latitude; + double longitude; + String mobileNumber; + dynamic openSession; + dynamic openTokenId; + String patientId; + String patientName; + int patientStatus; + String preferredLanguage; + int projectId; + int scoring; + int serviceId; + dynamic tokenId; + int vcId; + String voipToken; + + factory ListPendingPatientListModel.fromJson(Map json) => ListPendingPatientListModel( + acceptedBy: json["AcceptedBy"], + acceptedOn: json["AcceptedOn"], + age: json["Age"], + appointmentNo: json["AppointmentNo"], + arrivalTime: json["ArrivalTime"], + arrivalTimeD: json["ArrivalTimeD"], + callStatus: json["CallStatus"], + clientRequestId: json["ClientRequestID"], + clinicName: json["ClinicName"], + consoltationEnd: json["ConsoltationEnd"], + consultationNotes: json["ConsultationNotes"], + createdOn: json["CreatedOn"], + dateOfBirth: DateTime.parse(json["DateOfBirth"]), + deviceToken: json["DeviceToken"], + deviceType: json["DeviceType"], + doctorName: json["DoctorName"], + editOn: json["EditOn"], + gender: json["Gender"], + isFollowUp: json["IsFollowUP"], + isFromVida: json["IsFromVida"], + isLoginB: json["IsLoginB"], + isOutKsa: json["IsOutKSA"], + isRejected: json["IsRejected"], + language: json["Language"], + latitude: json["Latitude"].toDouble(), + longitude: json["Longitude"].toDouble(), + mobileNumber: json["MobileNumber"], + openSession: json["OpenSession"], + openTokenId: json["OpenTokenID"], + patientId: json["PatientID"], + patientName: json["PatientName"], + patientStatus: json["PatientStatus"], + preferredLanguage: json["PreferredLanguage"], + projectId: json["ProjectID"], + scoring: json["Scoring"], + serviceId: json["ServiceID"], + tokenId: json["TokenID"], + vcId: json["VC_ID"], + voipToken: json["VoipToken"], + ); + + Map toJson() => { + "AcceptedBy": acceptedBy, + "AcceptedOn": acceptedOn, + "Age": age, + "AppointmentNo": appointmentNo, + "ArrivalTime": arrivalTime, + "ArrivalTimeD": arrivalTimeD, + "CallStatus": callStatus, + "ClientRequestID": clientRequestId, + "ClinicName": clinicName, + "ConsoltationEnd": consoltationEnd, + "ConsultationNotes": consultationNotes, + "CreatedOn": createdOn, + "DateOfBirth": "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}", + "DeviceToken": deviceToken, + "DeviceType": deviceType, + "DoctorName": doctorName, + "EditOn": editOn, + "Gender": gender, + "IsFollowUP": isFollowUp, + "IsFromVida": isFromVida, + "IsLoginB": isLoginB, + "IsOutKSA": isOutKsa, + "IsRejected": isRejected, + "Language": language, + "Latitude": latitude, + "Longitude": longitude, + "MobileNumber": mobileNumber, + "OpenSession": openSession, + "OpenTokenID": openTokenId, + "PatientID": patientId, + "PatientName": patientName, + "PatientStatus": patientStatus, + "PreferredLanguage": preferredLanguage, + "ProjectID": projectId, + "Scoring": scoring, + "ServiceID": serviceId, + "TokenID": tokenId, + "VC_ID": vcId, + "VoipToken": voipToken, + }; +} +// To parse this JSON data, do +// +// final listPendingPatientListModel = listPendingPatientListModelFromJson(jsonString); diff --git a/lib/providers/auth_provider.dart b/lib/providers/auth_provider.dart index 415b8d39..f718eaf9 100644 --- a/lib/providers/auth_provider.dart +++ b/lib/providers/auth_provider.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/models/clinic_model.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:flutter/cupertino.dart'; @@ -21,7 +22,7 @@ enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } class AuthProvider with ChangeNotifier { - + List doctorsClinicList=[]; bool isLogin= false; bool isLoading = true; AuthProvider(){ @@ -134,6 +135,11 @@ class AuthProvider with ChangeNotifier { await BaseAppClient.post(MEMBER_CHECK_ACTIVATION_CODE_NEW, onSuccess: (dynamic response, int statusCode) { localRes = response; + + response['List_DoctorsClinic'].forEach((v) { + doctorsClinicList.add(new ClinicModel.fromJson(v)); + }); + }, onFailure: (String error, int statusCode) { throw error; }, body: activationCodeModel); diff --git a/lib/providers/pending_patient_provider.dart b/lib/providers/pending_patient_provider.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/screens/auth/change_password_screen.dart b/lib/screens/auth/change_password_screen.dart index 6fa15bfd..d6451049 100644 --- a/lib/screens/auth/change_password_screen.dart +++ b/lib/screens/auth/change_password_screen.dart @@ -9,6 +9,7 @@ class ChangePasswordScreen extends StatelessWidget { Widget build(BuildContext context) { return AppScaffold( + isShowAppBar: false, body: SafeArea( child: ListView(children: [ Container( diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 38c81cc3..5b495abb 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -12,8 +12,8 @@ import '../../widgets/auth/login_form.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; - DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + class Loginsreen extends StatefulWidget { @override _LoginsreenState createState() => _LoginsreenState(); @@ -56,10 +56,10 @@ class _LoginsreenState extends State { @override Widget build(BuildContext context) { - getSharedPref(); return AppScaffold( isLoading: _isLoading, + isShowAppBar: false, body: SafeArea( child: ListView(children: [ FutureBuilder( @@ -80,24 +80,24 @@ class _LoginsreenState extends State { children: [ (platformImei == null) ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.knownUser), - LoginForm( - changeLoadingStata: - changeLoadingStata, - ), - ], - ) + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.knownUser), + LoginForm( + changeLoadingStata: + changeLoadingStata, + ), + ], + ) : Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.unknownUser), - KnownUserLogin(), - ], - ), + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.unknownUser), + KnownUserLogin(), + ], + ), ])); } } diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 830530c9..d5ab66ad 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -38,6 +38,7 @@ class _VerificationMethodsScreenState extends State { Widget build(BuildContext context) { return AppScaffold( isLoading: _isLoading, + isShowAppBar: false, body: ListView(children: [ Container( margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), diff --git a/lib/screens/auth/verify_account_screen.dart b/lib/screens/auth/verify_account_screen.dart index b7eee5df..e69d973e 100644 --- a/lib/screens/auth/verify_account_screen.dart +++ b/lib/screens/auth/verify_account_screen.dart @@ -30,6 +30,7 @@ class _VerifyAccountScreenState extends State { Widget build(BuildContext context) { return AppScaffold( isLoading: _isLoading, + isShowAppBar: false, body: SafeArea( child: ListView(children: [ Container( diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 5a947f66..e1540f93 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1,28 +1,36 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/models/clinic_model.dart'; +import 'package:doctor_app_flutter/models/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/models/profile_req_Model.dart'; +import 'package:doctor_app_flutter/providers/auth_provider.dart'; import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart'; -import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/hospital_provider.dart'; +import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/referral_patient_provider.dart'; import 'package:doctor_app_flutter/providers/referred_patient_provider.dart'; -import 'package:doctor_app_flutter/screens/QR_reader_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:provider/provider.dart'; -import '../routes.dart'; -import '../widgets/shared/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; +import 'package:provider/provider.dart'; -import '../presentation/doctor_app_icons.dart'; +import '../routes.dart'; import '../widgets/dashboard/dashboard_item_icons_texts.dart'; import '../widgets/dashboard/dashboard_item_texts_widget.dart'; +import '../widgets/shared/app_texts_widget.dart'; import '../widgets/shared/rounded_container_widget.dart'; import 'doctor/doctor_reply_screen.dart'; import 'doctor/my_referral_patient_screen.dart'; - import 'doctor/my_referred_patient_screen.dart'; +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); +Helpers helpers = Helpers(); + class DashboardScreen extends StatefulWidget { DashboardScreen({Key key, this.title}) : super(key: key); @@ -33,19 +41,23 @@ class DashboardScreen extends StatefulWidget { } class _DashboardScreenState extends State { - HospitalProvider projectsProvider; - + HospitalProvider hospitalProvider; + AuthProvider authProvider; + bool isLoading = false; @override Widget build(BuildContext context) { + hospitalProvider = Provider.of(context); + authProvider = Provider.of(context); + print(authProvider.doctorsClinicList); FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { currentFocus.unfocus(); } - projectsProvider = Provider.of(context); return SafeArea( bottom: true, - child: Scaffold( + child: AppScaffold( + isShowAppBar: false, + isLoading: isLoading, body: SingleChildScrollView( child: SizedBox( height: MediaQuery.of(context).size.height * 1.09, @@ -65,12 +77,20 @@ class _DashboardScreenState extends State { ), alignment: Alignment.centerLeft, ), - Container( - margin: EdgeInsets.only(left: 10, top: 10, right: 10), - child: Icon( - Icons.settings, - size: SizeConfig.textMultiplier * 2.5, - )) + InkWell( + onTap: () { + showCupertinoPicker( + context: context, + actionList: authProvider.doctorsClinicList); + }, + child: Container( + margin: + EdgeInsets.only(left: 10, top: 10, right: 10), + child: Icon( + Icons.settings, + size: SizeConfig.textMultiplier * 2.5, + )), + ) ]), Container( margin: EdgeInsets.only(left: 10, top: 5), @@ -413,17 +433,103 @@ class _DashboardScreenState extends State { )), ], ), - //) - - // , - //constraints: new BoxConstraints(), ), ), ), ); + } - // Container( + showCupertinoPicker( + {context, List actionList, decKey, onSelectFun}) { + showModalBottomSheet( + isDismissible: false, + isScrollControlled: true, + context: context, + builder: (BuildContext builder) { + return Container( + // height: 500, + height: SizeConfig.realScreenHeight * 0.4, + color: Color(0xfff7f7f7), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + color: Color(0xfff7f7f7), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CupertinoButton( + child: Text( + 'Cancel'.toUpperCase(), + // style: TextStyle(context) + ), + onPressed: () { + Navigator.pop(context); + }, + ), + CupertinoButton( + child: Text( + 'Done'.toUpperCase(), + // style: textStyle(context), + ), + onPressed: () { + Navigator.pop(context); + // onSelectFun(cupertinoPickerIndex); + }, + ) + ], + ), + ), + Container( + height: SizeConfig.realScreenHeight * 0.3, + color: Color(0xfff7f7f7), + child: Column( + children: actionList + .map((e) => Container( + child: InkWell( + onTap: () => + changeClinic(e.clinicID, context), + child: Text( + e.clinicName, + style: TextStyle(fontSize: 15), + )), + )) + .toList(), + )) + ], + ), + ); + }); + } + + changeClinic(clinicId, BuildContext context) async { + Navigator.pop(context); + changeIsLoading(true); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); + ProfileReqModel docInfo = new ProfileReqModel( + doctorID: doctorProfile.doctorID, + clinicID: clinicId, + license: true, + projectID: doctorProfile.projectID, + tokenID: '', + languageID: 2); + + // authProvider.getDocProfiles(docInfo) + authProvider.getDocProfiles(docInfo.toJson()).then((res) async { + + changeIsLoading(false); + sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); + + }).catchError((err) { + changeIsLoading(false); + helpers.showErrorToast(err); + }); + } - // ); + changeIsLoading(bool val) { + setState(() { + this.isLoading = val; + }); } } diff --git a/lib/screens/doctor/message_screen.dart b/lib/screens/doctor/message_screen.dart index 18c6bf93..17d57c47 100644 --- a/lib/screens/doctor/message_screen.dart +++ b/lib/screens/doctor/message_screen.dart @@ -1,11 +1,11 @@ -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; class MessagesScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( + return AppScaffold( + isShowAppBar: false, body: Center( child: Text('Messages heeer'), ), diff --git a/lib/screens/doctor/my_schedule_screen.dart b/lib/screens/doctor/my_schedule_screen.dart index 36b449a7..281357ca 100644 --- a/lib/screens/doctor/my_schedule_screen.dart +++ b/lib/screens/doctor/my_schedule_screen.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/providers/schedule_provider.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/doctor/my_schedule_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:flutter/material.dart'; @@ -13,7 +14,8 @@ class MyScheduleScreen extends StatelessWidget { @override Widget build(BuildContext context) { scheduleProvider = Provider.of(context); - return Scaffold( + return AppScaffold( + isShowAppBar: false, body: scheduleProvider.isLoading ? DrAppCircularProgressIndeicator() : scheduleProvider.isError diff --git a/lib/screens/doctor/services_screen.dart b/lib/screens/doctor/services_screen.dart index 1000e694..d470cc87 100644 --- a/lib/screens/doctor/services_screen.dart +++ b/lib/screens/doctor/services_screen.dart @@ -4,7 +4,8 @@ import 'package:flutter/material.dart'; class ServicesScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( + return AppScaffold( + isShowAppBar: false, body: Center( child: Text('Services heeer'), ), diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index f020ca2e..1a91c7f3 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -98,7 +98,8 @@ class _PatientSearchScreenState extends State { }); } } catch (err) { - handelCatchErrorCase(err); + error = err; + // handelCatchErrorCase(err); } } diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 96211046..f0a543f2 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -22,6 +22,7 @@ import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart'; import '../../config/size_config.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -106,7 +107,7 @@ class _PatientsScreenState extends State { setState(() { _isError = true; _isLoading = false; - this.error = helpers.generateContactAdminMsg(error); + this.error = error; }); }); } @@ -383,23 +384,29 @@ class _PatientsScreenState extends State { mainAxisAlignment: MainAxisAlignment .start, - children: - item.genderDescription == - "Male" - ? [ - SvgPicture.asset( - url + avatarMale, - height: 80.0, - width: 80.0, - semanticsLabel: 'Male Logo') - ] - : [ - SvgPicture.asset( - url + avatarFemale, - height: 80.0, - width: 80.0, - semanticsLabel: 'Female Logo') - ], + children: [ + Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment(-1, -1), + end: Alignment(1, 1), + colors: [ + Colors.grey[100], + Colors.grey[200], + ]), + boxShadow: [ + BoxShadow( + color: Color.fromRGBO(0, 0, 0, 0.08), + offset: Offset(0.0, 5.0), + blurRadius: 16.0) + ], + borderRadius: BorderRadius.all(Radius.circular(50.0)), + ), + width: 80, + height: 80, + child: Icon(item.genderDescription == "Male" ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)), + + ], ), SizedBox( width: 10, diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index 88f9565a..f1c30add 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -37,16 +37,26 @@ class _ProfileScreenState extends State { appBarTitle: 'Profile', body: ListView(padding: EdgeInsets.zero, children: [ Container( - height: SizeConfig.heightMultiplier * 30, - child: DrawerHeader( - child: ProfileImageWidget( - url:doctorProfile.doctorImageURL, - //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", - name: doctorProfile.doctorName,//"Dr. Chris evans", - des: doctorProfile.clinicDescription//"Director of medical records", + height:MediaQuery.of(context).size.height * 0.35, //SizeConfig.heightMultiplier * 35, + + child: Container( + + child: DrawerHeader( + + child: Container( + + child: ProfileImageWidget( + url:doctorProfile.doctorImageURL, + //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", + name: doctorProfile.doctorName,//"Dr. Chris evans", + des: doctorProfile.clinicDescription//"Director of medical records", + ), + ), ), ), + ), + RoundedContainer( child: ListView( children: [ diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 611bd315..7da036d3 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -359,13 +359,9 @@ class _VerifyAccountState extends State { loginProcessCompleted( res['List_DoctorProfile'][0], changeLoadingStata); } else { - _asyncSimpleDialog(context, res['List_DoctorsClinic'], 'ClinicName', - 'Please Select Clinic') - .then((clinicInfo) { - ClinicModel clinic = ClinicModel.fromJson(clinicInfo); - print(clinicInfo); - getDocProfiles(clinic, changeLoadingStata); - }); + ClinicModel clinic = + ClinicModel.fromJson(res['List_DoctorsClinic'][0]); + getDocProfiles(clinic, changeLoadingStata); } } else { changeLoadingStata(false); @@ -373,9 +369,7 @@ class _VerifyAccountState extends State { } }).catchError((err) { changeLoadingStata(false); - - print('$err'); - helpers.showErrorToast(); + helpers.showErrorToast(err); }); } else { // changeLoadingStata(false); @@ -435,18 +429,14 @@ class _VerifyAccountState extends State { languageID: 2); authProv.getDocProfiles(docInfo.toJson()).then((res) { if (res['MessageStatus'] == 1) { - print("DoctorProfileList ${res['DoctorProfileList'][0]}"); loginProcessCompleted(res['DoctorProfileList'][0], changeLoadingStata); } else { changeLoadingStata(false); helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { - print('$err'); changeLoadingStata(false); - - print('$err'); - helpers.showErrorToast(); + helpers.showErrorToast(err); }); } } diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 824ba11b..9cc6f53c 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -9,15 +9,16 @@ class AppScaffold extends StatelessWidget { String appBarTitle; Widget body; bool isLoading; + bool isShowAppBar; - AppScaffold({this.appBarTitle ='', this.body, this.isLoading = false}); + AppScaffold({this.appBarTitle ='', this.body, this.isLoading = false, this.isShowAppBar = true}); @override Widget build(BuildContext context) { AppGlobal.CONTEX = context; return Scaffold( backgroundColor: Hexcolor('#F5F5F5'), - appBar: appBarTitle != '' + appBar: isShowAppBar ? AppBar( elevation: 0, backgroundColor: Hexcolor('#515B5D'),