diff --git a/assets/images/verification_faceid_lg_icon.png b/assets/images/verification_faceid_lg_icon.png deleted file mode 100644 index dc206911..00000000 Binary files a/assets/images/verification_faceid_lg_icon.png and /dev/null differ diff --git a/assets/images/verification_fingerprint_lg_icon.png b/assets/images/verification_fingerprint_lg_icon.png deleted file mode 100644 index 559c0671..00000000 Binary files a/assets/images/verification_fingerprint_lg_icon.png and /dev/null differ diff --git a/assets/images/verification_sms_lg_icon.png b/assets/images/verification_sms_lg_icon.png deleted file mode 100644 index 9c316230..00000000 Binary files a/assets/images/verification_sms_lg_icon.png and /dev/null differ diff --git a/assets/images/verification_whatsapp_lg_icon.png b/assets/images/verification_whatsapp_lg_icon.png deleted file mode 100644 index 115a2e6d..00000000 Binary files a/assets/images/verification_whatsapp_lg_icon.png and /dev/null differ diff --git a/assets/images/verify-face.png b/assets/images/verify-face.png new file mode 100644 index 00000000..58e1f4a6 Binary files /dev/null and b/assets/images/verify-face.png differ diff --git a/assets/images/verify-finger.png b/assets/images/verify-finger.png new file mode 100644 index 00000000..15d60b03 Binary files /dev/null and b/assets/images/verify-finger.png differ diff --git a/assets/images/verify-sms.png b/assets/images/verify-sms.png new file mode 100644 index 00000000..e265e1f9 Binary files /dev/null and b/assets/images/verify-sms.png differ diff --git a/assets/images/verify-whtsapp.png b/assets/images/verify-whtsapp.png new file mode 100644 index 00000000..9a79516c Binary files /dev/null and b/assets/images/verify-whtsapp.png differ diff --git a/lib/config/config.dart b/lib/config/config.dart index 654f704a..52fb8c3f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; -const BASE_URL = 'https://hmgwebservices.com/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +//const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 80e9d656..deb9ee41 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -128,22 +128,22 @@ const Map> localizedValues = { 'description': {'en': 'Description', 'ar': 'الوصف'}, 'value': {'en': 'Value', 'ar': 'القيمة'}, 'range': {'en': 'Range', 'ar': 'النطاق'}, - 'enterId': {'en': 'Enter ID', 'ar': 'الهوية'}, + 'enterId': {'en': 'User ID', 'ar': 'معرف المستخدم'}, 'pleaseEnterYourID': { 'en': 'Please enter your ID', 'ar': 'الرجاء ادخال الهوية' }, - 'enterPassword': {'en': 'Enter Password', 'ar': 'الرقم السري'}, + 'enterPassword': {'en': 'Password', 'ar': 'كلمه السر'}, 'pleaseEnterPassword': { 'en': 'Please Enter Password', 'ar': 'الرجاء ادخال الرقم السري' }, - 'selectYourProject': {'en': 'Select Your Project', 'ar': 'اختر المستشفى'}, + 'selectYourProject': {'en': 'Branch', 'ar': 'فرع'}, 'pleaseEnterYourProject': { 'en': 'Please Enter Your Project', 'ar': 'الرجاء ادخال مستشفى' }, - 'login': {'en': 'LOGIN', 'ar': 'تسجيل دخول'}, + 'login': {'en': 'Login', 'ar': 'تسجيل دخول'}, 'drSulaimanAlHabib': {'en': 'Dr Sulaiman Al Habib', 'ar': 'د.سليمان الحبيب'}, 'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'}, 'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '}, @@ -306,6 +306,7 @@ const Map> localizedValues = { 'en': "No sick leave available, apply Now", 'ar': 'لا توجد إجازة مرضية متاحة ، تقدم بطلب الآن' }, + 'no-sickleve': {'en': "No sick leave available", 'ar': 'لا توجد إجازة مرضية'}, 'applynow': {'en': "Apply Now", 'ar': 'قدم الآن'}, 'add-sickleave': {'en': "ADD SICK LEAVE", 'ar': 'أضف إجازة مرضية'}, 'add': {'en': "Add", 'ar': 'أضف'}, @@ -572,11 +573,14 @@ const Map> localizedValues = { "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات" }, "register-user": {"en": "Register", "ar": "تسجيل"}, - "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, - "verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"}, - "verify-with-sms": {"en": "SMS", "ar": "الرسائل القصيرة"}, - "verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"}, - "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, + "verify-with-fingerprint": {"en": "Verify through Fingerprint", "ar": "بصمة"}, + "verify-with-faceid": {"en": "Verify through Face ID", "ar": "معرف الوجه"}, + "verify-with-sms": {"en": "Verify through SMS", "ar": "الرسائل القصيرة"}, + "verify-with-whatsapp": {"en": "Verify through WhatsApp", "ar": " الواتس اب"}, + "last-login": { + "en": "Last login details:", + "ar": "تفاصيل تسجيل الدخول الأخير:" + }, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "verify-fingerprint": { "en": @@ -826,11 +830,12 @@ const Map> localizedValues = { "unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"}, "searchHere": {"en": "Search here", "ar": "إبحث هنا"}, "replied": {"en": "Replied", "ar": " تم الرد"}, - "typeHereToReply": { - "en": "Type here to reply", - "ar": "اكتب هنا للرد" - },"remove": { - "en": "Remove", - "ar": "حذف" + "typeHereToReply": {"en": "Type here to reply", "ar": "اكتب هنا للرد"}, + "remove": {"en": "Remove", "ar": "حذف"}, + "changeOfSchedule": {"en": "Change of Schedule", "ar": "تغيير الجدول"}, + "newSchedule": {"en": "New Schedule", "ar": "جدول جديد"}, + "enter_credentials": { + "en": "Enter the user credentials below", + "ar": "أدخل بيانات اعتماد المستخدم أدناه" }, }; diff --git a/lib/icons_app/config.json b/lib/icons_app/config.json index dfd00326..e9aaeffa 100644 --- a/lib/icons_app/config.json +++ b/lib/icons_app/config.json @@ -2299,7 +2299,63 @@ "search": [ "obese-bmi-r" ] - } + }, + { + "uid": "3375043683ed20c80d3307cef405e3ff", + "css": "verify-face", + "code": 59395, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710ZM507.5 144.9A350.9 350.9 0 1 0 858.4 495.8 350.9 350.9 0 0 0 507.5 144.9ZM637 378.9A50.3 50.3 0 1 1 586.7 429.2 50.3 50.3 0 0 1 637 378.9ZM378 378.9A50.3 50.3 0 1 1 327.7 429.2 50.3 50.3 0 0 1 378 378.9ZM696.8 617.8A229.7 229.7 0 0 1 318.1 617.8 30.7 30.7 0 1 1 368.8 582.9 168.3 168.3 0 0 0 646.3 582.9 30.7 30.7 0 1 1 696.8 617.8Z", + "width": 1015 + }, + "search": [ + "verify-face" + ] + }, + { + "uid": "49b31d628bdc0d2127dc489c84c7101b", + "css": "verify-finger", + "code": 59394, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M792.5 147.2H237.8A76.6 76.6 0 0 0 161.3 223.7V778.4A76.6 76.6 0 0 0 237.8 854.9H792.5A76.6 76.6 0 0 0 869.1 778.4V223.7A76.6 76.6 0 0 0 792.5 147.2ZM292.8 283.5C439.9 176.7 595 177.8 739.9 285.4A20.8 20.8 0 0 1 727.6 322.8C704.1 322.8 543.8 152.4 317.1 317.1A20.7 20.7 0 0 1 292.8 283.5ZM486.1 816.8A20.7 20.7 0 0 1 457.2 811.5C428 769.3 361.6 722.1 361.6 633.8A159.5 159.5 0 0 1 515.1 469.3 159.5 159.5 0 0 1 668.7 633.8V655.9A20.7 20.7 0 0 1 627.2 655.9V633.8A118 118 0 0 0 515.2 510.7 118 118 0 0 0 403.3 633.8C403.3 733.7 530.5 786.1 486.2 816.8ZM743.8 709.5A108.7 108.7 0 0 1 538.7 656C538.7 566.5 477.5 596.6 491.1 650.9A20.7 20.7 0 0 1 450.8 661C422.6 548 580.2 502.2 580.2 656A66.9 66.9 0 0 0 632.1 725C728.1 747.7 756.6 589.3 660.8 487.4 528.5 346.3 314.7 455.1 314.7 622.8A167.7 167.7 0 0 0 344.1 732.4 20.7 20.7 0 0 1 310.4 756.5 211.3 211.3 0 0 1 273.3 622.8 245.9 245.9 0 0 1 515.3 380.8C694.1 380.8 807.9 581.4 744.1 709.6ZM757.7 452.8A20.7 20.7 0 0 1 729.4 445.1C688.2 372.8 588.3 333.9 515.3 333.9A296.7 296.7 0 0 0 300.3 446.4 20.7 20.7 0 0 1 265.8 423.4 336.1 336.1 0 0 1 515.3 292.5C668.9 292.5 806 425.3 757.8 452.9ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-finger" + ] + }, + { + "uid": "f57a7cc9bc5e75095215adfc141a8b17", + "css": "verify-whtsapp", + "code": 59393, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M132.6 857.5L196.3 666.3A364.2 364.2 0 1 1 340.1 802.9ZM742 601.7C725.1 569.9 663.1 533.6 663.1 533.6 649 525.7 632.1 524.7 624.1 538.8A321.2 321.2 0 0 1 598.8 566.5 47.1 47.1 0 0 1 531.8 559.8L481 508.9 430.1 458A47.1 47.1 0 0 1 423.5 391.3 321.3 321.3 0 0 1 451.1 366C465.4 358.1 464.5 341.1 456.4 327.1 456.4 327.1 420 265 388.2 248.2A34.8 34.8 0 0 0 347.3 254.3L324.8 276.8C253.6 348 288.6 428.5 359.9 499.8L425.3 564.9 490.5 630C561.7 701.3 642.2 736.4 713.5 665.1L735.9 642.6A34.9 34.9 0 0 0 742 601.7ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.3A36.2 36.2 0 1 0 0 746.3V963.8A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.3V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-whtsapp" + ] + }, + { + "uid": "89f9e9928bf0aa0ec55c15055f8ce27a", + "css": "verify-sms", + "code": 59392, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M766.3 175.1H252.2A64.5 64.5 0 0 0 187.9 239.4V817.7L316.4 689.2H766.1A64.5 64.5 0 0 0 830.5 624.8V239.4A64.5 64.5 0 0 0 766.3 175.1ZM412.8 464.4H348.5V400H412.8ZM541.3 464.4H477.2V400H541.3ZM669.8 464.4H605.6V400H669.9ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-sms" + ] + } ] } } \ No newline at end of file diff --git a/lib/icons_app/doctor_app_icons.dart b/lib/icons_app/doctor_app_icons.dart index 00b4d547..a3a0238c 100644 --- a/lib/icons_app/doctor_app_icons.dart +++ b/lib/icons_app/doctor_app_icons.dart @@ -202,14 +202,14 @@ class DoctorApp { IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData external_link = IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_face = - IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_sms = - IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + // static const IconData verify_face = + // IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); + // static const IconData verify_sms = + // IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData home = IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_finger = - IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + // static const IconData verify_finger = + // IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData dr_reply_active = IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData dr_reply = @@ -350,4 +350,12 @@ class DoctorApp { IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData home_active_1 = IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms = + IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_whtsapp = + IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger = + IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face = + IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 84121abf..957dcc66 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -101,6 +102,7 @@ class _LoginsreenState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, + backgroundColor: HexColor('#F8F8F8'), body: SafeArea( child: (_isLoading == false) ? ListView(children: [ @@ -116,6 +118,9 @@ class _LoginsreenState extends State { CrossAxisAlignment.start, children: [ AuthHeader(loginType.knownUser), + SizedBox( + height: 60, + ), LoginForm( changeLoadingStata: changeLoadingStata, ), diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 0045f032..40fe4bd6 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import '../../lookups/auth_lookup.dart'; import '../../widgets/auth/auth_header.dart'; @@ -43,13 +44,18 @@ class _VerificationMethodsScreenState extends State { return AppScaffold( isLoading: _isLoading, isShowAppBar: false, + isHomeIcon: false, + backgroundColor: HexColor('#F8F8F8'), body: ListView(children: [ Container( margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AuthHeader(loginType.verificationMethods), + // AuthHeader(loginType.verificationMethods), + SizedBox( + height: 50, + ), VerificationMethods( password: widget.password, changeLoadingStata: changeLoadingStata, diff --git a/lib/screens/reschedule-leaves/add-rescheduleleave.dart b/lib/screens/reschedule-leaves/add-rescheduleleave.dart index 8981f374..41f7c6aa 100644 --- a/lib/screens/reschedule-leaves/add-rescheduleleave.dart +++ b/lib/screens/reschedule-leaves/add-rescheduleleave.dart @@ -155,9 +155,16 @@ class AddRescheduleLeavScreen extends StatelessWidget { item.requisitionType == 1 ? TranslationBase.of(context) .offTime - : TranslationBase.of(context) - .holiday + - ' ', + : item.requisitionType == 2 + ? TranslationBase.of(context) + .holiday + : item.requisitionType == 3 + ? TranslationBase.of( + context) + .changeOfSchedule + : TranslationBase.of( + context) + .newSchedule, fontWeight: FontWeight.bold, )), SizedBox( diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 1c7199fa..ba90cf6e 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -233,7 +233,21 @@ class AddSickLeavScreen extends StatelessWidget { )); }).toList(), ) - : SizedBox() + : patient.patientStatusType != 43 + ? Container( + height: 200, + width: SizeConfig.screenWidth, + color: Colors.white, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AppText( + TranslationBase.of(context).noSickLeave, + color: Colors.red, + ) + ]), + ) + : SizedBox() // : new Builder(builder: (context) { // return Column( // crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 6eba28fc..6fa147f0 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -661,7 +661,8 @@ class TranslationBase { String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; - String get bmiObeseExtreme => localizedValues['bmiObeseExtreme'][locale.languageCode]; + String get bmiObeseExtreme => + localizedValues['bmiObeseExtreme'][locale.languageCode]; String get method => localizedValues['method'][locale.languageCode]; @@ -1204,9 +1205,16 @@ class TranslationBase { String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get unReplied => localizedValues['unReplied'][locale.languageCode]; String get replied => localizedValues['replied'][locale.languageCode]; - String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode]; + String get typeHereToReply => + localizedValues['typeHereToReply'][locale.languageCode]; String get searchHere => localizedValues['searchHere'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode]; + String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; + String get changeOfSchedule => + localizedValues['changeOfSchedule'][locale.languageCode]; + String get newSchedule => localizedValues['newSchedule'][locale.languageCode]; + String get enterCredentials => + localizedValues['enter_credentials'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/auth/auth_header.dart b/lib/widgets/auth/auth_header.dart index 8ab79b5c..364cfc85 100644 --- a/lib/widgets/auth/auth_header.dart +++ b/lib/widgets/auth/auth_header.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -23,18 +24,18 @@ class AuthHeader extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - margin: SizeConfig.isMobile - ? EdgeInsetsDirectional.fromSTEB( - 0, SizeConfig.realScreenHeight * 0.03, 0, 0) - : EdgeInsetsDirectional.fromSTEB( - SizeConfig.realScreenWidth * 0.13, 0, 0, 0), - child: buildImageLogo(), - ), + // Container( + // margin: SizeConfig.isMobile + // ? EdgeInsetsDirectional.fromSTEB( + // 0, SizeConfig.realScreenHeight * 0.03, 0, 0) + // : EdgeInsetsDirectional.fromSTEB( + // SizeConfig.realScreenWidth * 0.13, 0, 0, 0), + // child: buildImageLogo(), + // ), SizedBox( - height: 10, + height: 30, ), - buildTextUnderLogo(context), + //buildTextUnderLogo(context), ], ), Column( @@ -146,15 +147,15 @@ class AuthHeader extends StatelessWidget { return Container(); } return Container( - margin: SizeConfig.isMobile - ? null - : EdgeInsetsDirectional.fromSTEB( - SizeConfig.realScreenWidth * 0.13, 0, 0, 0), + // margin: SizeConfig.isMobile + // ? null + // : EdgeInsetsDirectional.fromSTEB( + // SizeConfig.realScreenWidth * 0.13, 0, 0, 0), child: Text( "Doctor App", style: TextStyle( fontSize: - SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030, + SizeConfig.isMobile ? 16 : SizeConfig.realScreenWidth * 0.030, fontWeight: FontWeight.w800, color: HexColor('#B8382C')), ), @@ -170,10 +171,10 @@ class AuthHeader extends StatelessWidget { return Text( TranslationBase.of(context).drSulaimanAlHabib, style: TextStyle( - fontWeight: FontWeight.w800, - fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, - color: HexColor('#B8382C'), - ), + fontWeight: FontWeight.w800, + fontSize: + SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, + fontFamily: 'Poppins'), ); } @@ -187,11 +188,11 @@ class AuthHeader extends StatelessWidget { userType == loginType.verificationMethods) { return Text(''); } - return Text( + return AppText( text, - style: TextStyle( - fontSize: - SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029), + // style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, ); } } diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index c52e9a77..c59c01d9 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -1,6 +1,9 @@ import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; @@ -72,119 +75,212 @@ class _LoginFormState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ buildSizedBox(), - TextFormField( - keyboardType: TextInputType.number, - textInputAction: TextInputAction.next, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).enterId, - 'assets/images/user_id_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context).pleaseEnterYourID; - } - return null; - }, - onSaved: (value) { - userInfo.userID = value.trim(); - }, - onChanged: (value) { - userInfo.userID = value.trim(); - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - }, - onEditingComplete: () {}, - autofocus: false, - ), + Padding( + child: AppText( + TranslationBase.of(context).enterCredentials, + fontSize: 18, + fontWeight: FontWeight.w600, + ), + padding: EdgeInsets.only(top: 10, bottom: 10)), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterId, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + labelText: '', + borderColor: Colors.white, + // keyboardType: TextInputType.number, + textInputAction: TextInputAction.next, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).enterId, + // 'assets/images/user_id_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourID; + } + return null; + }, + onSaved: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onChanged: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + }, + // onEditingComplete: () {}, + // autofocus: false, + ) + ])), buildSizedBox(), - TextFormField( - focusNode: focusPass, - obscureText: true, - textInputAction: TextInputAction.next, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).enterPassword, - 'assets/images/password_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context).pleaseEnterPassword; - } - return null; - }, - onSaved: (value) { - userInfo.password = value; - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - helpers.showCupertinoPicker( - context, projectsList, 'facilityName', onSelectProject); - }, - onTap: () { - this.getProjects(userInfo.userID); - }, - ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterPassword, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + focusNode: focusPass, + obscureText: true, + borderColor: Colors.white, + textInputAction: TextInputAction.next, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).enterPassword, + // 'assets/images/password_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterPassword; + } + return null; + }, + onSaved: (value) { + userInfo.password = value; + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + helpers.showCupertinoPicker(context, projectsList, + 'facilityName', onSelectProject); + }, + onTap: () { + this.getProjects(userInfo.userID); + }, + ) + ])), buildSizedBox(), projectsList.length > 0 - ? TextFormField( - focusNode: focusProject, - controller: projectIdController, - onTap: () { - helpers.showCupertinoPicker(context, projectsList, - 'facilityName', onSelectProject); - }, - showCursor: false, - //readOnly: true, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).selectYourProject, - 'assets/images/password_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context) - .pleaseEnterYourProject; - } - return null; - }) - : TextFormField( - readOnly: true, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).pleaseEnterYourProject, - 'assets/images/password_icon.png')), + ? Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + focusNode: focusProject, + controller: projectIdController, + borderColor: Colors.white, + onTap: () { + helpers.showCupertinoPicker( + context, + projectsList, + 'facilityName', + onSelectProject); + }, + // showCursor: false, + // //readOnly: true, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).selectYourProject, + // 'assets/images/password_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourProject; + } + return null; + }) + ])) + : Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + readOnly: true, borderColor: Colors.white + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context) + // .pleaseEnterYourProject, + // 'assets/images/password_icon.png') + + ) + ])), buildSizedBox(), + Row( - mainAxisAlignment: MainAxisAlignment.end, children: [ - RaisedButton( - onPressed: () { + Expanded( + child: Button( + title: TranslationBase.of(context).login, + color: Colors.red[700], + onTap: () { login(context, authProv, widget.changeLoadingStata); }, - textColor: Colors.white, - elevation: 0.0, - padding: const EdgeInsets.all(0.0), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), - child: Container( - padding: const EdgeInsets.all(10.0), - height: 50, - width: SizeConfig.realScreenWidth * 0.35, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(TranslationBase.of(context).login, - style: TextStyle( - fontSize: SizeConfig.isMobilePortrait - ? 2.3 * SizeConfig.textMultiplier - : 2.3 * SizeConfig.textMultiplier)), - Image.asset('assets/images/login_btn_arrow_icon.png') - ], - ), - ), - ) + )), ], - ), + ) + // Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // RaisedButton( + // onPressed: () { + // login(context, authProv, widget.changeLoadingStata); + // }, + // textColor: Colors.white, + // elevation: 0.0, + // padding: const EdgeInsets.all(0.0), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10), + // side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), + // child: Container( + // padding: const EdgeInsets.all(10.0), + // height: 50, + // width: SizeConfig.realScreenWidth * 0.35, + // child: ), + // ) + // ], + // ), ], ), ), @@ -200,23 +296,24 @@ class _LoginFormState extends State { */ InputDecoration buildInputDecoration(BuildContext context, hint, asset) { return InputDecoration( - prefixIcon: Image.asset(asset), + // prefixIcon: Image.asset(asset), hintText: hint, hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), + fillColor: Colors.white, enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), + //borderRadius: BorderRadius.all(Radius.circular(20)), borderSide: BorderSide(color: HexColor('#CCCCCC')), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), + // borderRadius: BorderRadius.all(Radius.circular(10.0)), borderSide: BorderSide(color: Theme.of(context).primaryColor), ), errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), + // borderRadius: BorderRadius.all(Radius.circular(10.0)), borderSide: BorderSide(color: Theme.of(context).errorColor), ), focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), + // borderRadius: BorderRadius.all(Radius.circular(10.0)), borderSide: BorderSide(color: Theme.of(context).errorColor), ), ); diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 5e8d7674..cbd2e730 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -114,13 +114,13 @@ class _VerificationMethodsState extends State { } else { return SingleChildScrollView( child: Container( - height: SizeConfig.realScreenHeight, + height: SizeConfig.realScreenHeight * .9, width: SizeConfig.realScreenWidth, child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - // height: SizeConfig.realScreenHeight * 0.6, child: Column( children: [ user != null && isMoreOption == false @@ -130,13 +130,13 @@ class _VerificationMethodsState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ + AppText(TranslationBase.of(context) + .welcomeBack), AppText( - TranslationBase.of(context) - .welcomeBack + - ' ' + - user.doctorName, + Helpers.capitalize(user.doctorName), fontSize: SizeConfig.textMultiplier * 3.5, + fontWeight: FontWeight.bold, ), SizedBox( height: 20, @@ -145,55 +145,86 @@ class _VerificationMethodsState extends State { TranslationBase.of(context).accountInfo, fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.w600, ), SizedBox( height: 20, ), Card( - color: Colors.grey[300], + color: Colors.white, child: Row( children: [ Flexible( + flex: 4, child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginAt, - textAlign: TextAlign.center, - overflow: - TextOverflow.ellipsis, - ), - subtitle: Text( - user.editedOn != null - ? formatDate(Helpers - .convertStringToDate( - user.editedOn)) - : user.createdOn != null - ? formatDate(Helpers - .convertStringToDate(user - .createdOn)) - : '--', - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - )), + title: Text( + TranslationBase.of( + context) + .lastLoginAt, + overflow: TextOverflow + .ellipsis, + style: TextStyle( + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600, + ), + ), + subtitle: AppText( + getType( + user.logInTypeID, + context), + ) + // Text( + // user.editedOn != null + // ? formatDate(Helpers + // .convertStringToDate( + // user.editedOn)) + // : user.createdOn != null + // ? formatDate(Helpers + // .convertStringToDate(user + // .createdOn)) + // : '--', + // overflow: + // TextOverflow.ellipsis, + // style: TextStyle( + // fontFamily: 'Poppins'), + // textAlign: + // TextAlign.center), + )), Flexible( + flex: 2, child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginWith, - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - subtitle: Text( - getType(user.logInTypeID, - context), - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - )) + title: AppText( + user.editedOn != null + ? getDate(Helpers + .convertStringToDate( + user + .editedOn)) + : user.createdOn != + null + ? getDate(Helpers + .convertStringToDate( + user.createdOn)) + : '--', + textAlign: + TextAlign.right, + ), + subtitle: AppText( + user.editedOn != null + ? getTime(Helpers + .convertStringToDate( + user + .editedOn)) + : user.createdOn != + null + ? getTime(Helpers + .convertStringToDate( + user.createdOn)) + : '--', + textAlign: + TextAlign.right, + ), + )) ], )), ], @@ -232,6 +263,11 @@ class _VerificationMethodsState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ + // Expanded( + // child: + // getButton(3, authProv)), + // Expanded( + // child: getButton(4, authProv)) Expanded( child: InkWell( onTap: () => { @@ -243,7 +279,17 @@ class _VerificationMethodsState extends State { authProv))), Expanded( child: getButton(5, authProv)) - ]) + ]), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.center, + // children: [ + // Expanded( + // child: getButton(1, authProv)), + // Expanded( + // child: getButton(2, authProv)) + // ], + // ) ]) : Column( mainAxisAlignment: MainAxisAlignment.start, @@ -290,6 +336,7 @@ class _VerificationMethodsState extends State { child: Button( title: TranslationBase.of(context) .useAnotherAccount, + color: Colors.red[700], onTap: () { Navigator.of(context).pushNamed(LOGIN); }, @@ -424,25 +471,33 @@ class _VerificationMethodsState extends State { case 2: return InkWell( onTap: () => {authenticateUser(2, true, authProv)}, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(30, 15, 30, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - 'assets/images/login/104.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + Row( + children: [ + Image.asset( + 'assets/images/verify-whtsapp.png', + height: SizeConfig.imageSizeMultiplier * 13, + width: SizeConfig.imageSizeMultiplier * 16, + ), + ], ), SizedBox( height: 20, ), AppText( TranslationBase.of(context).verifyWhatsApp, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 2.2, ) ], ), @@ -451,16 +506,20 @@ class _VerificationMethodsState extends State { case 1: return InkWell( onTap: () => {authenticateUser(1, true, authProv)}, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/login/103.png', + 'assets/images/verify-sms.png', height: SizeConfig.imageSizeMultiplier * 13, width: SizeConfig.imageSizeMultiplier * 16, ), @@ -475,8 +534,7 @@ class _VerificationMethodsState extends State { TranslationBase.of(context).verifySMS, fontSize: projectsProvider.isArabic ? SizeConfig.textMultiplier * 1.8 - : SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + : SizeConfig.textMultiplier * 2.2, ) ], ), @@ -488,19 +546,20 @@ class _VerificationMethodsState extends State { if (checkIfBiometricAvailable(BiometricType.fingerprint)) {authenticateUser(3, true, authProv)} }, - child: RoundedContainer( - backgroundColor: - checkIfBiometricAvailable(BiometricType.fingerprint) - ? Colors.white - : Colors.white.withOpacity(.7), - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/login/102.png', + 'assets/images/verification_fingerprint_icon.png', height: SizeConfig.imageSizeMultiplier * 13, width: SizeConfig.imageSizeMultiplier * 16, ), @@ -509,8 +568,7 @@ class _VerificationMethodsState extends State { ), AppText( TranslationBase.of(context).verifyFingerprint, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 2.2, ) ], ), @@ -523,33 +581,40 @@ class _VerificationMethodsState extends State { authenticateUser(4, true, authProv); } }, - child: RoundedContainer( - backgroundColor: checkIfBiometricAvailable(BiometricType.face) - ? Colors.white - : Colors.white.withOpacity(.7), - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/login/101.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, - ), - SizedBox( - height: 20, + child: + // RoundedContainer( + // backgroundColor: checkIfBiometricAvailable(BiometricType.face) + // ? Colors.white + // : Colors.white.withOpacity(.7), + // borderColor: Colors.grey, + // showBorder: false, + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + margin: EdgeInsets.all(10), + child: Padding( + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/verification_faceid_icon.png', + height: SizeConfig.imageSizeMultiplier * 13, + width: SizeConfig.imageSizeMultiplier * 16, + ), + SizedBox( + height: 20, + ), + AppText( + TranslationBase.of(context).verifyFaceID, + fontSize: SizeConfig.textMultiplier * 2.2, + ) + ], ), - AppText( - TranslationBase.of(context).verifyFaceID, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, - ) - ], - ), - ))); + ))); break; default: @@ -559,13 +624,19 @@ class _VerificationMethodsState extends State { isMoreOption = true; }) }, - child: RoundedContainer( - backgroundColor: Colors.white, - borderColor: Colors.grey, - showBorder: true, + child: Container( + // backgroundColor: Colors.white, + // borderColor: Colors.grey, + // showBorder: false, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 0, 5, 5), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( 'assets/images/login/more_icon.png', @@ -574,15 +645,15 @@ class _VerificationMethodsState extends State { ), projectsProvider.isArabic ? SizedBox( - height: 15, + height: 20, ) : SizedBox( height: 10, ), AppText( TranslationBase.of(context).moreVerification, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 2.2, + // textAlign: TextAlign.center, ) ], ), @@ -800,4 +871,16 @@ class _VerificationMethodsState extends State { helpers.showErrorToast(err); }); } + + getDate(DateTime date) { + final DateFormat formatter = DateFormat('dd MMM yyyy'); + + return formatter.format(date); + } + + getTime(DateTime date) { + final DateFormat formatter = DateFormat('HH:mm a'); + + return formatter.format(date); + } } diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index fb5a9a0c..951e14ed 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -59,6 +60,7 @@ class SMSOTP { builder: (context) { projectProvider = Provider.of(context); return AlertDialog( + contentPadding: EdgeInsets.fromLTRB(24.0, 20.0, 0.0, 24.0), title: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ @@ -72,8 +74,8 @@ class SMSOTP { ) ], ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0))), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.all(Radius.circular(10.0))), content: StatefulBuilder(builder: (context, setState) { if (displayTime == '') { startTimer(setState); @@ -85,11 +87,23 @@ class SMSOTP { child: Center( child: SingleChildScrollView( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ type == 1 - ? Image.asset('assets/images/login/103.png') - : Image.asset('assets/images/login/104.png'), + ? Padding( + child: Icon( + DoctorApp.verify_sms_1, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ) + : Padding( + child: Icon( + DoctorApp.verify_whtsapp, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ), Padding( padding: EdgeInsets.only(top: 5), child: AppText( @@ -98,7 +112,8 @@ class SMSOTP { mobileNo .toString() .substring(mobileNo.toString().length - 3), - textAlign: TextAlign.center, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, )), Form( key: verifyAccountForm, @@ -220,13 +235,18 @@ class SMSOTP { ), Padding( padding: EdgeInsets.only(top: 10), - child: AppText( - TranslationBase.of(context).validationMessage + - ' ' + - displayTime, - color: Colors.red, - textAlign: TextAlign.center, - )) + child: Row(children: [ + AppText( + TranslationBase.of(context).validationMessage + ' ', + fontWeight: FontWeight.w600, + ), + AppText( + displayTime, + color: Colors.red, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + ) + ])) ], ))), ); @@ -248,15 +268,15 @@ class SMSOTP { // contentPadding: EdgeInsets.only(top: 20, bottom: 20), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), + borderSide: BorderSide(color: Colors.grey[100]), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).primaryColor), + borderSide: BorderSide(color: Colors.grey[100]), ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).errorColor), + borderSide: BorderSide(color: Colors.grey[100]), ), focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 60aa5415..337083a4 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -20,6 +20,7 @@ class AppScaffold extends StatelessWidget { final Widget bottomSheet; final Color backgroundColor; final Widget appBar; + final bool isHomeIcon; AppScaffold( {this.appBarTitle = '', this.body, @@ -28,6 +29,7 @@ class AppScaffold extends StatelessWidget { this.baseViewModel, this.bottomSheet, this.backgroundColor, + this.isHomeIcon = true, this.appBar}); @override @@ -60,12 +62,14 @@ class AppScaffold extends StatelessWidget { }), centerTitle: true, actions: [ - IconButton( - icon: Icon(DoctorApp.home_icon_active), - color: Colors.black, //Colors.black, - onPressed: () => Navigator.pushNamedAndRemoveUntil( - context, HOME, (r) => false), - ), + isHomeIcon + ? IconButton( + icon: Icon(DoctorApp.home_icon_active), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pushNamedAndRemoveUntil( + context, HOME, (r) => false), + ) + : SizedBox() ], ) : null,