diff --git a/assets/fonts/DoctorApp.ttf b/assets/fonts/DoctorApp.ttf index 86289098..21ce4a5d 100644 Binary files a/assets/fonts/DoctorApp.ttf and b/assets/fonts/DoctorApp.ttf differ diff --git a/assets/images/dr_app_logo.png b/assets/images/dr_app_logo.png new file mode 100644 index 00000000..cc9186c2 Binary files /dev/null and b/assets/images/dr_app_logo.png differ diff --git a/ios/Podfile.lock b/ios/Podfile.lock index cddfd571..0575cdb6 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -142,4 +142,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 -COCOAPODS: 1.10.0.beta.1 +COCOAPODS: 1.9.3 diff --git a/lib/client/app_client.dart b/lib/client/app_client.dart deleted file mode 100644 index 89b62722..00000000 --- a/lib/client/app_client.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/interceptor/http_interceptor.dart'; -import 'package:http/http.dart'; - -// OWNER : Ibrahim albitar -// DATE : 22-04-2020 -// DESCRIPTION : Custom App client to pin base url for all srvices - -class AppClient { - static Client client = HttpInterceptor().getClient(); - - static Future post(dynamic path, {dynamic body}) async { - String _fullUrl = BASE_URL + path; - final response = await client.post(_fullUrl, body: body); - return response; - } -} diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 3ca3d40a..d497d8f7 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -59,7 +59,7 @@ class BaseAppClient { body['stamp'] = STAMP; body['IPAdress'] = IP_ADDRESS; body['VersionID'] = VERSION_ID; - if (body['Channel'] == null) body['Channel'] = CHANNEL; + body['Channel'] = CHANNEL; body['SessionID'] = SESSION_ID; body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; body['PatientOutSA'] = 0; // PATIENT_OUT_SA; diff --git a/lib/config/config.dart b/lib/config/config.dart index e5b948ec..6549ada5 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -2,8 +2,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 93f4a6b8..9d7d73c9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -56,11 +56,8 @@ const Map> localizedValues = { 'en': 'Only Arrived Patient', 'ar': 'المريض الذي حضر للموعد' }, - 'searchMedicineNameHere': { - 'en': 'Search Medicine Name Here', - 'ar': 'ابحث عن الدواء هنا' - }, - 'youCanFind': {'en': 'You Can Find', 'ar': 'تستطيع ان تجد '}, + 'searchMedicineNameHere': {'en': 'Search Medicine ', 'ar': 'ابحث هنا'}, + 'youCanFind': {'en': 'You Can Find ', 'ar': 'تستطيع ان تجد '}, 'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'}, 'qrReader': {'en': 'QR Reader', 'ar': 'قارىء رمز الQR'}, 'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'}, @@ -220,4 +217,19 @@ const Map> localizedValues = { 'endcallwithcharge': {'en': 'End with charge', 'ar': 'ينتهي مع الشحن'}, 'endcall': {'en': 'End Call', 'ar': 'إنهاء المكالمة'}, 'transfertoadmin': {'en': 'Transfer to admin', 'ar': 'نقل إلى المسؤول'}, + "searchMedicineImageCaption": { + 'en': 'Type or speak the medicine name to search', + 'ar': ' اكتب أو انطق اسم الدواء للبحث' + }, + "type": {'en': 'Type or Speak', 'ar': 'اكتب أو تحدث '}, + "fromDate": {'en': 'From Date', 'ar': 'من تاريخ'}, + "toDate": {'en': 'To Date', 'ar': 'الى تاريخ'}, + "searchPatientImageCaptionTitle": { + 'en': 'SEARCH PATIENT', + 'ar': 'البحث عن المريض' + }, + "searchPatientImageCaptionBody": { + 'en': 'Add Details Of Patient To search', + 'ar': ' أضف تفاصيل المريض للبحث' + }, }; diff --git a/lib/icons_app/config.json b/lib/icons_app/config.json index f5a6bca1..fef927b0 100644 --- a/lib/icons_app/config.json +++ b/lib/icons_app/config.json @@ -8,7 +8,7 @@ "glyphs": [ { "uid": "9caed7b74de0f5a625ccb960f00d9c8d", - "css": "femaleicon", + "css": "female_icon", "code": 59392, "src": "custom_icons", "selected": true, @@ -17,7 +17,7 @@ "width": 986 }, "search": [ - "femaleicon" + "female_icon" ] }, { @@ -344,7 +344,7 @@ }, { "uid": "afe3a55435e46aeeeeae8f60731d4706", - "css": "medicinesearch", + "css": "medicine_search", "code": 59423, "src": "custom_icons", "selected": true, @@ -353,35 +353,7 @@ "width": 1346 }, "search": [ - "medicinesearch" - ] - }, - { - "uid": "c129853724095c9f90addf42325e14bc", - "css": "qr-code-1", - "code": 59424, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M970.7 746.1A29.3 29.3 0 0 0 941.4 775.4V941.4H775.4A29.3 29.3 0 1 0 775.4 1000H970.7A29.3 29.3 0 0 0 1000 970.7V775.4A29.3 29.3 0 0 0 970.7 746.1ZM224.6 941.4H58.6V775.4A29.3 29.3 0 1 0 0 775.4V970.7A29.3 29.3 0 0 0 29.3 1000H224.6A29.3 29.3 0 1 0 224.6 941.4ZM970.7 0H775.4A29.3 29.3 0 1 0 775.4 58.6H941.4V224.6A29.3 29.3 0 1 0 1000 224.6V29.3A29.3 29.3 0 0 0 970.7 0ZM29.3 253.9A29.3 29.3 0 0 0 58.6 224.6V58.6H224.6A29.3 29.3 0 1 0 224.6 0H29.3A29.3 29.3 0 0 0 0 29.3V224.6A29.3 29.3 0 0 0 29.3 253.9ZM617.2 412.1H851.6A29.3 29.3 0 0 0 880.8 382.8V148.4A29.3 29.3 0 0 0 851.6 119.2H617.2A29.3 29.3 0 0 0 587.9 148.4V382.8A29.3 29.3 0 0 0 617.2 412.1ZM646.5 177.8H822.2V353.5H646.5ZM382.8 587.9H148.4A29.3 29.3 0 0 0 119.2 617.2V851.6A29.3 29.3 0 0 0 148.4 880.8H382.8A29.3 29.3 0 0 0 412.1 851.6V617.2A29.3 29.3 0 0 0 382.8 587.9ZM353.5 822.3H177.8V646.5H353.5ZM880.9 851.6V734.4A29.3 29.3 0 0 0 822.3 734.4V822.3H734.4A29.3 29.3 0 1 0 734.4 880.9H851.6A29.3 29.3 0 0 0 880.9 851.6ZM617.2 529.3H822.2V617.2A29.3 29.3 0 1 0 880.8 617.2V500A29.3 29.3 0 0 0 851.6 470.7H617.2A29.3 29.3 0 0 0 617.2 529.3ZM617.2 822.3H529.3V734.4A29.3 29.3 0 1 0 470.7 734.4V851.6A29.3 29.3 0 0 0 500 880.8H617.2A29.3 29.3 0 0 0 617.2 822.2ZM382.8 119.2H148.4A29.3 29.3 0 0 0 119.2 148.4V382.8A29.3 29.3 0 0 0 148.4 412.1H382.8A29.3 29.3 0 0 0 412.1 382.8V148.4A29.3 29.3 0 0 0 382.8 119.2ZM353.5 353.5H177.8V177.8H353.5ZM734.4 705.1H617.2A29.3 29.3 0 0 0 617.2 763.7H734.4A29.3 29.3 0 0 0 734.4 705.1ZM500 646.5H734.4A29.3 29.3 0 0 0 734.4 587.9H529.3V500A29.3 29.3 0 0 0 470.7 500V617.2A29.3 29.3 0 0 0 500 646.5ZM148.4 529.3H226.6A29.3 29.3 0 1 0 226.6 470.7H148.4A29.3 29.3 0 1 0 148.4 529.3ZM382.8 470.7H343.8A29.3 29.3 0 1 0 343.8 529.3H382.8A29.3 29.3 0 0 0 382.8 470.7ZM500 412.1A29.3 29.3 0 0 0 529.3 382.8V265.6A29.3 29.3 0 1 0 470.7 265.6V382.8A29.3 29.3 0 0 0 500 412.1Z", - "width": 1000 - }, - "search": [ - "qr-code" - ] - }, - { - "uid": "6df6856cee070f6f2f1be832aff1920e", - "css": "referral-1", - "code": 59425, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M111.9 752A107.4 107.4 0 0 1 55.5 658.2 110.6 110.6 0 0 1 276.6 658.2 107.4 107.4 0 0 1 220.1 752.1 166.2 166.2 0 0 1 332 908.9V983.4A16.7 16.7 0 0 1 315.3 1000.1H16.7A16.7 16.7 0 0 1 0 983.4V908.8A166.2 166.2 0 0 1 111.9 752ZM243.3 658.2A77.3 77.3 0 1 0 166 732.7 76 76 0 0 0 243.3 658.2ZM33.3 966.6H298.8V908.8A132.6 132.6 0 0 0 33.4 908.8ZM111.8 201.7A107.4 107.4 0 0 1 55.5 107.8 110.6 110.6 0 0 1 276.6 107.8 107.4 107.4 0 0 1 220.3 201.7 166.2 166.2 0 0 1 332.1 358.5V433A16.7 16.7 0 0 1 315.4 449.7H16.7A16.7 16.7 0 0 1 0 433V358.4A166.2 166.2 0 0 1 111.8 201.7ZM243.3 107.8A77.3 77.3 0 0 0 88.9 107.8 77.3 77.3 0 0 0 243.3 107.8ZM33.3 416.3H298.8V358.4A132.6 132.6 0 0 0 33.4 358.4ZM462.6 492.6L368.8 411.8A16.7 16.7 0 0 1 390.6 386.5L494.7 476.2H612.1A16.7 16.7 0 1 1 612.1 509.6H494.5L390.3 595A18.6 18.6 0 0 1 366.8 592.7 16.3 16.3 0 0 1 369.2 569.2ZM707.4 452.7A126.1 126.1 0 0 1 676.3 369.9 128.7 128.7 0 0 1 933.8 369.9 126 126 0 0 1 902.7 452.7 184 184 0 0 1 1000 613.3V711.4A16.7 16.7 0 0 1 983.3 728.1H626.8A16.7 16.7 0 0 1 610.1 711.4V613.3A184 184 0 0 1 707.4 452.7ZM805.1 275.8A94.1 94.1 0 1 0 900.5 369.9 94.8 94.8 0 0 0 805.1 275.8ZM823.1 495.9A130.7 130.7 0 0 1 805.1 497.3 128.3 128.3 0 0 1 787.1 495.9V573.8L805.1 596.8 823.1 573.8ZM643.5 694.7H695.9V613A16.7 16.7 0 0 1 729.3 613V694.7H880.8V613A16.7 16.7 0 0 1 914.2 613V694.7H966.7V613.3A150.6 150.6 0 0 0 875.1 476.6 129 129 0 0 1 856.4 486.7V585.4L818.2 634.3A16.7 16.7 0 0 1 791.9 634.3L753.6 585.4V486.7A129.8 129.8 0 0 1 734.9 476.6 150.6 150.6 0 0 0 643.4 613.3V694.7Z", - "width": 1000 - }, - "search": [ - "referral" + "medicine_search" ] }, { @@ -398,20 +370,6 @@ "referred" ] }, - { - "uid": "dea3e85838e83dcd8818ec36186eae5e", - "css": "searchpatient", - "code": 59427, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M1142.7 436.8A165.2 165.2 0 1 0 1307.8 601.9 165.4 165.4 0 0 0 1142.7 436.8ZM1142.7 748.8A146.9 146.9 0 1 1 1289.5 601.9 147 147 0 0 1 1142.7 748.8ZM1023.4 611.1H1041.7A110.3 110.3 0 0 1 1151.8 500.9V482.7A128.5 128.5 0 0 0 1023.4 611.1ZM1476.4 883.8L1489.3 870.9 1357.9 739.4 1345 752.4 1322 729.4A219.8 219.8 0 1 0 1270.1 781.5L1293.1 804.5 1280.2 817.4 1411.4 948.7 1424.4 935.7 1306 817.3 1357.9 765.4ZM1142.6 803.9A201.9 201.9 0 1 1 1344.4 602 202.2 202.2 0 0 1 1142.6 803.9ZM1306 791.3L1284.7 770.1A220.1 220.1 0 0 0 1310.7 744.1L1332.1 765.5ZM48.4 483.9H301.4A96.4 96.4 0 0 1 276.7 346.5 305.1 305.1 0 0 1 257.9 242V201.9A201.8 201.8 0 0 1 564.5 29.2 201.8 201.8 0 0 1 871 201.8V205.4L887 177.2 957.1 299.9A80.6 80.6 0 0 1 869.7 417.5 96.9 96.9 0 0 1 785.1 499.2 226.4 226.4 0 0 1 645.1 662.2V696.2L780.4 720.8A267.4 267.4 0 0 1 999.9 983.9V999.9H129V983.9A267.4 267.4 0 0 1 348.6 720.8L483.9 696.2V662.3A224.6 224.6 0 0 1 396.8 602.3C396 602.6 395.1 602.8 394.3 603.1A92.8 92.8 0 0 1 352.9 612.9H48.4A48.4 48.4 0 0 1 0 564.5V532.3A48.4 48.4 0 0 1 48.4 483.9ZM339.5 465.8C339.3 461.1 338.7 456.4 338.7 451.7V341A64.2 64.2 0 0 0 339.5 465.7ZM838.7 242V201.9A169.6 169.6 0 0 0 575.1 60.8L564.5 67.8 554 60.8A169.6 169.6 0 0 0 290.3 201.9V242A273.2 273.2 0 0 0 302.3 322.2 96.2 96.2 0 0 1 338.7 308.1V282.4L403.2 234V193.5A32.3 32.3 0 0 1 435.5 161.3H693.5A32.3 32.3 0 0 1 725.8 193.5V233.9L790.3 282.3V307.8A95.4 95.4 0 0 1 810.8 313.9 78.8 78.8 0 0 1 817 299.9L837.7 263.6C838.3 256.4 838.7 249.2 838.7 242ZM435.5 290.4H693.6V193.5H435.5ZM887.9 387.2A47.6 47.6 0 0 0 929.3 316L887.1 242.2 844.9 315.9A47.6 47.6 0 0 0 887.6 387.1ZM838.8 403.2A79.4 79.4 0 0 1 807.4 348.1 63.2 63.2 0 0 0 790.4 340.9V451.6C790.4 456.4 790 461 789.7 465.7A64.5 64.5 0 0 0 838.7 403.2ZM758.1 451.6V298.4L725.9 274.3V290.4A32.3 32.3 0 0 1 693.6 322.6H435.5A32.3 32.3 0 0 1 403.2 290.4V274.3L370.9 298.4V451.6A195.2 195.2 0 0 0 374.4 486.4 92.8 92.8 0 0 1 394.3 493.6 60.6 60.6 0 0 0 421.2 500H532.2A48.4 48.4 0 1 1 532.2 596.7H436.9A193.2 193.2 0 0 0 758.1 451.6ZM532.3 564.5A16 16 0 1 0 532.3 532.2H516.3V564.5ZM637.4 727.6A80.7 80.7 0 0 1 583.6 771.6 64.5 64.5 0 0 0 645.1 806.4C680.7 806.4 709.6 784.7 709.6 758A36.4 36.4 0 0 0 704.4 739.7ZM161.8 967.8H967.2A235 235 0 0 0 774.7 752.6L740.8 746.5A64.8 64.8 0 0 1 742 758.2C742 802.6 698.6 838.8 645.2 838.8A102.9 102.9 0 0 1 564.6 802.6 102.9 102.9 0 0 1 483.9 838.7C430.4 838.7 387.1 802.5 387.1 758.1A65.9 65.9 0 0 1 388.2 746.4L354.4 752.6A235 235 0 0 0 161.8 967.8ZM424.5 739.9A36.4 36.4 0 0 0 419.4 758.2C419.4 784.9 448.3 806.6 483.9 806.6A64.5 64.5 0 0 0 545.4 771.8 80.6 80.6 0 0 1 491.6 727.7ZM516 677.4V693.4A48.4 48.4 0 1 0 612.8 693.4V672.1A222.6 222.6 0 0 1 516 672.1ZM379.6 574.3A92.9 92.9 0 0 1 421 564.5H483.9V532.3H421.2A93.1 93.1 0 0 1 379.9 522.5 60.6 60.6 0 0 0 352.9 516H129V580.5H352.9A60.6 60.6 0 0 0 379.9 574.3ZM32.1 564.5A16 16 0 0 0 48.1 580.5H96.8V516H48.4A16 16 0 0 0 32.4 532ZM524.9 368.4L507 341.5 410.3 406.1 428.2 432.9ZM718.5 405.8L621.8 341.3 603.9 368.1 700.6 432.7Z", - "width": 1489 - }, - "search": [ - "searchpatient" - ] - }, { "uid": "5af6e4cb377acd0ad97c464f6813ab1a", "css": "sync", @@ -523,6 +481,19 @@ "search": [ "scdedule_icon_active" ] + }, { + "uid": "a0f7dbb184f90f285a9cba8cf09a9b6a", + "css": "drawer_icon", + "code": 59429, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1564.7 1000H68C30.6 1000 0 958.7 0 908.2H0C0 857.6 30.6 816.3 68 816.3H1564.7C1602 816.3 1632.7 857.6 1632.7 908.2H1632.7C1632.7 958.7 1602 1000 1564.7 1000ZM911.6 591.8H68C30.6 591.8 0 550.5 0 500H0C0 449.5 30.6 408.2 68 408.2H911.6C949 408.2 979.6 449.5 979.6 500H979.6C979.6 550.5 949 591.8 911.6 591.8ZM1238.1 183.7H68C30.6 183.7 0 142.4 0 91.8H0C0 41.3 30.6 0 68 0H1238.1C1275.5 0 1306.1 41.3 1306.1 91.8H1306.1C1306.1 142.4 1275.5 183.7 1238.1 183.7Z", + "width": 1633 + }, + "search": [ + "drawer_icon" + ] } ] } \ 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 9180c929..80db55c1 100644 --- a/lib/icons_app/doctor_app_icons.dart +++ b/lib/icons_app/doctor_app_icons.dart @@ -21,7 +21,7 @@ class DoctorApp { static const _kFontFam = 'DoctorApp'; static const _kFontPkg = null; - static const IconData femaleicon = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData female_icon = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData male = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData reject_icon = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData home_icon_active = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); @@ -42,10 +42,12 @@ class DoctorApp { static const IconData patient = IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData radiology = IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData mail = IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData medicinesearch = IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData medicine_search = IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData qr_code = IconData(0xe820, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData referral = IconData(0xe821, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData referred = IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData search_patient = IconData(0xe823, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData sync_icon = IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData drawer_icon = IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg); + } diff --git a/lib/interceptor/http_interceptor.dart b/lib/interceptor/http_interceptor.dart deleted file mode 100644 index 958be49c..00000000 --- a/lib/interceptor/http_interceptor.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'dart:convert'; - -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/providers/auth_provider.dart'; -import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; -import 'package:http/http.dart'; -import 'package:http_interceptor/http_interceptor.dart'; - -import '../providers/auth_provider.dart'; -import '../util/dr_app_shared_pref.dart'; -import 'package:doctor_app_flutter/config/config.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); -List publicUrls = [ - LOGIN_URL, - SELECT_DEVICE_IMEI, - MEMBER_CHECK_ACTIVATION_CODE_NEW, - SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE -]; - -class HttpInterceptor extends InterceptorContract { - Client getClient() { - return HttpClientWithInterceptor.build(interceptors: [this]); - } - - Future interceptRequest({RequestData data}) async { - print('RequestData ${data.body}'); - print('RequestData ${data.url}'); - try { - data.headers["Content-Type"] = "application/json"; - data.headers["Accept"] = "application/json"; - // if (publicUrls.contains(data.url)) { - // var loggedUserInfo = await sharedPref.getObj(LOGGED_IN_USER); - // var token = await sharedPref.getString(TOKEN); - // // print("token"+token); - // // print('loggedUserInfo${loggedUserInfo["LogInTokenID"]}'); - // // // the sevices handel the token in differat name so I ask to be change - // // // we must change the imple - // var body = json.decode(data.body); - // body['LogInTokenID']=token; - // data.body = json.encode(body); - - // // data.body['LogInTokenID'] = ''; - // } else { - // if (data.body['LogInTokenID']) { - // data.body['LogInTokenID'] = ''; - // } - // if (data.body['TokenID']) { - // data.body['TokenID'] = ''; - // } - // } - } catch (e) { - print(e); - } - - // print('data.body${data.body}'); - return data; - } - - @override - Future interceptResponse({ResponseData data}) async { - // print('ResponseData ${data.body}'); - return data; - } -} diff --git a/lib/landing_page.dart b/lib/landing_page.dart index 5febcf56..c79d29d9 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -4,13 +4,14 @@ import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/services_screen.dart'; import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'icons_app/doctor_app_icons.dart'; + class LandingPage extends StatefulWidget { @override _LandingPageState createState() => _LandingPageState(); @@ -41,12 +42,13 @@ class _LandingPageState extends State { backgroundColor: Hexcolor('#515B5D'), textTheme: TextTheme( headline6: - TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), + TextStyle(color: Colors.white)), title: Text(getText(currentTab).toUpperCase()), leading: Builder( builder: (BuildContext context) { return IconButton( - icon: Icon(Icons.menu), + icon: Icon(DoctorApp.drawer_icon), + iconSize: 15, color: Colors.white, onPressed: () => Scaffold.of(context).openDrawer(), ); diff --git a/lib/providers/patients_provider.dart b/lib/providers/patients_provider.dart index 15c9e1e4..805b48dd 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -1,6 +1,5 @@ import 'dart:convert'; -import 'package:doctor_app_flutter/client/app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 4e2dbfc6..004f1d04 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -85,7 +85,7 @@ class _DashboardScreenState extends State { Column( children: [ Container( - height: 150, + height: 140, color: Hexcolor('#515B5D'), width: double.infinity, child: FractionallySizedBox( @@ -101,7 +101,7 @@ class _DashboardScreenState extends State { children: [ AppText( "Welcome", - fontSize: SizeConfig.textMultiplier * 2, + fontSize: SizeConfig.textMultiplier * 1.7, color: Colors.white, ) ], @@ -130,7 +130,7 @@ class _DashboardScreenState extends State { : authProvider.doctorProfile .clinicDescription, fontSize: - SizeConfig.textMultiplier * 2, + SizeConfig.textMultiplier * 1.7, color: Colors.white, ), alignment: projectsProvider.isArabic @@ -201,14 +201,14 @@ class _DashboardScreenState extends State { ), Container( color: Colors.white, - height: 150, + height: 90, ), ], ), Positioned( - right: 0.0, - left: 0, - bottom: 40, + right: 9.0, + left: 9, + bottom: 19, child: Container( decoration: BoxDecoration( color: Hexcolor("#DED8CF"), @@ -376,10 +376,11 @@ class _DashboardScreenState extends State { ) ]), FractionallySizedBox( - widthFactor: 0.95, + widthFactor: 0.90, child: Container( color: Colors.white, child: Column( + mainAxisAlignment: MainAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -544,7 +545,7 @@ class _DashboardScreenState extends State { width: MediaQuery .of(context) .size - .width * 0.45, + .width * 0.44, height: MediaQuery .of(context) .orientation == Orientation.portrait @@ -598,7 +599,7 @@ class _DashboardScreenState extends State { width: MediaQuery .of(context) .size - .width * 0.45, + .width * 0.44, height: MediaQuery .of(context) .orientation == Orientation.portrait @@ -693,7 +694,7 @@ class _DashboardScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Icon( - DoctorApp.medicinesearch, + DoctorApp.medicine_search, size: 50, color: Colors.black, ), diff --git a/lib/screens/live_care/panding_list.dart b/lib/screens/live_care/panding_list.dart index ad129d55..a59d7f05 100644 --- a/lib/screens/live_care/panding_list.dart +++ b/lib/screens/live_care/panding_list.dart @@ -128,7 +128,7 @@ class _LiveCarePandingListState extends State { ? DoctorApp .male : DoctorApp - .femaleicon, + .female_icon, size: 80, )), ], diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 48a53af3..d45c7349 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -1,10 +1,12 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/medicine/medicine_item_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -13,7 +15,6 @@ 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'; import 'package:provider/provider.dart'; - import '../../util/extenstions.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -89,124 +90,154 @@ class _MedicineSearchState extends State { Widget build(BuildContext context) { return AppScaffold( appBarTitle: TranslationBase.of(context).searchMedicine, - body: Column( - children: [ - Padding( - padding: EdgeInsets.only( - bottom: SizeConfig.heightMultiplier * 1, - right: SizeConfig.heightMultiplier * 2, - left: SizeConfig.heightMultiplier * 2, - top: SizeConfig.heightMultiplier * 3), - child: AppTextFormField( - hintText: TranslationBase.of(context).searchMedicineNameHere, - controller: myController, - onSaved: (value) {}, - onFieldSubmitted: (value) { - searchMedicine(context); - }, - textInputAction: TextInputAction.search, - prefix: IconButton( - icon: Icon(Icons.mic), - color: - lastStatus == 'listening' ? Colors.red : Colors.grey, - onPressed: () { - myController.text = ''; - setState(() { - lastStatus = 'listening'; - }); - - startVoiceSearch(); - }), - inputFormatter: ONLY_LETTERS), - ), - Container( - margin: EdgeInsets.only( - bottom: SizeConfig.heightMultiplier * 1, - right: SizeConfig.heightMultiplier * 2, - left: SizeConfig.heightMultiplier * 2, - top: SizeConfig.heightMultiplier * 1), - child: Wrap( - alignment: WrapAlignment.center, + body: FractionallySizedBox( + widthFactor: 0.97, + child: ListView( + children: [ + Column( children: [ - AppButton( - title: TranslationBase.of(context).search, - color: Color(PRIMARY_COLOR), - onPressed: () { - searchMedicine(context); - }, + Container( + child: Icon( + DoctorApp.medicine_search, + size: 100, + color: Colors.black, + ), + margin: EdgeInsets.only(top: 50), ), - ], - ), - ), - Container( - margin: EdgeInsets.only(left: SizeConfig.heightMultiplier * 2), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).youCanFind + - (_medicineProvider.pharmacyItemsList == null - ? "0" - : _medicineProvider.pharmacyItemsList.length - .toString()) + - TranslationBase.of(context).itemsInSearch, - fontWeight: FontWeight.bold, - margin: 5, + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: AppText( + TranslationBase.of(context).type.toUpperCase(), + fontWeight: FontWeight.bold, + fontSize: SizeConfig.heightMultiplier * 2.5, + ), ), + Padding( + padding: const EdgeInsets.only(top: 5.0), + child: AppText( + TranslationBase.of(context).searchMedicineImageCaption, + fontSize: SizeConfig.heightMultiplier * 2, + ), + ) ], ), - ), - Expanded( - child: Container( - width: SizeConfig.screenWidth * 0.90, - child: !_medicineProvider.isFinished - ? DrAppCircularProgressIndeicator() - : _medicineProvider.hasError - ? Center( - child: Text( - _medicineProvider.errorMsg, - style: TextStyle( - color: Theme.of(context).errorColor), + SizedBox(height: 15,), + FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Container( + child: AppTextFormField( + hintText: TranslationBase.of(context).searchMedicineNameHere, + controller: myController, + onSaved: (value) {}, + onFieldSubmitted: (value) { + searchMedicine(context); + }, + textInputAction: TextInputAction.search, + prefix: IconButton( + icon: Icon(Icons.mic), + color: + lastStatus == 'listening' ? Colors.red : Colors.grey, + onPressed: () { + myController.text = ''; + setState(() { + lastStatus = 'listening'; + }); + + startVoiceSearch(); + }), + inputFormatter: ONLY_LETTERS), + ), + SizedBox(height: 15,), + + Container( + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: TranslationBase + .of(context) + .search, + onPressed: () { + searchMedicine(context); + }, + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(left: SizeConfig.heightMultiplier * 2), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase + .of(context) + .youCanFind + + _medicineProvider.pharmacyItemsList.length + .toString() +" "+ + TranslationBase + .of(context) + .itemsInSearch, + fontWeight: FontWeight.bold, + ), + ], + ), + ), + Container( + child: !_medicineProvider.isFinished + ? DrAppCircularProgressIndeicator() + : _medicineProvider.hasError + ? Center( + child: Text( + _medicineProvider.errorMsg, + style: TextStyle( + color: Theme.of(context).errorColor), + ), + ) + : ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: _medicineProvider.pharmacyItemsList == + null + ? 0 + : _medicineProvider.pharmacyItemsList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: + _medicineProvider.pharmacyItemsList[index] + ["ItemDescription"], + url: + _medicineProvider.pharmacyItemsList[index] + ["ProductImageBase64"], ), - ) - : ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: _medicineProvider.pharmacyItemsList == - null - ? 0 - : _medicineProvider.pharmacyItemsList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - child: MedicineItemWidget( - label: - _medicineProvider.pharmacyItemsList[index] - ["ItemDescription"], - url: - _medicineProvider.pharmacyItemsList[index] - ["ImageThumbUrl"], + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + PharmaciesListScreen( + itemID: _medicineProvider + .pharmacyItemsList[index] + ["ItemID"], + url: _medicineProvider + .pharmacyItemsList[index] + ["ProductImageBase64"]), ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - PharmaciesListScreen( - itemID: _medicineProvider - .pharmacyItemsList[index] - ["ItemID"], - url: _medicineProvider - .pharmacyItemsList[index] - ["ProductImageBase64"]), - ), - ); - }, ); }, - ), + ); + }, + ), + ), + ], + ), ), - ), - ], + + ], + ), )); } diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 54eaf5ee..2a36c216 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -1,26 +1,27 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/providers/project_provider.dart'; import 'package:doctor_app_flutter/routes.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:flutter/material.dart'; +import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; +import '../../config/config.dart'; import '../../config/size_config.dart'; +import '../../lookups/patient_lookup.dart'; +import '../../models/doctor/doctor_profile_model.dart'; +import '../../widgets/patients/dynamic_elements.dart'; import '../../widgets/shared/app_buttons_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/app_text_form_field.dart'; import '../../widgets/shared/app_texts_widget.dart'; import '../../widgets/shared/rounded_container_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; - -import '../../lookups/patient_lookup.dart'; -import '../../widgets/patients/dynamic_elements.dart'; -import '../../config/config.dart'; -import '../../models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:provider/provider.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = Helpers(); @@ -126,10 +127,35 @@ class _PatientSearchScreenState extends State { RoundedContainer( child: Column( children: [ - Icon( - Icons.search, - size: SizeConfig.imageSizeMultiplier * 15, + Column( + children: [ + Container( + child: Icon( + DoctorApp.search_patient, + size: 100, + color: Colors.black, + ), + margin: EdgeInsets.only(top: 10), + ), + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: AppText( + TranslationBase.of(context).searchPatientImageCaptionTitle.toUpperCase(), + fontWeight: FontWeight.bold, + fontSize: SizeConfig.heightMultiplier * 2.5, + ), + ), + Padding( + padding: const EdgeInsets.only(top: 5.0), + child: AppText( + TranslationBase.of(context) + .searchPatientImageCaptionBody, + fontSize: SizeConfig.heightMultiplier * 2, + ), + ) + ], ), + Container( padding: EdgeInsets.all(15), width: SizeConfig.screenWidth * 1, @@ -143,20 +169,18 @@ class _PatientSearchScreenState extends State { height: 5, ), Container( + height: 40.0, decoration: ShapeDecoration( shape: RoundedRectangleBorder( side: BorderSide( width: 1.0, style: BorderStyle.solid, - color: Color(0xff707070)), + color: Hexcolor("#CCCCCC")), borderRadius: - BorderRadius.all(Radius.circular(5.0)), + BorderRadius.all(Radius.circular(6.0)), ), ), - // margin: 0, - // showBorder: true, - // raduis: 30, - // borderColor: Color(0xff707070), + width: double.infinity, child: Padding( padding: EdgeInsets.only( @@ -171,53 +195,54 @@ class _PatientSearchScreenState extends State { // add Expanded to have your dropdown button fill remaining space child: DropdownButtonHideUnderline( child: DropdownButton( - isExpanded: true, - value: _selectedType, - iconSize: 40, - elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return PATIENT_TYPE.map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - children: [ - !projectsProvider.isArabic - ? AppText( - item['text'], - fontSize: SizeConfig - .textMultiplier * - 2.1, - ) - : AppText( - item['text_ar'], - fontSize: SizeConfig - .textMultiplier * - 2.1, - ), - ], - ); - }).toList(); - }, - onChanged: (String newValue) => { - setState(() { - _selectedType = newValue; - selectedPatientType = - int.parse(_selectedType); - }) - }, - items: PATIENT_TYPE.map((item) { - !projectsProvider.isArabic - ? itemText = item['text'] - : itemText = item['text_ar']; - return DropdownMenuItem( - child: Text( - itemText, - textAlign: TextAlign.end, - ), - value: item['val'], - ); - }).toList(), - )), + isExpanded: true, + value: _selectedType, + iconSize: 25, + elevation: 16, + selectedItemBuilder: + (BuildContext context) { + return PATIENT_TYPE.map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + !projectsProvider.isArabic + ? AppText( + item['text'], + fontSize: SizeConfig + .textMultiplier * + 2.1, + ) + : AppText( + item['text_ar'], + fontSize: SizeConfig + .textMultiplier * + 2.1, + ), + ], + ); + }).toList(); + }, + onChanged: (String newValue) => + { + setState(() { + _selectedType = newValue; + selectedPatientType = + int.parse(_selectedType); + }) + }, + items: PATIENT_TYPE.map((item) { + !projectsProvider.isArabic + ? itemText = item['text'] + : itemText = item['text_ar']; + return DropdownMenuItem( + child: Text( + itemText, + textAlign: TextAlign.end, + ), + value: item['val'], + ); + }).toList(), + )), ), ], ), @@ -226,134 +251,212 @@ class _PatientSearchScreenState extends State { SizedBox( height: 10, ), - AppTextFormField( - hintText: TranslationBase.of(context).firstName, - onSaved: (value) { - value == null - ? _patientSearchFormValues.setFirstName = - "0" - : _patientSearchFormValues.setFirstName = - value; + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: Hexcolor("#CCCCCC")) + ), + padding: EdgeInsets.only(top: 5), + child: AppTextFormField( - if (value.toString().trim().isEmpty) { - _patientSearchFormValues.setFirstName = "0"; - } - }, - // validator: (value) { - // return TextValidator().validateName(value); - // }, - inputFormatter: ONLY_LETTERS), - SizedBox( - height: 10, + labelText: TranslationBase + .of(context) + .firstName, + borderColor: Colors.white, + + onSaved: (value) { + value == null + ? _patientSearchFormValues.setFirstName = + "0" + : _patientSearchFormValues.setFirstName = + value; + + if (value + .toString() + .trim() + .isEmpty) { + _patientSearchFormValues.setFirstName = "0"; + } + }, + // validator: (value) { + // return TextValidator().validateName(value); + // }, + inputFormatter: ONLY_LETTERS), ), - AppTextFormField( - hintText: TranslationBase.of(context).middleName, - onSaved: (value) { - value == null - ? _patientSearchFormValues.setMiddleName = - "0" - : _patientSearchFormValues.setMiddleName = - value; - if (value.toString().trim().isEmpty) { - _patientSearchFormValues.setMiddleName = "0"; - } - }, - // validator: (value) { - // return TextValidator().validateName(value); - // }, - inputFormatter: ONLY_LETTERS), SizedBox( height: 10, ), - AppTextFormField( - hintText: TranslationBase.of(context).lastName, - onSaved: (value) { - value == null - ? _patientSearchFormValues.setLastName = "0" - : _patientSearchFormValues.setLastName = - value; - if (value.toString().trim().isEmpty) { - _patientSearchFormValues.setLastName = "0"; - } - }, - inputFormatter: ONLY_LETTERS), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: Hexcolor("#CCCCCC")) + ), + padding: EdgeInsets.only(top: 5), + child: AppTextFormField( + labelText: TranslationBase + .of(context) + .middleName, + borderColor: Colors.white, + onSaved: (value) { + value == null + ? _patientSearchFormValues.setMiddleName = + "0" + : _patientSearchFormValues.setMiddleName = + value; + if (value + .toString() + .trim() + .isEmpty) { + _patientSearchFormValues.setMiddleName = + "0"; + } + }, + // validator: (value) { + // return TextValidator().validateName(value); + // }, + inputFormatter: ONLY_LETTERS), + ), SizedBox( height: 10, ), - AppTextFormField( - textInputType: TextInputType.number, - hintText: TranslationBase.of(context).phoneNumber, - // validator: (value) { - // return TextValidator().validateMobile(value); - // }, - inputFormatter: ONLY_NUMBERS, - onSaved: (value) { - value == null - ? _patientSearchFormValues - .setPatientMobileNumber = "0" - : _patientSearchFormValues - .setPatientMobileNumber = value; - - if (value.toString().trim().isEmpty) { - _patientSearchFormValues - .setPatientMobileNumber = "0"; - } - }, + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: Hexcolor("#CCCCCC")) + ), + padding: EdgeInsets.only(top: 5), + child: AppTextFormField( + labelText: TranslationBase + .of(context) + .lastName, + borderColor: Colors.white, + onSaved: (value) { + value == null + ? + _patientSearchFormValues.setLastName = "0" + : _patientSearchFormValues.setLastName = + value; + if (value + .toString() + .trim() + .isEmpty) { + _patientSearchFormValues.setLastName = "0"; + } + }, + inputFormatter: ONLY_LETTERS), ), SizedBox( height: 10, ), - AppTextFormField( + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: Hexcolor("#CCCCCC")) + ), + padding: EdgeInsets.only(top: 5), + child: AppTextFormField( + labelText: TranslationBase + .of(context) + .phoneNumber, + borderColor: Colors.white, textInputType: TextInputType.number, - hintText: TranslationBase.of(context).patientID, - // inputFormatter: ONLY_NUMBERS, onSaved: (value) { - // _patientSearchFormValues.PatientID = 89000; - value == null - ? _patientSearchFormValues.setPatientID = 0 - : _patientSearchFormValues.setPatientID = - int.parse(value); - if (value.toString().trim().isEmpty) { - _patientSearchFormValues.setPatientID = 0; + ? _patientSearchFormValues + .setPatientMobileNumber = "0" + : _patientSearchFormValues + .setPatientMobileNumber = value; + + if (value + .toString() + .trim() + .isEmpty) { + _patientSearchFormValues + .setPatientMobileNumber = "0"; } - }), + }, + ), + ), + SizedBox( + height: 10, + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: Hexcolor("#CCCCCC")) + ), + padding: EdgeInsets.only(top: 5), + child: AppTextFormField( + labelText: TranslationBase + .of(context) + .patientID, + borderColor: Colors.white, + textInputType: TextInputType.number, + inputFormatter: ONLY_NUMBERS, + onSaved: (value) { + value == null + ? + _patientSearchFormValues.setPatientID = 0 + : _patientSearchFormValues.setPatientID = + int.parse(value); + if (value + .toString() + .trim() + .isEmpty) { + _patientSearchFormValues.setPatientID = 0; + } + }), + ), SizedBox( height: 10, ), - AppTextFormField( - textInputType: TextInputType.number, - hintText: TranslationBase.of(context).patientFile, - // validator: (value) { - // return TextValidator().validateIdNumber(value); - // }, - inputFormatter: ONLY_NUMBERS, - onSaved: (value) { - //_patientSearchFormValues. = value; - }, + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: Hexcolor("#CCCCCC")) + ), + padding: EdgeInsets.only(top: 5), + child: AppTextFormField( + labelText: TranslationBase + .of(context) + .patientFile, + borderColor: Colors.white, + textInputType: TextInputType.number, + inputFormatter: ONLY_NUMBERS, + onSaved: (value) {}, + ), ), (!(_selectedType == '2' || _selectedType == '4')) ? DynamicElements(_patientSearchFormValues) : SizedBox( - height: 0, - ), + height: 0, + ), SizedBox( height: 10, ), Container( - // margin: 0, - // showBorder: true, - // raduis: 30, - // borderColor: Color(0xff707070), + height: 40.0, decoration: ShapeDecoration( shape: RoundedRectangleBorder( side: BorderSide( width: 1.0, style: BorderStyle.solid, - color: Color(0xff707070)), + color: Hexcolor("#CCCCCC")), borderRadius: - BorderRadius.all(Radius.circular(5.0)), + BorderRadius.all(Radius.circular(6.0)), ), ), width: double.infinity, @@ -370,29 +473,29 @@ class _PatientSearchScreenState extends State { // add Expanded to have your dropdown button fill remaining space child: DropdownButtonHideUnderline( child: DropdownButton( - isExpanded: true, - value: _selectedLocation, - iconSize: 40, - elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return LOCATIONS.map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - children: [ - !projectsProvider.isArabic - ? AppText( - item['text'], - fontSize: SizeConfig - .textMultiplier * - 2.1, - ) - : AppText( - item['text-ar'], - fontSize: SizeConfig - .textMultiplier * - 2.1, - ) + isExpanded: true, + value: _selectedLocation, + iconSize: 25, + elevation: 16, + selectedItemBuilder: + (BuildContext context) { + return LOCATIONS.map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + !projectsProvider.isArabic + ? AppText( + item['text'], + fontSize: SizeConfig + .textMultiplier * + 2.1, + ) + : AppText( + item['text-ar'], + fontSize: SizeConfig + .textMultiplier * + 2.1, + ) ], ); }).toList(); @@ -414,25 +517,43 @@ class _PatientSearchScreenState extends State { value: item['val'], ); }).toList(), - )), + )), ), ], ), ), ), + SizedBox( + height: 10, + ), Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Checkbox( - value: true, - activeColor: Color(0xffFFDDD9), - onChanged: (bool newValue) {}), - AppText( - TranslationBase.of(context) - .onlyArrivedPatient, - fontSize: SizeConfig.textMultiplier * 2), - ])), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: Hexcolor("#CCCCCC")) + ), + height: 25, + width: 25, + child: Checkbox( + value: true, + checkColor: Hexcolor("#2A930A"), + activeColor: Colors.white, + onChanged: (bool newValue) {}), + ), + SizedBox(width: 12,), + AppText( + TranslationBase + .of(context) + .onlyArrivedPatient, + fontSize: SizeConfig.textMultiplier * + 2), + ])), SizedBox( height: 10, ), @@ -450,7 +571,6 @@ class _PatientSearchScreenState extends State { children: [ AppButton( title: TranslationBase.of(context).search, - color: Color(0xff58434F), onPressed: () { _validateInputs(); }, diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 5e64a805..59346cfc 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -442,7 +442,7 @@ class _PatientsScreenState extends State { ? DoctorApp .male : DoctorApp - .femaleicon, + .female_icon, size: 80, )), ], diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index a8821dda..6e01b3c2 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -233,14 +233,35 @@ class TranslationBase { String get livecare => localizedValues['livecare'][locale.languageCode]; String get beingBad => localizedValues['beingBad'][locale.languageCode]; String get beingGreat => localizedValues['beingGreat'][locale.languageCode]; + String get cancel => localizedValues['cancel'][locale.languageCode]; + String get done => localizedValues['done'][locale.languageCode]; + + String get searchMedicineImageCaption => + localizedValues['searchMedicineImageCaption'][locale.languageCode]; + + String get type => localizedValues['type'][locale.languageCode]; + String get resumecall => localizedValues['resumecall'][locale.languageCode]; + String get endcallwithcharge => localizedValues['endcallwithcharge'][locale.languageCode]; + String get endcall => localizedValues['endcall'][locale.languageCode]; + String get transfertoadmin => localizedValues['transfertoadmin'][locale.languageCode]; + + String get fromDate => localizedValues['toDate'][locale.languageCode]; + + String get toDate => localizedValues['toDate'][locale.languageCode]; + + String get searchPatientImageCaptionTitle => + localizedValues['searchPatientImageCaptionTitle'][locale.languageCode]; + + String get searchPatientImageCaptionBody => + localizedValues['searchPatientImageCaptionBody'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/auth/auth_header.dart b/lib/widgets/auth/auth_header.dart index e577d8b1..fb2cf322 100644 --- a/lib/widgets/auth/auth_header.dart +++ b/lib/widgets/auth/auth_header.dart @@ -67,15 +67,7 @@ class AuthHeader extends StatelessWidget { } Image buildImageLogo() { - String img = 'assets/images/login_icon.png'; - if (userType == loginType.unknownUser) { - img = 'assets/images/welcome_login_icon.png'; - } - if (userType == loginType.verifyPassword || - userType == loginType.verificationMethods) { - img = 'assets/images/verified_icon.png'; - } - + String img = 'assets/images/dr_app_logo.png'; return Image.asset( img, fit: BoxFit.cover, diff --git a/lib/widgets/doctor/doctor_reply_widget.dart b/lib/widgets/doctor/doctor_reply_widget.dart index 3413749a..51f0e94d 100644 --- a/lib/widgets/doctor/doctor_reply_widget.dart +++ b/lib/widgets/doctor/doctor_reply_widget.dart @@ -63,7 +63,7 @@ class _DoctorReplyWidgetState extends State { ), width: 80, height: 80, - child: Icon(widget.reply.gender == 1 ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)), + child: Icon(widget.reply.gender == 1 ? DoctorApp.male : DoctorApp.female_icon,size: 80,)), SizedBox(width: 15,), Expanded( diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart index 36808cb0..25d196d0 100644 --- a/lib/widgets/patients/dynamic_elements.dart +++ b/lib/widgets/patients/dynamic_elements.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -68,34 +69,17 @@ class _DynamicElementsState extends State { ), AppTextFormField( textInputType: TextInputType.number, - hintText: 'From', + hintText: TranslationBase.of(context).fromDate, controller: _fromDateController, - inputFormatter: ONLY_DATE, onTap: () { _presentDatePicker('_selectedFromDate'); }, - - // validator: (value) { - // return TextValidator().validateDate(_fromDateController.text); - // }, - /* - *@author: Amjad Amireh - *@Date:13/5/2020 - *@param: - *@return:check if field empty added static value - - *@desc: - */ onSaved: (value) { if (_fromDateController.text.toString().trim().isEmpty) { widget._patientSearchFormValues.From = "0"; } else { widget._patientSearchFormValues.From = _fromDateController.text.replaceAll("/", "-"); - - - - // _fromDateController.text; } }, ), @@ -104,28 +88,23 @@ class _DynamicElementsState extends State { ), AppTextFormField( textInputType: TextInputType.number, - hintText: 'TO', + hintText: TranslationBase + .of(context) + .toDate, controller: _toDateController, onTap: () { _presentDatePicker('_selectedToDate'); }, - // validator: (value) { - // return TextValidator().validateDate(_toDateController.text); - // }, - /* - *@author: Amjad Amireh - *@Date:13/5/2020 - *@param: - *@return:check if field empty added static value - - *@desc: - */ inputFormatter: ONLY_DATE, onSaved: (value) { - if (_toDateController.text.toString().trim().isEmpty) { + if (_toDateController.text + .toString() + .trim() + .isEmpty) { widget._patientSearchFormValues.To = "0"; } else { - widget._patientSearchFormValues.To = _toDateController.text.replaceAll("/", "-"); + widget._patientSearchFormValues.To = + _toDateController.text.replaceAll("/", "-"); } }, ), diff --git a/lib/widgets/shared/app_buttons_widget.dart b/lib/widgets/shared/app_buttons_widget.dart index 7b911d9a..cc0d054e 100644 --- a/lib/widgets/shared/app_buttons_widget.dart +++ b/lib/widgets/shared/app_buttons_widget.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'app_texts_widget.dart'; @@ -14,7 +15,7 @@ class AppButton extends StatefulWidget { final double fontSize; final double padding; - AppButton({@required this.onPressed, this.title, this.icon, this.color, this.fontSize = 2.5, this.padding = 15}); + AppButton({@required this.onPressed, this.title, this.icon, this.color, this.fontSize = 2, this.padding = 5}); _AppButtonState createState() => _AppButtonState(); @@ -25,37 +26,38 @@ class AppButton extends StatefulWidget { Widget build(BuildContext context) { return RawMaterialButton( - fillColor: widget.color, - splashColor: widget.color, - child: Padding( - padding: EdgeInsets.only( - top: 15, - bottom: 15, - //right: SizeConfig.widthMultiplier * widget.padding, - //left: SizeConfig.widthMultiplier * widget.padding - ), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (widget.icon != null) Icon( + fillColor: widget.color != null ? widget.color : Hexcolor("#B8382C"), + splashColor: widget.color, + child: Padding( + padding: EdgeInsets.only( + top: widget.padding, + bottom: widget.padding, + //right: SizeConfig.widthMultiplier * widget.padding, + //left: SizeConfig.widthMultiplier * widget.padding + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (widget.icon != null) + Icon( widget.icon, color: Colors.white, ), - if (widget.icon != null) SizedBox( + if (widget.icon != null) + SizedBox( width: 5.0, ), - AppText( - widget.title, - color: Colors.white, + AppText( + widget.title.toUpperCase(), + color: Colors.white, fontSize: SizeConfig.textMultiplier * widget.fontSize , - fontWeight: FontWeight.bold, ), ], ), ), onPressed: widget.onPressed, - shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), + shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(6))), ); } } \ No newline at end of file diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 60828f71..1dc27114 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -25,14 +25,14 @@ class AppScaffold extends StatelessWidget { AppGlobal.CONTEX = context; ProjectProvider projectProvider = Provider.of(context); return Scaffold( - backgroundColor: Hexcolor('#F5F5F5'), + backgroundColor: Colors.white, appBar: isShowAppBar ? AppBar( elevation: 0, backgroundColor: Hexcolor('#515B5D'), textTheme: TextTheme( headline6: TextStyle( - color: Colors.white, fontWeight: FontWeight.bold)), + color: Colors.white)), title: Text(appBarTitle.toUpperCase()), leading: Builder(builder: (BuildContext context) { return IconButton( diff --git a/lib/widgets/shared/app_text_form_field.dart b/lib/widgets/shared/app_text_form_field.dart index efe8d389..332d2219 100644 --- a/lib/widgets/shared/app_text_form_field.dart +++ b/lib/widgets/shared/app_text_form_field.dart @@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:hexcolor/hexcolor.dart'; // OWNER : Ibrahim albitar // DATE : 19-04-2020 @@ -21,7 +22,9 @@ class AppTextFormField extends FormField { FocusNode focusNode, TextInputAction textInputAction, ValueChanged onFieldSubmitted, - IconButton prefix}) + IconButton prefix, + String labelText, + borderColor}) : super( onSaved: onSaved, validator: validator, @@ -29,36 +32,45 @@ class AppTextFormField extends FormField { builder: (FormFieldState state) { return Column( children: [ - TextFormField( - focusNode: focusNode, - keyboardType: textInputType, - inputFormatters: [ - WhitelistingTextInputFormatter(RegExp(inputFormatter)), - ], - onChanged: onChanged ?? - (value) { - state.didChange(value); - }, - textInputAction: textInputAction, - onFieldSubmitted: onFieldSubmitted, - decoration: InputDecoration( - hintText: hintText, - suffixIcon: prefix, - hintStyle: - TextStyle(fontSize: SizeConfig.textMultiplier * 2), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Color(0xff707070)), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - ) - //BorderRadius.all(Radius.circular(20)); - ), - onTap: onTap, - controller: controller, - ), - state.hasError + SizedBox( + height: 40.0, + child: TextFormField( + focusNode: focusNode, + keyboardType: textInputType, + inputFormatters: [WhitelistingTextInputFormatter(RegExp(inputFormatter)), + ],onChanged: onChanged?? (value){ + state.didChange(value); + }, + textInputAction: textInputAction, + onFieldSubmitted: onFieldSubmitted, + decoration: InputDecoration( + hintText: hintText, + suffixIcon: prefix, + hintStyle: TextStyle( + fontSize: SizeConfig.textMultiplier * 1.8,), + contentPadding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), + labelText: labelText, + labelStyle: TextStyle( + fontSize: SizeConfig.textMultiplier * 1.7,), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(6)), + borderSide: BorderSide( + color: borderColor != null ? borderColor : Hexcolor( + "#CCCCCC")), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: borderColor != null ? borderColor : Hexcolor( + "#CCCCCC")), + borderRadius: BorderRadius.all(Radius.circular(6)), + ) + //BorderRadius.all(Radius.circular(20)); + ), + onTap: onTap, + controller: controller, + ), + ), + state.hasError ? Text( state.errorText, style: TextStyle(color: Colors.red),