diff --git a/.gitignore b/.gitignore index fd4aca5a..cff0e374 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ .dart_tool/ .flutter-plugins pubspec.lock +/ios/Podfile.lock .flutter-plugins-dependencies .packages .pub-cache/ diff --git a/GoogleService-Info_DQ.plist b/GoogleService-Info_DQ.plist new file mode 100644 index 00000000..0c093a2a --- /dev/null +++ b/GoogleService-Info_DQ.plist @@ -0,0 +1,36 @@ + + + + + CLIENT_ID + 864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r + API_KEY + AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs + GCM_SENDER_ID + 864393916058 + PLIST_VERSION + 1 + BUNDLE_ID + com.cloud.diplomaticquarterapp + PROJECT_ID + diplomaticquarter-d2385 + STORAGE_BUCKET + diplomaticquarter-d2385.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:864393916058:ios:13f787bbfe6051f8b97923 + DATABASE_URL + https://diplomaticquarter-d2385.firebaseio.com + + \ No newline at end of file diff --git a/GoogleService-Info_HMG.plist b/GoogleService-Info_HMG.plist new file mode 100644 index 00000000..153aa2c6 --- /dev/null +++ b/GoogleService-Info_HMG.plist @@ -0,0 +1,38 @@ + + + + + CLIENT_ID + 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt + ANDROID_CLIENT_ID + 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com + API_KEY + AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA + GCM_SENDER_ID + 815750722565 + PLIST_VERSION + 1 + BUNDLE_ID + com.HMG.Smartphone + PROJECT_ID + api-project-815750722565 + STORAGE_BUCKET + api-project-815750722565.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:815750722565:ios:328ec247a81a2ca23c186c + DATABASE_URL + https://api-project-815750722565.firebaseio.com + + \ No newline at end of file diff --git a/agconnect-services_DQ.json b/agconnect-services_DQ.json new file mode 100644 index 00000000..563c412f --- /dev/null +++ b/agconnect-services_DQ.json @@ -0,0 +1,14 @@ +{ + "client":{ + "appType":"1", + "cp_id":"2640966000002322881", + "product_id":"736430079244816576", + "client_id":"563737844552565952", + "client_secret":"9C9A2C272576B8AE6E886C78AF944E8354B91F0AF3381129BB8369FB35E41C47", + "project_id":"736430079244816576", + "app_id":"103856487", + "api_key":"CgB6e3x90XxBrOCMun809w+DOzcFEettcBDUF3fqaLry1ViqTeJqoPwpfaOq/uGw//x0oYwucu9aWazs+Rdj0GUF", + "package_name":"com.cloud.diplomaticquarterapp" + }, + "configuration_version":"1.0" +} \ No newline at end of file diff --git a/agconnect-services_HMG.json b/agconnect-services_HMG.json new file mode 100644 index 00000000..cfdaf83b --- /dev/null +++ b/agconnect-services_HMG.json @@ -0,0 +1,14 @@ +{ + "client":{ + "appType":"1", + "cp_id":"2640966000002322881", + "product_id":"736430079244816567", + "client_id":"563735388191982656", + "client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF", + "project_id":"736430079244816567", + "app_id":"102857389", + "api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI", + "package_name":"com.ejada.hmg" + }, + "configuration_version":"1.0" +} \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 759fa6a7..11e99a2a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,9 +7,9 @@ if (localPropertiesFile.exists()) { } def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} +//if (flutterRoot == null) { +// throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +//} def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { @@ -78,6 +78,7 @@ dependencies { // exclude group: 'com.google.protobuf',module: 'protobuf-lite' // }) implementation 'pub.devrel:easypermissions:0.4.0' +// implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' // implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' implementation 'com.google.guava:guava:27.0.1-android' // Dependency on local binaries @@ -93,6 +94,6 @@ dependencies { implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0' implementation 'com.google.android.gms:play-services-location:17.1.0'//for Android - + implementation 'com.google.android.gms:play-services-basement:17.5.0' } diff --git a/android/app/google-services.json b/android/app/google-services.json index f86832ad..a4655794 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -1,39 +1,37 @@ { "project_info": { - "project_number": "815750722565", - "firebase_url": "https://api-project-815750722565.firebaseio.com", - "project_id": "api-project-815750722565", - "storage_bucket": "api-project-815750722565.appspot.com" + "project_number": "864393916058", + "firebase_url": "https://diplomaticquarter-d2385.firebaseio.com", + "project_id": "diplomaticquarter-d2385", + "storage_bucket": "diplomaticquarter-d2385.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063", + "mobilesdk_app_id": "1:864393916058:android:5b5a65cd6d8c18b4b97923", "android_client_info": { "package_name": "com.cloud.diplomaticquarterapp" } }, "oauth_client": [ { - "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com", + "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw" + "current_key": "AIzaSyBdV3mos1BPhUzNKCj2KANJtiO3o2zh9IM" } ], "services": { - "analytics_service": { - "status": 1 - }, "appinvite_service": { - "status": 1, - "other_platform_oauth_client": [] - }, - "ads_service": { - "status": 2 + "other_platform_oauth_client": [ + { + "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com", + "client_type": 3 + } + ] } } } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 00000000..4ace459d --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,4 @@ +-keep class tvi.webrtc.** { *; } +-keep class com.twilio.video.** { *; } +-keep class com.twilio.common.** { *; } +-keepattributes InnerClasses \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceErrorMessages.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceErrorMessages.kt old mode 100755 new mode 100644 diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml old mode 100755 new mode 100644 diff --git a/android/build.gradle b/android/build.gradle index 433bc8ad..32bda0b1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -3,6 +3,9 @@ buildscript { repositories { google() jcenter() +// maven { +// url "https://dl.bintray.com/kotlin/kotlin-eap/" +// } } dependencies { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index c935be88..1f9de82f 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip diff --git a/assets/app_icons/config.json b/assets/app_icons/config.json index 0bedcb06..e2e1afdb 100644 --- a/assets/app_icons/config.json +++ b/assets/app_icons/config.json @@ -257,6 +257,20 @@ "search": [ "calendar-(2)" ] + }, + { + "uid": "ad42aa33b55d1a7b2edcf4ed976435d9", + "css": "roboticon", + "code": 59410, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M546.9 33.2C546.1 35.3 544.8 37.2 544.1 37.7 542.9 38.3 542.9 38.9 543.8 40.6 544.5 42.2 546.7 43.5 550.4 44.7L555.8 46.6 557.5 44.4C560.3 40.7 562.1 36.4 561.5 34.8 561.2 34 559.3 32.9 557.3 32.3 555.4 31.7 553.7 30.8 553.7 30.4 553.7 30 552.5 29.6 551 29.6 548.8 29.6 548.1 30.2 546.9 33.2ZM453.8 33.9C452.7 35.3 451.9 37.6 451.9 39 451.9 41 451.4 41.7 450 41.7 447.2 41.7 447.8 43.1 452 46.8 458.9 52.5 461.7 52.1 464.4 45 466.7 39.1 466 36.9 461.7 35.6 459.7 35.1 457.6 33.9 456.9 33.1 455.8 31.5 455.6 31.6 453.8 33.9ZM500.2 34.4C499.4 36 498 38.1 497.1 39 495.6 40.5 495.7 40.7 499 43.8 503.9 48.7 506.6 49 509.6 45.2 510.9 43.5 512.8 41.4 513.6 40.6 515 39 514.9 38.7 511.2 35.2 506.2 30.4 502.5 30.1 500.2 34.4ZM523.1 36L518.8 40.5 523.3 45.2C525.7 47.8 527.8 50.6 527.8 51.7 527.8 52.7 525.9 55.6 523.6 58.1L519.4 62.9 523 66.6C528 71.9 530.9 71.8 536.2 66 539.9 62 540 61.7 538.4 60.7 534.1 58.3 531.5 54.8 531.5 51.5 531.5 47.3 535.7 38.9 537.9 38.9 538.9 38.9 538.1 37.7 535.5 35.2 530.3 30.3 528.3 30.5 523.1 36ZM477.4 34.4C476.7 35.6 475.4 38.2 474.5 40.3 473 43.8 473.1 44 475 45.6 476.1 46.5 477.9 47.2 478.8 47.2 479.7 47.2 481 48.1 481.7 49.1 482.3 50.1 483.1 50.9 483.6 50.9 484.8 50.9 488 45 488 42.8 488 41.3 488.5 40.7 490 40.7 491.9 40.7 491.9 40.6 489.3 37.9 486.3 34.8 482.4 32.4 480.2 32.4 479.4 32.4 478.1 33.3 477.4 34.4ZM568.7 36.6L566.8 39.7 569.5 42C575.1 46.8 581.6 46.9 583.2 42.3 585.6 36 585.8 36.4 578.8 34.8 570.4 32.9 570.8 32.8 568.7 36.6ZM428.6 38C428 40.2 426.8 41.9 425.6 42.2 424.1 42.7 424.2 43.1 426.9 46 433.4 52.7 436.5 52.8 439.8 46.2 440.8 44.3 442.3 42.6 443.1 42.6 446.6 42.6 442.2 37.5 437.9 36.6 436.4 36.2 435 35.6 434.7 35.1 434.4 34.6 433.1 34.3 431.9 34.3 430.1 34.3 429.4 35 428.6 38ZM408.4 38.8C404 40.2 403.2 40.7 402.5 43.4 401.4 47.9 402 48.8 407.7 50.6 413.7 52.4 415.6 51.9 416.4 48.1 416.7 46.6 417.9 44.5 419.1 43.6L421.3 41.9 419.4 39.4C417.2 36.7 415.5 36.6 408.4 38.8ZM619.7 52C617 54.9 615.3 61.8 616.8 63.5 617.3 64.3 618.3 64.8 618.9 64.8 619.5 64.8 621.5 65.6 623.4 66.6 626.8 68.2 626.9 68.2 629.1 66.6 631.3 64.8 633.9 57.2 632.9 55.6 632.3 54.7 623.1 50 622 50 621.9 50 620.7 50.9 619.7 52ZM572.2 54.3C571.7 55.6 571.3 56.9 571.3 57.3 571.3 57.8 570.5 59.2 569.4 60.5 567.6 62.8 567.6 62.8 569.5 65.2 571.6 67.8 577 69.8 580.6 69.3 582.4 69.1 583.1 68.1 584.5 64 585.5 61.3 585.9 58.2 585.6 57.2 585 55.3 581.2 53.4 576.1 52.5 573.5 51.9 573 52.2 572.2 54.3ZM595.2 53.4C594.4 54.4 593.2 56.9 592.8 59.1 591.6 64.3 593.2 66.4 599.4 67.5 605.4 68.6 606.3 68.1 607 64.1 607.4 62.1 608.1 59.9 608.5 58.9 610.9 54.4 598.8 49.4 595.2 53.4ZM548.7 54.7C547.9 55.9 547.2 57.4 547.2 58 547.2 58.5 546.6 59.5 545.8 60.2 545.1 60.8 544.4 62.3 544.4 63.6 544.4 65.5 545.3 66.2 549.1 67.8 551.7 68.8 553.7 70.1 553.7 70.5 553.7 72 556.2 71.3 558.1 69.2 560.4 66.8 562.5 60 561.7 57.9 561.1 56.4 557.2 54.4 552.6 53.2 550.7 52.8 549.9 53.1 548.7 54.7ZM480 55.4C479.4 55.7 477.8 58.1 476.4 60.8 473.3 66.3 473.7 67.3 479.7 70.5 485.6 73.3 487.9 72.7 489.4 67.6 489.7 66.3 490.6 64.5 491.5 63.6 493.2 61.7 492.5 60.8 487.7 59.3 485.7 58.7 483.7 57.4 483.1 56.4 481.9 54.4 481.5 54.4 480 55.4ZM500.1 57C499 58.4 497.9 60.6 497.6 61.8 496.5 65.8 502.6 72 506.6 70.8 509 70 515.7 64.1 515.7 62.6 515.7 61.3 507.7 55.8 504.5 55.1 502.6 54.6 501.7 55 500.1 57ZM429.7 59.8C427.7 62.3 426.5 67.1 427 70 427.7 73.6 438.2 76.1 439.8 73.1 444.9 63.8 444.7 62 438.5 59.2 433.4 56.9 431.9 56.9 429.7 59.8ZM453.2 59.5C452.5 60.7 451.6 63.6 451.3 65.8 450.7 70 450.8 70.1 453.8 71.3 455.6 71.9 457.7 73.1 458.5 73.9 460.7 75.8 462.9 74.6 464.4 70.6 465.2 68.7 466.3 66.2 466.9 65.1 468.2 62.4 465.9 59.6 461.2 58.3 456.2 56.9 454.8 57.2 453.2 59.5ZM407.2 59.9C405 62.5 401.8 69.4 402.3 70.4 402.6 70.8 404.4 71.5 406.3 71.9 408.1 72.1 410.8 73.2 412.2 74.2L414.8 75.9 417.1 71.3C418.4 68.8 419.4 65.7 419.4 64.4 419.4 59.5 410.5 56.3 407.2 59.9ZM382.4 60.6C380.8 62.5 378.7 70.2 379.3 71.8 379.5 72.5 381.3 73.5 383.1 74.2 385.1 74.7 386.9 75.6 387.5 76 390.3 78.7 394.8 74.6 395.8 68.4 396.7 63.6 394.9 61.6 388.8 60.3 383.1 59.1 383.8 59 382.4 60.6ZM358.9 61.9C357.3 63.7 355.6 68.7 355.6 71.5 355.6 73.8 358 75.7 362.1 76.9 367.1 78.2 369 77.4 370.7 73.1 373.4 66.5 372.9 65.1 367 62.5 360.7 59.7 360.8 59.7 358.9 61.9ZM339.3 65.2C332 69 331 70.1 332 72.9 333.1 75.8 336 77.5 341.2 78 344.4 78.2 345 78 346 75.9 346.7 74.6 347.4 71.9 347.8 69.7 348.3 66.2 348.1 65.8 345.7 64.5 343.2 63.2 342.8 63.3 339.3 65.2ZM645.2 73.8C644.4 74.7 643 77.7 642 80.4 640.4 85.3 640.4 85.4 642.1 86.7 643.1 87.4 644.5 88 645.5 88 646.3 88 647.5 88.6 648.1 89.4 650.7 92.5 655.6 89 657 83.1 657.6 80.8 657 79.9 653.3 76.3 648.6 71.9 647.3 71.4 645.2 73.8ZM666.4 77.7C663.8 85 664.4 87 669.5 87 670.5 87 672.1 87.9 673.2 89 675.5 91.2 677.2 90.3 678.2 86.3 678.6 84.9 679.4 83.1 680.2 82.3 681.4 81 681 80.5 676.6 77.6 668.8 72.4 668.2 72.4 666.4 77.7ZM622.2 75C621.4 75.5 619.7 78 618.5 80.6L616.3 85.4 618.8 87.6C621.2 89.6 623.3 90.3 626.9 89.9 628.5 89.7 635.2 82.7 635.2 81.1 635.1 80 626.1 74.1 624.5 74.1 624.1 74.1 623 74.5 622.2 75ZM597.8 76.4C595.7 78.5 592.6 85.9 593.1 87.5 593.7 88.8 599.9 91.7 602.2 91.7 604.1 91.7 608.5 87.8 610.4 84.4L611.9 81.8 607 78.3C601.7 74.6 599.9 74.3 597.8 76.4ZM550.1 78.3C547.8 81.3 545.8 87.3 546.6 89.3 547.2 90.9 556.7 94 558.7 93.2 559.5 92.9 560.2 91.9 560.2 90.9 560.2 90 561.2 87.9 562.5 86.1 563.8 84.4 564.8 82.9 564.8 82.7 564.8 82.5 562.9 81.5 560.5 80.5 558 79.4 555.6 78 555.3 77.2 554.2 75.3 552.2 75.6 550.1 78.3ZM574.4 77C573 78.8 569.4 86.6 569.4 87.7 569.4 89.4 575.5 92.6 578.4 92.6 581.4 92.6 584.1 90.3 586.4 85.6L587.9 82.7 583.4 79.4C578.8 75.8 575.8 75.1 574.4 77ZM525.5 79.3C524.7 80 523.9 81.7 523.6 83 523.3 84.2 523 86.1 522.7 87.3 522.1 90.1 523.1 91.2 526.4 92 528 92.4 529.9 93.3 530.7 94.2 534.2 97.2 538.9 91.9 538.9 84.7 538.9 81.9 538.5 81.2 535.9 80.2 530.6 78.1 527 77.7 525.5 79.3ZM501.7 80.3C499.5 82.6 498.1 89.7 499.2 91.9 499.6 92.7 502.1 94.1 504.7 94.8 509.4 96.2 512 96 512 94.2 512 93.6 512.9 91.4 514 89.2 516.2 84.5 515.9 83.1 512.3 81.1 507.6 78.7 503.3 78.3 501.7 80.3ZM478.5 80.6C476.9 81.6 475 86.9 475 90.6 475 91.9 475.8 93 477.6 93.6 479 94.2 481.4 95.2 482.9 95.9 484.4 96.7 486.4 97 487.2 96.8 489.4 95.9 491.7 90.6 491.7 86.7 491.7 84 491.2 83.1 489.2 82.1 485.5 80.3 480.4 79.5 478.5 80.6ZM455.1 82.1C454.4 82.9 453.7 84.4 453.7 85.6 453.7 86.8 453.1 88.2 452.3 88.9 448.9 91.8 451.7 95.6 458.5 97.3 462.4 98.4 463.1 98.3 464.7 96.9 466.9 94.8 468.7 87.3 467.5 85.1 466.8 83.6 463.9 82.4 458.5 81.2 457.3 80.9 455.8 81.3 455.1 82.1ZM430.8 82.6C429.4 84.4 427.8 89.7 427.8 92.3 427.8 93.6 428.4 94.7 429.4 95.1 430.3 95.4 432.8 96.4 434.9 97.4 437 98.4 439.4 98.9 439.9 98.6 441.5 97.6 444.4 90.6 444.4 87.7 444.4 85.6 443.8 84.8 441.5 83.8 436.4 81.8 431.9 81.2 430.8 82.6ZM407.6 83.5C406.9 84.2 406.5 85.4 406.5 86.3 406.5 87.3 405.5 89.1 404.2 90.4 401.9 92.6 401.9 92.7 403.7 94.4 404.7 95.5 406.1 96.3 406.9 96.3 407.5 96.3 409.2 97.1 410.5 98.1 413.1 100.3 416 100.6 417.5 98.7 419 96.9 421.5 88.1 420.8 87 420.4 86.3 410.9 82.4 409.4 82.4 409 82.4 408.2 82.9 407.6 83.5ZM386.6 84.3C385.6 84.6 383.3 86.8 381.6 88.9L378.5 92.8 382.4 96.8C387.1 101.6 389.1 102.2 392 99.9 394.6 97.9 397.5 91.2 396.8 88.9 395.7 85.6 389.7 83 386.6 84.3ZM360.3 86.7C359.2 88.1 357.9 90.8 357.2 92.9 356.2 96.1 356.3 96.7 357.9 97.8 358.8 98.5 360.6 99.1 361.7 99.1 362.9 99.1 364.4 99.9 365.1 100.9 366.3 102.7 366.4 102.7 368.9 100.1 370.3 98.7 371.3 97.1 371.2 96.7 370.8 94.6 371.4 93.5 372.7 93.5 375.6 93.5 373 89.2 368.1 86.2 364.1 83.6 362.6 83.8 360.3 86.7ZM336.9 85.9C334.5 86.4 332.9 91.8 333.2 97.5 333.3 99.5 338.5 101.9 343 101.9 345.8 101.9 346.3 101.5 347.2 98.3 347.9 96.5 348.7 94.5 349.2 94 350.6 92.5 350.1 89.9 348 88.5 345.5 86.9 339.1 85.4 336.9 85.9ZM311.6 88.2C310.8 89.4 309.9 92.3 309.6 94.7 309 99.4 308.7 99.2 317 101.9 320.6 103 320.8 102.9 322.8 100.6 325.8 97.1 326.6 92.1 324.5 89.8 322.9 88.1 317.8 86.1 314.6 86.1 313.7 86.1 312.4 87 311.6 88.2ZM671.6 95.5C670.5 95.8 668.5 98.4 666.9 101.8L664.3 107.3 668.1 110.2C670.3 111.7 673.1 113 674.4 113 676.9 113 680.8 109 681.9 105.5 683.6 100.3 676.7 93.5 671.6 95.5ZM691.9 96.5C690.8 97.8 688.9 104.3 688.9 106.5 688.9 107.4 691.2 109 694.5 110.6 699.8 113 700.3 113.1 701.9 111.6 702.8 110.7 704.2 108.1 705 105.7L706.5 101.4 703 98.4C699.3 95.2 693.7 94.3 691.9 96.5ZM647.5 98.9C645.9 99.7 643.5 101.8 642.2 103.3L639.8 106.3 644.4 110.6C646.9 112.9 649.5 114.8 650.3 114.8 652.8 114.8 658.3 106.7 658.3 103.1 658.2 101.3 655.5 98.8 652.3 97.8 651.2 97.5 649.2 97.9 647.5 98.9ZM596.4 103.2C592.5 109.6 593.1 112 599 113.8 601.1 114.4 603.1 115.5 603.3 116.2 604.3 118.5 606.7 116.5 608.9 111.4 611.9 104.6 611.8 102.9 608.4 102.2 606.9 101.9 604.9 100.8 604.1 99.9 601.5 97 599.6 97.9 596.4 103.2ZM622.4 99.3C621.9 99.9 620.5 102.4 619.2 104.8 617 108.8 616.9 109.3 618.4 110.5 623.5 115 628.6 115.1 633 110.7 634.7 109 636.1 106.9 636.1 106.2 636.1 105.4 634.4 103.2 632.2 101.5 628.2 98.1 624.2 97.1 622.4 99.3ZM574.6 101.1C571.9 105.4 570.1 110.1 570.6 111.5 571 112.3 573.1 113.8 575.5 114.8 578.6 116.2 579.6 117.1 579.6 118.7 579.6 120.5 579.8 120.6 580.9 119.4 582.8 117.5 588 107.6 588 106 588 105.3 586.6 104.1 585 103.4 583.3 102.7 581.4 101.5 580.6 100.6 578.9 98.4 576.2 98.7 574.6 101.1ZM549.3 103C546.1 108.9 546.2 114.8 549.4 114.8 550 114.8 552 115.6 553.9 116.5 558.7 119 560.7 117.9 562.5 111.6 564.4 105.4 564 104.1 559.7 102.3 554.8 100.2 550.6 100.6 549.3 103ZM502.9 104.3C500.2 107.7 498.6 113.6 500.1 115.4 500.6 116.1 501.7 116.7 502.2 116.7 502.9 116.7 504.9 117.5 506.9 118.5L510.6 120.4 512.6 118.4C516.6 114.7 517.1 105.6 513.5 105.6 512.9 105.6 510.8 104.7 508.8 103.7 506.8 102.7 505.1 101.9 505 101.9 504.8 101.9 503.9 103 502.9 104.3ZM525.9 105.3C525.3 107.2 524.2 109.5 523.4 110.4 520.6 113.5 526.8 118.5 533.2 118.5 535.6 118.5 536.4 118 537.1 115.9 537.7 114.5 538.7 112.1 539.4 110.6 540.9 106.9 539.9 105.3 535 103.2 529.2 100.9 527.1 101.3 525.9 105.3ZM480.3 103.8C478.1 105.1 475.9 110.2 475.9 113.8 475.9 117.3 478.6 119.2 484.4 120L488.7 120.6 490.3 115.8C491.1 113.2 492.2 110.9 492.7 110.6 494 109.7 491.9 106.6 488.6 104.6 485.3 102.6 482.8 102.3 480.3 103.8ZM408.3 108.4C404.9 113.2 404.4 114.9 405.5 117.8 406.7 120.9 414 124.5 416.5 123.2 418.4 122.2 421.3 116.9 421.3 114.3 421.3 112.6 413.6 104.6 412 104.6 411.6 104.6 409.9 106.3 408.3 108.4ZM433.1 107.4C431.8 108.9 430.2 111.7 429.5 113.6 428.5 116.8 428.6 117.1 430.6 118.7 431.7 119.6 433.4 120.4 434.4 120.4 435.4 120.4 436.4 121 436.7 121.8 438 125.1 442.6 121.5 442.6 117.2 442.6 115.5 443.1 114.5 444.4 114.2 445.5 113.9 446.3 113.3 446.3 113 446.3 111.8 438.1 104.6 436.7 104.6 435.9 104.6 434.4 105.8 433.1 107.4ZM455.7 106.2C455.3 107.1 454.6 109 454.3 110.4 453.9 111.9 453 113 451.6 113.1L449.5 113.4 451.9 115.7C456.3 119.8 461.2 122.4 463.6 121.8 466.2 121.1 468.2 117 468.7 111.6L469 108.1 463.4 106.3C456.6 104.3 456.8 104.3 455.7 106.2ZM363.6 107.5C362.8 108.1 361 110.5 359.7 113 358.4 115.5 357 117.7 356.5 118.1 355.9 118.3 357.7 120.1 360.2 121.9 366.6 126.2 369.1 125.9 371.9 120.4 373.1 118.1 374.1 115.3 374.1 114.2 374.1 111.9 371.7 110.2 368.5 110.2 367.5 110.2 366.3 109.4 365.9 108.4 365.5 107 364.9 106.9 363.6 107.5ZM384.2 109.8C383.6 111.3 382.5 113.9 381.7 115.5 380.4 118.2 380.4 118.6 381.9 120.3 384.2 122.8 388.1 124.3 391.8 123.9 395.3 123.6 397 120.9 397.9 114.8 398.3 111.8 398.1 111.1 395.9 109.7 394.6 108.8 391.7 107.9 389.4 107.6 385.6 107.2 385.2 107.3 384.2 109.8ZM313.7 110.8C311.7 113.1 310.2 117.1 310.2 120.5 310.2 122.6 310.7 123.4 312.8 124.1 314.2 124.5 316.5 125.6 318.1 126.5 320.7 127.9 320.8 127.9 323.2 125.2 324.6 123.6 326 120.6 326.4 118.6 327.3 113.2 325.6 111.5 318 109.8 315.9 109.4 314.8 109.6 313.7 110.8ZM336.1 112.2C335.1 113.9 334.3 116.9 334.3 118.8 334.3 122 334.5 122.4 338.2 124.1 344.7 127 346 126.7 348.7 120.6 350.2 117.3 350.7 114.8 350.3 114 349.5 112.8 341.3 109.3 339.1 109.3 338.4 109.3 337.1 110.6 336.1 112.2ZM291 111.3C288.7 112.4 286.9 116.2 286.8 120.6 286.6 123.4 286.9 123.8 291.7 126 295.2 127.7 297.2 128.2 298.3 127.7 299.9 126.9 303.9 115.9 303.1 114.6 302.4 113.5 295.6 110.2 294.3 110.3 293.6 110.3 292.1 110.7 291 111.3ZM268 117.7L262.5 123.3 266.1 126.5C268.1 128.2 270.2 129.6 270.6 129.6 271.1 129.6 273.1 128 275.2 125.9 279.3 121.9 279.3 120.6 275.5 115.1L273.5 112.1 268 117.7ZM718.3 118.1C717.4 119.3 716.7 120.6 716.7 121 716.7 121.5 715.8 122.8 714.8 123.9 711.4 127.5 714.1 132.3 720.4 134.1 723.1 134.8 721.8 135 713.2 135.1L702.8 135.2 704.7 131.6C705.7 129.6 706.7 126.8 706.8 125.4 706.9 123.1 706.5 122.6 702.1 121 698 119.5 697 119.4 694.7 120.6 693.3 121.2 691.4 123.3 690.5 125.3 688.9 128.4 688.9 129 690.1 130.9 690.8 132 692.9 133.4 694.6 134 697.2 134.8 696.3 135 688.2 135.1L678.7 135.2 680.6 132.1C683.1 128.1 682.9 126.9 679.5 122.9 675.5 118 672.2 118.1 669.1 123.5 667.8 125.7 666 127.8 665.2 128.1 664.3 128.5 661.6 127.3 658.1 125 651.6 120.6 648 120.4 645.3 124.1 642.8 127.6 642.2 131.9 644 133.7 645.4 135.1 645 135.2 639.4 135.2 636.1 135.2 633.3 134.9 633.3 134.6 633.3 133.6 635.5 130.1 636.5 129.4 638.1 128.4 632.5 123.2 628.5 122 623.6 120.6 620.9 122.5 619.4 128.6 618.9 131.2 618.6 133.7 619 134.3 619.4 134.8 617.8 135.2 614.5 135.2L609.4 135.2 610.4 132C611.7 127.9 610.9 126.3 606.9 124.6 605.2 123.9 603.7 122.8 603.7 122.3 603.7 120.2 600.7 121.5 599.3 124.2 598.4 125.7 596.8 128.4 595.6 130.2 593.8 133.1 593.7 133.3 595.2 134.2 596.4 134.9 595.6 135.1 591.8 135.2 587.6 135.2 586.9 135 588 133.9 590 131.4 588.7 128.3 584.6 126.4 582.5 125.4 580.2 124 579.4 123.4 577.2 121.5 572.7 126.9 572.7 131.5L572.7 135.2 567.9 135.2C564 135.2 563.1 134.9 563.5 133.8 563.9 133.1 564.4 132.4 564.8 132.4 566.2 132.4 564.5 128.6 562.6 127.3 561.6 126.6 558.8 125.6 556.7 125.1 551.7 124 549.6 125.6 548.6 131.4L548 135.2 543.4 135.2C539.1 135.2 538.9 135.1 539.8 133.2 541.1 130.9 539.4 128.7 534.7 126.5 530.4 124.4 529.9 124.5 527.3 128.7 526 130.8 524.3 132.8 523.4 133.1 521.9 133.7 512.7 129.4 509.5 126.6 507.8 125 507.2 124.9 505.9 126 505.1 126.7 503.6 129.1 502.7 131.2 501 135.1 500.9 135.2 496.4 135.2 492.4 135.2 491.9 135 492.3 133.4 493 131 489.7 128.1 485.6 127.2 481.8 126.6 480.6 127.3 479.1 131.8 478.2 134.4 477.7 134.7 474.2 135 471.1 135.3 469.9 134.9 469 133.6 468.2 132.6 466 130.6 463.9 129.2L460.1 126.6 457.4 129.2C455.9 130.6 454.4 132.6 454.1 133.5 453.3 136 447.9 135.7 443.7 132.9 441.9 131.6 439.8 130.6 439.3 130.6 438.7 130.6 438 129.7 437.7 128.7 436.9 126 434.8 127.3 432.9 131.6 431.2 135.1 431.1 135.2 426.2 135.2 423.5 135.2 421.3 134.8 421.3 134.4 421.3 133.9 419.5 132.9 417.4 131.9 415.2 131.1 413.1 129.9 412.9 129.4 412.5 128.8 411 129.8 409.3 131.9 406.8 134.7 405.7 135.2 402.4 135.2 400.3 135.2 396.6 134.2 394 133 389.3 130.6 387.7 130.8 385.2 133.7 383.6 135.6 373 135.7 371.4 133.9 369.4 131.4 365.6 131.2 362.7 133.3 360.4 135.1 359.2 135.3 353.3 134.8 349.7 134.5 345.2 134.1 343.2 133.7 341 133.3 339.3 133.5 338.4 134.3 337.4 135.1 321.6 135.3 268.3 135.1L199.5 134.7 193.5 137.6C178.4 144.7 170.9 160.9 175.4 176.3 177.2 182.6 178.8 185.3 183.1 189.9L186.3 193.3 181.6 194.4C171.5 196.5 163 203.3 158.5 212.8 156.4 217.3 156 219.3 156 226.4 156 233.6 156.4 235.5 158.7 240.5 161.8 247.2 168.3 253.8 174.8 256.8 178.1 258.2 181.6 258.8 189 259.1L198.8 259.4 198.3 263.4C198 267.1 198.2 267.8 201.8 271.5L205.6 275.5 209.3 271.6C213.4 267.1 213.9 264.5 210.9 261.4L209 259.3 215.5 259.3 221.9 259.3 221.5 264.3C221.1 269.1 221.2 269.4 223.9 270.7 227.3 272.5 232.8 272.7 234 271 235.2 269.5 237.4 261.9 237.1 260.4 237 259.6 238.3 259.3 241.1 259.3L245.4 259.3 244.8 263.2C244.4 266.3 244.6 267.6 245.7 268.8 247.6 270.6 254.3 272.6 256.1 271.9 257.7 271.3 262.2 261.3 261.5 260.1 261.2 259.6 263.1 259.3 265.8 259.3L270.6 259.3 269 261.7C267.6 263.8 267.6 264.2 269 266.3 270.7 269 273.9 270.4 278.3 270.4 281.1 270.4 281.8 269.9 283 267.1 283.6 265.4 284.3 262.9 284.3 261.6 284.3 259.4 284.6 259.3 288.2 259.3 292.1 259.3 292.1 259.3 292.1 262.7 292.1 265.9 292.3 266.1 297.6 268.2 302.8 270.2 303.2 270.3 304.8 268.8 305.7 268 307 265.5 307.6 263.2 308.5 259.3 308.6 259.3 312.7 259.3 316.2 259.3 316.7 259.4 315.9 260.8 314.5 263.5 315.6 264.8 320.9 267.1 326.7 269.7 328.6 269.4 329.4 265.6 330.1 262 333 259.3 336.1 259.3 338.1 259.3 338.8 259.7 339.1 261.2 339.4 264 343.8 266.9 347.3 266.9 349.6 266.9 351.1 266.1 353.9 263.1 358.4 258.2 361.1 258.1 364.9 262.5 366.9 264.7 368.6 265.7 370.3 265.7 371.9 265.7 374.3 264.4 376.6 262.5 380.6 259.1 386.1 258 386.1 260.6 386.1 262.3 390.1 264.4 395.3 265.6 398.7 266.4 399.3 266.3 400.5 264.5 401.2 263.4 401.9 261.9 401.9 260.9 401.9 259.5 402.7 259.3 406.5 259.3 409.1 259.3 411.1 259.7 411.1 260.3 411.1 260.7 412.9 261.9 415.1 262.9 422.4 266.1 422.7 266.1 424 262.5 425.1 259.4 425.3 259.3 429.7 259.3 432.2 259.3 434.3 259.6 434.3 260.1 434.3 260.6 435.8 261.5 437.8 262 439.6 262.7 441.9 263.8 442.9 264.6 444.3 265.9 444.6 265.8 446.3 264.4 447.3 263.4 448.3 261.9 448.6 261 449.5 258.2 457.3 258.6 461.7 261.6 463.5 262.9 465.8 263.9 466.9 263.9 467.8 263.9 469.6 262.9 470.9 261.6 472.9 259.6 474.2 259.3 478.3 259.3 481.6 259.3 484.7 259.9 487 261.1 491.7 263.4 493.1 263.4 494.7 261 496 259.3 496.8 259.2 503.4 259.6 512 260.3 512.5 260.3 525.2 259.6 530.6 259.4 536.6 259.5 538.3 260.1 540.4 260.6 541.7 260.6 541.7 260.1 541.7 259.6 578.1 259.3 632.9 259.3L724.2 259.3 722.7 262C721.9 263.5 721.3 265.6 721.3 266.7 721.3 267.9 720.6 268.9 719.4 269.2 716.8 269.9 717.1 270.9 721.5 274.1 726.1 277.5 729.8 277.7 732.9 274.6 737.4 270.1 736.7 264.2 731.3 261.9 726.3 259.9 727.7 259.3 737.6 259.3 745.4 259.3 747.2 259.5 746.6 260.4 746 261 744.9 263.7 744 266.4 741.9 272.3 742.6 273.5 749.7 275.6 755.8 277.3 756.9 276.8 758.9 269.7 760.3 265 760.3 264.5 758.7 262.9 757.9 261.9 755.8 260.7 754.3 260.3 752 259.6 753.6 259.4 760.8 259.4L770.2 259.3 769.2 262.7C768.6 264.6 767.6 266.9 766.8 267.9 765.6 269.4 765.6 269.7 767.7 271.8 770.6 274.7 777 276.2 779.4 274.4 781.4 273.1 783.9 264.7 783 262.5 782.7 261.7 781.5 260.6 780.4 260.2 778.7 259.5 779.2 259.4 783.1 259.4 788.3 259.3 788.2 259.2 789.4 266.4 790.1 271.3 791 271.4 799.7 267.2 807.2 263.6 813.9 258 817.8 251.9 821.4 246.2 821.2 245.4 816.1 245.4 813.8 245.4 812 245.1 812.2 244.6 820.6 228.4 818.3 213.3 806 201.9 801.8 198.1 799.4 196.8 794 195.2L787.2 193.2 791.2 188.3C804.6 171.9 799.2 147.2 779.8 137.8L773.6 134.7 750.3 134.7C737.4 134.7 726.9 134.5 726.9 134.4 726.9 134.2 727.8 132.4 728.9 130.5L730.8 126.9 726.3 121.6C723.7 118.7 721.3 116.2 720.7 116 720.3 115.9 719.2 116.8 718.3 118.1ZM675.6 263.1C674.4 264.4 672.9 267.2 672.2 269.9 671.3 273.9 671.4 274.6 672.8 275.6 674.7 277 684.1 279.3 684.8 278.4 685.2 278.1 685.6 276.5 686 274.8 686.4 273 687.4 271.4 688.7 270.8 689.8 270.4 690.7 269.7 690.7 269.4 690.7 268.1 686.8 264.8 685.2 264.8 684.2 264.8 682.6 264 681.8 263 679.7 260.6 678.4 260.6 675.6 263.1ZM699.9 263.8C698.4 265.3 697.2 267.1 697.2 267.9 697.2 268.6 696.3 269.4 695.2 269.7L693.1 270.3 695.4 272.7C696.9 274.3 698.2 274.9 699.5 274.6 700.6 274.4 702.5 273.9 704 273.6 705.9 273.1 706.5 273.2 706.5 274.4 706.5 276.7 707.7 276.3 710.6 273.1 713.2 270.5 713.3 270.2 712 267.8 710.6 265.4 705.2 261.1 703.5 261.1 703.1 261.1 701.4 262.3 699.9 263.8ZM605.2 265.1C604.4 266.2 602.9 269.1 601.8 271.5 599.4 276.5 600 278.1 604.8 279.2 606.3 279.5 608.4 280.6 609.4 281.7 611.7 283.9 613.4 282.8 614.4 278.6 614.7 277.1 616 275.1 617.3 274.1L619.7 272.2 617.6 269.9C616.4 268.6 614.9 267.6 614.4 267.6 613.7 267.6 611.7 266.6 609.8 265.3L606.5 263.1 605.2 265.1ZM650.9 266.3C650.3 268.3 649.2 270.9 648.3 272.1 647 274.3 647.1 274.5 649.4 276.5 650.7 277.7 653.4 279.1 655.3 279.5 659.8 280.8 662.5 279.1 663.9 274 665.7 267.1 663.7 264.4 656.1 263.3 652 262.8 652 262.8 650.9 266.3ZM627.8 266.3C627.2 267.6 626.9 269.1 626.9 269.5 626.9 270 626 271.2 624.9 272.3 623.1 274.2 623.1 274.3 624.7 276.1 628.6 280.5 634.7 281.8 637.3 278.9 639.6 276.4 641.9 270.5 641.2 268.4 640.8 267.3 639 266.2 635.9 265.3 629.5 263.4 628.8 263.5 627.8 266.3ZM580.6 268.1C579.6 269.5 578.3 272.1 577.8 274 576.9 276.9 577 277.5 578.8 278.9 579.9 279.8 581.6 280.6 582.5 280.6 583.4 280.6 584.7 281.4 585.4 282.3 587 285 589.3 283.3 592.3 276.9L594.9 271.6 590.6 268.7C585.6 265.1 583.1 265 580.6 268.1ZM555.6 268.4C552.8 273.6 553 280.6 555.8 280.6 556.5 280.6 558.7 281.4 560.6 282.4L564.4 284.4 566.8 281.6C569.3 278.9 571.1 272.2 569.9 270.3 567.8 266.9 557.2 265.5 555.6 268.4ZM487.1 268.9C486.7 269.4 485.6 271.7 484.7 273.8 483.9 275.9 482.6 277.9 481.9 278.1 479.6 279 481.9 282.1 485.6 283.3 487.4 283.9 489.6 285.4 490.6 286.7 492.2 288.7 492.6 288.8 493.8 287.5 494.6 286.8 495.5 284.9 495.8 283.3 496.2 281.9 497.5 279.7 498.8 278.7 501.1 276.9 501.1 276.8 499.5 275 496.7 271.9 488.1 267.6 487.1 268.9ZM532.3 271.4C531.7 273.4 530.3 275.7 529.3 276.5 527.3 277.9 527.3 277.9 529.9 280.1 532.5 282.4 538.8 284.6 541.5 284.1 543.3 283.7 547.2 277.1 547.2 274.4 547.2 272.8 546.1 271.7 542.6 269.9 535.8 266.5 533.7 266.8 532.3 271.4ZM511.2 271.2C504 279 504.2 278.5 506.1 280.7 507.1 281.8 509.3 283.2 510.9 284 513.4 285 514.4 285 517 283.9 518.7 283.2 521 281.3 522.1 279.8L524.2 276.9 520.8 273.3C516.5 268.4 514.3 268 511.2 271.2ZM439.4 271.5C435.9 273.4 433.4 282.9 436.1 284.3 436.9 284.7 439.4 285.9 441.7 286.9L445.7 288.9 447.9 286.9C449.9 284.9 451.9 280 451.9 276.7 451.9 273.5 442.7 269.6 439.4 271.5ZM460.2 276.4C459.1 279.8 458.5 282.9 458.9 283.3 459.4 283.7 461.3 284.5 463.2 285.2 465.1 285.7 466.7 286.9 466.7 287.6 466.7 288.3 467.2 288.9 467.9 288.9 469.5 288.9 471.7 286.4 473.1 282.6 473.8 281 474.7 279.6 475.2 279.6 475.6 279.6 475.9 278.5 475.7 277.1 475.4 274 471.9 271.6 466.6 270.8L462.2 270.2 460.2 276.4ZM414.5 273.9C412.5 276.1 411 280.6 411.6 282.5 411.9 283.4 414.2 285.6 416.7 287.4L421.2 290.6 424.9 286.4C429.2 281.6 429.6 279 426.7 276.1 422.5 272.2 416.9 271.2 414.5 273.9ZM278.4 273.8C277.9 274.7 266.1 322.5 265.2 327.1 264.6 330.3 264.4 330.5 263.1 329.3 262.2 328.5 259.2 327.2 256.1 326.4 251.6 325.1 250.6 325 249.5 326 248.1 327.5 246.3 336.5 247.1 337.8 247.4 338.2 249.6 339.5 252.1 340.6 254.5 341.7 256.5 343.1 256.5 343.9 256.5 346.4 259 344.4 260.6 340.6 261.6 338.7 262.4 337.1 262.6 337.3 263.2 337.9 259.9 350.6 258.9 351.1 258.3 351.5 257.5 350.9 256.9 349.9 256 348.2 255.8 348.2 253.1 351.1 248.6 355.9 247.8 358.1 249.4 360.6 250.3 361.9 252.1 363.6 253.7 364.5 256.2 365.9 256.6 366.6 256.1 369 255.7 370.5 254.7 372.6 253.7 373.6 252.7 374.7 251.9 376 251.9 376.5 251.9 376.9 250.8 378.9 249.5 380.7L247.2 384.2 250 385.6C251.9 386.7 252.7 387.6 252.4 388.7 252.1 389.5 251.3 394.3 250.5 399.1 249.6 403.9 248.6 408.7 248.1 409.7 247.7 410.7 247 413.9 246.8 416.7 246.5 419.4 245.4 427.5 244.3 434.4L242.4 447.1 237.9 446.6C233.5 446.1 233.2 446.2 229.6 449.8 226.2 453.2 226 453.7 226.9 455.9 228.4 459.1 231.4 460.9 236 461.7 239.2 462.1 239.8 462.6 239.8 464.4 239.8 468.1 238.9 469.4 236.5 468.9 233.5 468.1 230 471.9 229.2 476.8 228.4 481.5 229.3 482.8 234.6 484.3 238.5 485.4 238.8 485.6 240.2 490.6 243.2 501.7 244.3 509.3 247.2 544 249.6 572.4 255.3 618.1 257.1 624.4 257.5 625.9 257.2 626.1 255 625.6 250.6 624.4 242.8 618.8 234.5 610.6 230.4 606.5 226.7 603.3 226.4 603.5 226.1 603.8 225.9 606.5 225.9 609.4 225.9 615.6 225.5 615.8 220 613 218 612 216.1 611.4 215.6 611.6 214.4 612.4 211.1 620 211.1 622.3 211.1 624.2 212 625.1 216.3 627.1 219.2 628.6 221.6 629.6 221.8 629.4 221.9 629.3 222.6 628.1 223.4 626.9 225 624.6 225 624.7 225 631.3 225 634.9 224.8 638 224.5 638 224.3 638 222.5 637.3 220.6 636.6 216.7 634.9 214.8 635.3 214.8 637.9 214.8 638.9 213.6 641.2 212 642.9L209.3 646 214.7 649.4C217.8 651.3 221 652.8 222.1 652.8 223.8 652.8 224.1 653.3 224.1 656.6 224.1 659.9 223.9 660.3 222.2 659.7 221.2 659.4 219.5 659.4 218.5 659.7 216.2 660.5 213 666.6 213 670.3 213 672.6 213.4 673.2 215.6 673.7 220.6 674.8 221.3 675.2 221.3 676.6 221.3 677.4 221.9 677.8 222.6 677.5 224 676.9 225 679.4 225 683.1 225 685.6 223.6 685.7 221.6 683.3 219.3 680.6 218.7 680.9 216.6 685.8 215.6 688.3 214 690.8 213.1 691.5 211.8 692.6 211.9 693.1 215.7 696.4 219.1 699.4 220.5 700 223 699.7 225.6 699.4 225.9 699.7 225.9 701.9 225.9 703.1 226.2 705.2 226.6 706.4 227 708.1 226.9 708.4 225.4 708.1 219.4 706.3 218.7 706.3 217.2 708.5 216.5 709.6 215.6 712.8 215.2 715.4L214.6 720.2 219.4 721.8C222 722.6 224.4 724 224.7 724.7 225.2 726 225.5 725.9 226.5 724.5 228 722.6 228.3 723.2 229 729.4 229.5 734 228.3 734.5 223.9 731.4 220.6 729 219.6 729.7 217.2 735.9 215.1 741.5 215.3 744.4 217.7 744.4 218.7 744.4 220.8 745.3 222.3 746.4 225.6 748.7 227.5 748.1 228.9 744.4 229.4 742.9 230 741.8 230.3 742 230.6 742.2 231.1 745.5 231.6 749.3 232 753 232.6 756.9 232.9 758.1 233.3 760.2 233.2 760.1 229.5 757.4 227.4 755.9 224.7 754.6 223.5 754.6 221.2 754.6 218.5 757.8 218.5 760.4 218.5 761.4 217.8 762 216.7 762 214.1 762 214.4 763 218.1 766.9 222.6 771.5 225.6 771.5 230 767.1 231.9 765.4 233.4 763.9 233.6 763.9 233.8 763.9 234.3 766.3 234.6 769.2 235 772 237.3 786.2 239.8 800.6 244 824.3 244.4 827.1 243.3 831.4 242.2 836.2 243.1 838.9 245.8 838.9 246.5 838.9 247.3 840.6 247.6 843.1 248.1 846.4 247.9 847.7 246.4 849.7 245.4 851.1 244.4 854.2 244.3 856.5 244 860.7 244.6 861.5 251 864.1 251.3 864.3 251.9 865.9 252.2 867.8 252.8 871.1 252.7 871.3 250.6 871.3 247.7 871.3 245.8 873.9 244.5 879.6 243.3 884.9 244.5 886.4 251.3 887.9 256.4 889 257.3 890.1 257.4 894.7 257.4 896.1 256.8 896.4 253.1 896.1 249.2 895.8 248.5 896.1 247.5 898.2 246.9 899.5 246.3 902.4 246.1 904.6 245.8 908.7 245.9 908.8 249.5 910 251.6 910.6 253.8 911.9 254.4 912.7 255.5 914.1 255.6 914.1 257.4 912.5 258.4 911.6 259.3 910.2 259.3 909.4 259.3 906.3 260.3 909.4 261.5 916L262.7 923 260.1 922C258.7 921.6 257 920.6 256.4 919.8 255.8 919.1 254.4 918.5 253.1 918.5 251.3 918.5 250.5 919.4 249.1 922.4 248.1 924.5 246.5 926.9 245.4 927.8 243.3 929.4 243.3 929.4 247.8 931.9 250.3 933.3 253.8 935.4 255.6 936.4 257.3 937.4 258.5 938 258.1 937.6 257.8 937.1 258.1 936.2 258.8 935.5 259.5 934.8 260.6 932.5 261.1 930.6 261.7 928.5 262.5 926.9 262.9 926.9 263.3 926.9 264.3 930.4 264.8 934.5L266 942.3 272.8 945.6C276.6 947.5 279.5 948.6 279.4 948.1 279.3 947.7 281.5 945.8 284.3 944.2 288.7 941.5 293 936.4 319.3 902.8 335.6 881.7 349.7 863.8 350.5 863.1 351.5 862 352 861.9 353.1 862.9 353.9 863.5 354.6 863.6 354.9 863.2 355.8 861.9 360.2 833.9 361.4 822.5L362.5 811.3 372.7 818.6C400.6 838.7 426.3 851 452 856.7 463 859.1 504.3 860.1 518.2 858.3 549.7 854.4 579.4 840.8 614.2 814.6 621.4 809.3 627.6 805.1 627.9 805.4 628.1 805.7 628.9 809.7 629.5 814.4 631.9 832.5 636.4 854.7 637.6 854.3 638.2 854 649.4 870.2 666.2 895.6 681.3 918.5 693.9 937.8 694.1 938.3 694.4 938.9 698.7 941.6 703.8 944.4 711 948.3 713 949.8 712.7 951 712 953.3 727.6 945.6 728.3 943.2 728.7 942 729.5 941.6 731 941.9 732.8 942.2 733.5 941.6 735 938.5 738 932.5 738.3 930.2 736.4 928.5 735.5 927.7 733.9 926.9 732.9 926.7 731.3 926.4 731.1 925.7 731.3 922.2 731.5 920 732.4 917.1 733.4 915.9 734.4 914.6 735.2 912.9 735.2 912 735.2 911.1 735.8 909.9 736.6 909.3 738.5 907.7 738.3 905.8 736.1 905.1 733.8 904.4 733.8 902.9 736 887.5 737 880.8 738.1 872.7 738.4 869.2 738.8 865.7 739.4 863 739.7 863 740 863 742.1 864.4 744.4 866.2 751.6 871.9 754.3 871.6 756.9 864.4 759.3 858.3 758.6 856.3 753.8 854.5 751.5 853.7 749.4 852.3 749.1 851.4 748.5 849.9 748.4 849.9 746.9 851.3 746.1 852.1 745 854.5 744.4 856.6 743.5 859.9 741.4 862 740.2 860.8 739.7 860.5 741.4 845.2 742.1 842.9 742.3 842.2 743.6 842.8 745.5 844.5 747 846 748.6 847.2 749 847.2 749.4 847.2 751.4 845.7 753.5 843.9 759.3 839 758.9 835.3 752 830 747.9 826.9 747.9 826.9 745.9 828.6L744 830.5 744.3 825.8C744.6 821.2 745.2 820.6 746.9 822.3 749.2 824.5 752.8 822.4 754.7 817.8 755.7 815.5 757 813.1 757.6 812.8 759.3 811.9 756.9 809.4 751.7 806.9 747.7 804.8 747.2 804.3 747.2 801.5 747.2 798.9 747.5 798.4 749 798.8 751.2 799.4 754.4 796 755.6 791.8 756.9 786.6 756.7 785.4 753.8 783.8L751.1 782.4 752.9 777.8C754.5 773.2 756.6 753.6 756.4 742.6L756.3 738.4 755.1 741.7 753.9 744.9 753.8 742.1C753.7 740.6 754.2 733.3 754.7 725.9 755.2 718.6 755.9 704.4 756.4 694.3 756.8 684.2 757.3 675.7 757.6 675.5 758.1 674.8 764.9 677.6 766.7 679.3 767.9 680.3 768.6 679.9 771.6 676.2 776.1 670.6 775.9 668 770.8 665.1 765.4 661.9 762.2 662.2 760.7 665.9 758 673 757.9 672.9 757.4 662.5 757.1 656.9 756.9 652.2 757 652 757 651.9 759.7 652.7 763 653.8 766.1 654.8 769.3 655.5 769.9 655.2 770.6 655 771.4 653.2 771.7 651.4 772.1 649.1 773 647.8 774.2 647.5 777.8 646.6 775.5 643.1 769.7 640.8 768.1 640.2 766.6 639.1 766.3 638.4 765.7 636.9 762.7 637.6 760.7 639.7 759.9 640.6 758.7 643 758 645 756.7 648.5 756.6 648.4 756.5 638.4 756.3 627.5 755.4 612.2 753.8 593.5 753.2 587.1 751.9 571.3 750.8 558.3 749.8 545.4 748.6 533.5 748.2 532L747.6 529.4 743.7 534.4C741.6 537.2 738.4 542.6 736.7 546.4L733.4 553.2 734 542.6C734.3 536.5 735 530.8 735.7 529.3 736.5 527.7 737.7 520.6 738.4 513.5 739.3 506.3 740.6 497.5 741.4 494 742.2 490.4 743 484 743.1 479.7 743.1 475.3 743.6 471.8 744.1 471.6 745 471.3 744.8 421.6 744 418.7 743.7 418.1 742.7 417.6 741.6 417.6 740.2 417.6 739.8 417.2 740.2 416.1 742.8 409.3 741.9 405.9 737 404.6 735 404.1 732.9 403.9 732.4 404.2 731.9 404.4 731.5 403.9 731.5 402.9 731.5 397 718.8 337.1 709.6 299.8L703.5 275 701.1 275.6C699.7 275.8 698.1 276.2 697.6 276.4 696.9 276.6 697 278.6 698.3 283.1 701.4 293.8 702.6 301.6 704.6 323.1 706.8 345.6 707.7 350.9 714.2 376 718 390.6 722.2 411.6 722.2 415.6 722.2 417.1 718.1 417.2 667.4 416.9 637.2 416.8 603 416.9 591.2 417.5 572.3 418.2 569.1 418.6 562.3 420.7 553.1 423.7 544.4 429.4 540 435.3L536.7 439.7 520.9 439.3C506.9 438.8 494.4 439.4 475.5 441.3L469.9 441.9 467.2 436.7C462.1 426.7 449.6 418.2 435.5 415.3 423.2 412.8 381.6 411 323.1 410.5 292.3 410.2 266.9 409.8 266.8 409.6 266 408.9 287.1 285.8 289 280.2 290.4 275.8 290.5 274.4 289.5 273.9 288.1 273 279 273 278.4 273.8ZM360.2 425.9C395.7 427 421.9 428.5 429.6 429.7 441.2 431.6 449.9 436.9 454.3 444.6 456.9 449.4 456.9 449.8 456.9 463 456.8 474.8 456.4 477.7 453.9 487 445.2 520.2 433 538.3 411.2 550.6 398.9 557.6 386.2 561 369 561.8 326.8 563.7 291.5 544.1 280.5 512.4 276.1 499.8 274.4 469.8 277.2 456.4 278.7 449.4 282.1 442.1 285.4 439.2 292.4 432.7 305.6 427.2 317.9 425.9 327.5 424.9 329.1 424.9 360.2 425.9ZM679.9 434.5C694 438.6 702.2 445.2 705.4 454.7 711.5 473.2 709.9 504.4 702.2 520.2 685.6 554.4 631.8 569.7 594 550.9 575 541.6 562.6 525.9 554.4 500.8 549.4 485.7 547.8 476.9 547.7 464.4 547.7 454.2 547.9 452.8 550.1 448.6 553 443 559.3 438 566.5 435.6 574 433.2 589.4 432.6 635.2 432.9 668.9 433 675.3 433.2 679.9 434.5ZM528.4 455.2L531.2 455.7 531.8 466C533.4 498.9 548.1 534.4 566.9 551.5 590.3 572.4 623.7 579.7 657.5 571.2 692.3 562.4 716.9 538.3 722.7 507.3 723.4 503 724.3 493.4 724.4 486.3 724.5 475.7 724.8 473.1 725.8 473.1 726.9 473.1 727 477.2 726.5 499.7L725.9 526.4 717.7 543.1C698.8 581.8 680.4 608.8 657 631.9 639.3 649.6 622.8 660.6 604 667.6L596.9 670.2 589.4 663.9C550.6 631.5 501.6 619.6 455 631.5 432 637.4 408.7 649.5 391.8 664.4 384.7 670.6 384.4 670.6 371.6 665 333.1 648.4 296.2 605.8 264.9 541.7L256.9 525.5 256.6 516.2C256.2 506.3 258.1 471.9 259.2 467.8 259.6 466.3 260.1 470.8 260.5 479.6 261.9 514.2 268.7 532.1 286.9 549.2 294.7 556.7 299.2 559.7 309 564.7 344.5 582.5 390.5 581.4 422.2 561.9 431.2 556.4 444.8 543.3 450.4 534.9 462 517 470.9 489.4 472.8 465.1L473.4 456.7 481.9 455.7C491.5 454.8 524.4 454.4 528.4 455.2ZM740.5 604.6L744.4 614.4 740.6 618C736.8 621.3 730.6 625 726.3 626.3 724.4 626.9 724.4 626.9 725.5 620.2 726.1 616.5 727.3 607.8 728.2 600.9 730.6 582.2 730.2 582.8 733.6 589.4 735.2 592.4 738.2 599.3 740.5 604.6ZM555.6 685.7C555.6 686 554 689.3 552.1 693 545.4 705.9 532.8 715.7 517.5 720.1 508.8 722.5 476.4 722.5 467.1 720.1 456.7 717.3 444.8 711.1 438 704.8 432.7 700 425 689.2 425 686.6 425 685.9 446.6 685.6 490.3 685.4 526.2 685.2 555.6 685.4 555.6 685.7ZM602.7 692.1C612.2 694.4 620.8 699.5 629.3 707.9 637.6 716.1 639.8 720.2 642 730.9 644.6 743.6 643.7 749.6 638.1 755.7 630.7 764 619.2 768.1 605.6 767.4 598.7 767.1 596.6 766.6 590.4 763.6 571.3 754.5 559.9 739.1 559.9 722.2 559.9 699.6 578.6 686.5 602.7 692.1ZM363 462.2C355.6 465.9 351.6 471 349.9 478.2 347.7 488.3 352.1 498.3 361.5 504.2 365 506.3 367.3 506.9 372.2 507.2 380.1 507.7 383.9 506.5 389.2 501.8 399.1 493.1 400.8 479.2 393.2 469.3 388.6 463.1 382.8 460 375.3 459.5 369.5 459.2 368.4 459.4 363 462.2ZM389.3 466.8C394.2 470.6 391.4 478.1 385 478.1 379.1 478.1 376.5 470.4 381.1 466.8 382.5 465.6 384.3 464.8 385.2 464.8 386.1 464.8 387.9 465.6 389.3 466.8ZM602.5 460.6C594.4 463.6 587.8 471.9 586.6 480.6 584.6 494.4 596.3 507.4 610.6 507.4 620.3 507.3 627.8 502.4 632 493.1 637.4 481.7 632.4 467.8 620.8 461.9 616.2 459.4 607.2 458.8 602.5 460.6ZM626.3 466.8C631.2 470.6 628.4 478.1 622 478.1 616.3 478.1 613.8 471.3 618.1 467.1 620.8 464.4 623.1 464.3 626.3 466.8ZM390.1 274.3C389.4 275 388.5 277.5 388 279.9 386.8 285.6 387.8 287.6 392.4 288.8 399.4 290.6 399.4 290.6 402.1 285 403.6 282 404.6 279.1 404.4 278.3 403 274.6 392.2 271.7 390.1 274.3ZM366.2 276.3C365.3 277.6 364.4 280.6 364.2 282.8L363.7 286.9 368.4 288.4C371 289.3 373.3 290.4 373.6 290.8 374.5 292.2 377.6 290.1 379.2 287 379.9 285.6 380.6 282.9 380.6 281.1 380.6 277.1 377.9 275 371.9 274.4 368.2 273.9 367.6 274.2 366.2 276.3ZM342.6 278.4C341.9 280.4 340.9 282.9 340.2 283.9 339.2 285.6 339.3 286.1 341.1 287.9 343.5 290.1 348.7 291.3 352.2 290.4 353.8 290 354.9 288.6 356 285.6 357.5 281.8 357.6 281.4 356.1 279.2 354.3 276.4 351.2 275 346.8 275 344 275 343.5 275.4 342.6 278.4ZM202.1 281.7C198.6 285.6 198 287.3 199.2 290.6 200.3 293.5 204.5 298.1 206.1 298.1 207.6 298.1 213 292.8 213.9 290.4 214.8 287.8 213 284.4 208.9 281.2 207.1 279.8 205.5 278.7 205.3 278.7 205.2 278.7 203.7 280.1 202.1 281.7ZM249.2 281.1C248.1 282.4 246.9 284.9 246.3 286.7 245 290.5 245.9 292 249.7 293.1 251.1 293.3 253.2 294.4 254.4 295.5L256.8 297.2 258.5 294.7C259.4 293.2 260.2 291.3 260.2 290.2 260.2 289.1 261 287.9 262 287.4 263.8 286.6 263.9 286.5 262.4 284.4 260.9 282.3 254.5 278.8 252.1 278.7 251.6 278.7 250.2 279.8 249.2 281.1ZM224.3 280.8C222.6 282.8 221.3 290 222.3 291.8 222.8 292.7 224.4 293.6 226.1 294 227.8 294.4 229.9 295.3 230.8 296.1 232.3 297.4 232.6 297.3 234.6 295.5 237.4 292.9 239.4 285.9 238 283.4 236.3 280.1 226.4 278.2 224.3 280.8ZM770 284C769.4 285.5 768.2 288.1 767.8 290.1 766.9 293.3 766.9 293.9 768.9 295.8 771.4 298.3 777.4 299.8 779.5 298.4 780.3 298 781.3 296.3 781.8 294.8 782.2 293.3 783.2 291.4 784.1 290.6 786.3 288 783.5 284.7 777.4 283 771.1 281.1 771.6 281 770 284ZM748.5 283.1C746.9 284.2 743.2 293.3 743.8 294.8 744.7 297.1 749.1 299.4 752.9 299.4 756.5 299.5 756.6 299.4 758.8 294.1 760.6 289.8 760.8 288.2 760 287.2 757.8 284.6 750.4 281.9 748.5 283.1ZM723.1 285.5C723.1 286.1 722.3 288.2 721.3 290.3 720.3 292.3 719.4 294.4 719.4 295 719.4 298.1 730.1 302.3 733.1 300.4 735.2 299.1 737.2 290.1 736 287.9 734.5 285 723.1 282.9 723.1 285.5ZM606.6 289.9C604.5 291.5 602.5 293.8 602.2 295.1 601.6 297.5 603.2 301.5 605.1 302.2 606.5 302.8 616.9 299.1 617.8 297.7 618.8 296.4 617.7 293.4 615.4 290.9 611.9 287 610.7 286.9 606.6 289.9ZM582.1 290.6C580.7 291.9 579.2 294.4 578.6 296.2 577.7 298.8 577.8 299.5 579.4 301.7 580.3 303 582.8 304.5 584.7 305.3 591 307.5 593.6 305 593.9 296.5 594 293.5 593.7 293.1 590.3 292 588.2 291.3 586.1 290.1 585.6 289.4 584.7 288.2 584.2 288.4 582.1 290.6ZM535 293.2C533.7 294.7 532.4 296.7 532.2 297.7 532 298.7 531.3 299.5 530.6 299.5 528.1 299.5 528.7 301.7 532.1 304.4 538.1 309.2 539.2 309.1 544.7 303.8L549.5 299.1 545.2 294.9C542.8 292.6 540.1 290.7 539.1 290.7 538.1 290.7 536.3 291.9 535 293.2ZM557.5 293.1C552.6 297.2 552.4 298.3 556.1 302.7 560.9 308.2 563.9 307.9 569.1 300.8 570.8 298.3 572 295.8 571.7 295.3 570.9 294 564 290.8 561.9 290.7 561 290.7 559.1 291.9 557.5 293.1ZM488.2 293.1C486.3 294.4 485 297.5 483.8 303.3 483.3 305.9 483.5 306.3 486.9 307.8 492.3 310.3 495.4 309.5 497.9 305.1 501 299.6 500.5 297 495.6 295.6 493.4 294.8 491.7 293.7 491.7 293 491.7 291.3 490.7 291.3 488.2 293.1ZM509.2 295.8C508.1 298.1 507.4 301.4 507.6 303.1 507.9 305.6 508.4 306.2 512.1 307.6 517.6 309.5 519.9 309 521.3 305.3 521.9 303.6 522.9 301.2 523.6 299.8 524.9 297.2 524.9 297.2 519.3 294.4 516.2 293 513.1 291.7 512.3 291.7 511.6 291.7 510.2 293.5 509.2 295.8ZM464.1 293.8C463.5 294.4 462.8 296.1 462.5 297.5 462.1 298.9 460.7 300.8 459.5 301.9 456.6 304.2 457.4 305.4 464.7 309.3L469.9 312.1 471.9 309.6C473.1 308.2 474.6 305.5 475.6 303.5 477.5 299.3 476.6 297.7 471.3 296.3 469.4 295.7 467.5 294.7 467.2 294 466.6 292.3 465.4 292.2 464.1 293.8ZM417.9 295.4C414.6 296.7 411.3 305.3 412.6 308.8 413 309.5 415.5 310.8 418.3 311.7 423.4 313.1 423.5 313.1 425.2 311.1 426.1 310 426.9 308.3 426.9 307.3 426.9 306.4 427.7 305.1 428.7 304.4 431.3 302.6 430.4 300.6 425.2 297.2 420.6 294.2 420.7 294.3 417.9 295.4ZM439.4 296.5C438.6 297.6 438 299.3 438 300.2 438 301 437.2 302.1 436.4 302.6 434.9 303.4 434.9 303.6 436.4 305.9 438.7 309.4 442.2 311.4 444.8 310.7 446.8 310.3 454.5 301.3 453.6 300.6 449.4 297.6 443.8 294.4 442.5 294.4 441.6 294.4 440.2 295.4 439.4 296.5ZM391.2 298.5C389.9 300.6 388 305.9 388 307.7 388 308.1 390.7 309.6 394.1 311.2 399.7 313.7 400.4 313.8 401.9 312.5 402.8 311.7 404 309.2 404.6 307 406.1 301.5 404.9 299.5 398.9 297.7 392.8 295.9 392.9 295.9 391.2 298.5ZM251.4 300.8C247.7 302.4 245.9 305.5 245.8 310.4L245.8 315.2 251.8 317.3C258.5 319.7 259.4 319.4 261 313.9 261.7 311.5 262.7 310.2 263.6 310.2 265.8 310.2 260.6 304.8 258 304.4 256.9 304.3 255.6 303.2 255.1 302 254.1 299.8 254.1 299.8 251.4 300.8ZM203.3 305.6C198.1 311.8 198.5 315.7 204.5 320.1L207.3 322.2 211.1 318.7C216 314 216 311.2 211.4 307.7 209.4 306.3 207.4 304.5 206.9 303.8 206.1 302.8 205.4 303.1 203.3 305.6ZM226 304.4C225 305.3 223.6 308 223 310.5 221.6 315.7 222.2 316.6 229.1 318.9 233.5 320.4 233.7 320.3 235.7 318.4 238.1 316.3 239.9 310.2 239.2 307.3 238.1 303.2 229.6 301.4 226 304.4ZM181.6 310.9C181 313.8 180.3 317.1 180 318.2 179.2 321.3 183.5 322.9 186.8 320.7 189.3 319.2 191.7 314.3 191.7 310.7 191.7 308.8 191 308.2 187.8 307.3 185.6 306.8 183.5 306.1 183.2 305.9 182.9 305.7 182.1 308 181.6 310.9ZM748.4 307C747.8 307.3 746.6 309.8 745.7 312.6 743.8 319.4 745.1 321.6 751.9 323.1 754.6 323.6 756.9 324 756.9 323.9 757 323.7 758.3 321.1 759.7 318.1 762.5 312.2 762.3 310.6 758.2 308.6 755.5 307.3 749.9 306.4 748.4 307ZM770.8 308.3C770 309.3 769 311.9 768.8 314.3L768.2 318.4 773.7 320.8C776.7 322.1 779.6 323 780.2 322.8 782.2 321.9 784.3 318.1 784.8 313.6 785.5 309.4 785.4 309.3 782.1 307.9 777.4 305.9 772.9 306.1 770.8 308.3ZM723.6 310.4C723.2 311.6 722.3 313.9 721.6 315.6 720.1 318.8 721 321.3 723.8 321.3 724.5 321.3 726.2 322.4 727.5 323.7 730.7 326.9 732.4 325.8 734.3 319.6 735 317 735.9 314.6 736.4 314.3 737.8 312.9 736.9 311.9 732.8 310.2 727.1 307.7 724.4 307.8 723.6 310.4ZM513 314.8C513 315.5 511.9 317.4 510.6 319.2 509.3 320.9 507.9 323.4 507.5 324.8L506.9 327.2 501.1 321.9C495.8 317.1 494.4 316 494.4 317 494.4 317.9 510.6 330.9 511.9 331.2 521.3 332.9 522.2 332.6 522.2 328 522.2 326.9 522.9 325.6 523.6 325.4 524.4 325 525 323.8 525 322.5 525 320.7 524.2 319.9 520.6 318.3 518.1 317.3 515.5 315.8 514.6 315 513.3 314 513 313.9 513 314.8ZM534.3 318.1C533.7 319.4 533.3 320.8 533.3 321.3 533.3 321.8 532.7 322.8 531.9 323.6 530.5 325 530.5 325.3 532.5 327.4 538.5 333.9 543.8 333.4 547.3 326.1 549.2 322.3 549.3 321.7 548.1 319.5 546.6 317 544.1 316 538.6 315.8 535.6 315.7 535 316.1 534.3 318.1ZM464.5 319C463.7 319.7 462.9 321.6 462.5 323.1 462.2 324.5 461.3 326.3 460.6 326.9 458.5 328.6 459 329.6 462.8 331.2 464.6 331.9 466.9 333.1 467.7 333.9 468.9 335 469.4 334.8 471.5 332.6 472.8 331.2 474.1 328.8 474.4 327.3 474.8 325.7 475.3 323.9 475.6 323.1 475.8 321.9 474.7 321 471.4 319.5 465.9 317.2 466.2 317.2 464.5 319ZM440.2 322.9C438.7 324.8 436.9 326.9 436.2 327.6 434.9 328.7 435.1 329.2 437.8 331.6 441.4 334.8 446.1 335.2 450.1 332.3 454.9 328.9 455.1 327.4 451.3 323.1 446.8 318.1 443.7 318.1 440.2 322.9ZM228.5 326.6C227.1 326.9 223.1 335.4 223.1 337.9 223.1 339 235 343.5 236.5 343 239.3 341.9 241.5 332.9 239.6 330.3 238.3 328.5 231 326 228.5 326.6ZM203.3 329.5C199.2 333.9 199.8 338.6 205.6 344L208.4 346.8 212.1 342.9C217 337.6 216.9 334.6 212 330.2 210 328.3 207.8 326.9 207.1 326.9 206.5 326.9 204.7 328.1 203.3 329.5ZM178.2 331.9C177.4 333.7 176.7 336.8 176.6 338.6 176.4 341.9 176.5 342 180.8 343.2 183.2 344 185.2 344.9 185.2 345.5 185.2 347 187.6 346.3 189.6 344.2 191.6 342 193.7 334.9 193 332.9 192.3 331.3 188.4 329.6 183.7 329 179.7 328.4 179.6 328.5 178.2 331.9ZM773.1 330.6C772.7 331.5 772.2 333 772.2 333.8 772.2 334.6 771.2 336.2 769.9 337.4L767.6 339.6 770.8 342.4C774 345.3 779.5 347 781.4 345.8 783.1 344.8 786.2 338 785.9 335.9 785.7 334.6 783.9 333.2 779.9 331.5 774.4 328.9 774.1 328.9 773.1 330.6ZM725 333.9C721.1 340.1 721.5 343.2 726.4 346 732.6 349.5 735.5 348.6 736.7 342.8 737.1 340.7 737.8 339.8 739 339.8 742.6 339.8 740.6 336.7 735.6 334.6 733.6 333.8 731 332.3 729.9 331.3L727.9 329.4 725 333.9ZM796.8 331.3C795.3 332.2 793.3 334.2 792.6 335.6 791.3 338.1 791.3 338.2 794.4 340.9 799.2 344.9 801.7 345.7 804.3 344 806.7 342.4 806.8 341.5 805.3 334.7 804.4 330.8 803.8 330.1 801.9 329.8 800.6 329.7 798.3 330.4 796.8 331.3ZM747.1 335.3L743.3 339.1 745.6 341.5C749.3 345.7 751.3 347.2 753.7 347.2 757.1 347.2 760.2 344.7 760.2 341.9 760.2 340.5 760.8 339.4 762 339.2 764.5 338.5 764.4 337.9 760.8 334.4 756.3 330 752.1 330.3 747.1 335.3ZM205.3 351.7C204.4 352.6 203.4 354.6 203.1 356.2 202.8 358.2 201.9 359.3 200.4 359.6 198.2 360.2 198.1 360.3 199.6 362.5 200.5 363.8 201.9 364.8 202.7 364.8 203.5 364.8 205.2 365.6 206.5 366.7 209.9 369.4 212.5 369.1 213.9 365.7 214.5 364.2 216.1 362 217.4 361 220.5 358.6 219.4 356.7 214.3 354.9 212.3 354.3 210 352.9 209.1 351.9 207.2 349.6 207.1 349.6 205.3 351.7ZM227.8 351.8C227.3 352.8 226.9 354.2 226.9 354.9 226.9 355.6 225.8 357.1 224.5 358.3L222.3 360.5 226.7 364.1C230.4 367.1 231.6 367.6 234.7 367.4 238.1 367.1 238.5 366.9 239.6 363.5 240.3 361.6 240.8 358.8 241 357.3 241.2 354.8 240.7 354.4 235.6 352.3 229 349.5 229 349.5 227.8 351.8ZM181.7 353.7C178.9 356.3 176.7 360.8 177 363.2 177.2 364.7 178.4 365.6 180.9 366.5 183 367.1 185 368.2 185.6 369.1 186.5 370.3 186.9 370.3 189.2 368.5 190.6 367.4 191.7 365.6 191.7 364.6 191.7 363.5 192.3 361.9 193.1 361.1 194.4 359.6 194.1 359.2 190.3 355.6 185.6 351.3 184.5 351.1 181.7 353.7ZM796.9 353.9C796.1 355.1 795.2 358.1 794.9 360.6L794.3 365.3 799.4 367.4C806.7 370.5 808.2 369.5 809.7 361 810.6 356 809.2 354.1 803.7 352.9 801.1 352.3 798.8 351.9 798.6 351.9 798.3 351.9 797.6 352.8 796.9 353.9ZM774.2 354C773.7 354.6 773 356.3 772.7 357.7 772.3 359.1 771.2 360.8 770.1 361.6 768.4 362.7 768.4 363.1 769.5 364.4 770.3 365.3 772.1 366.6 773.6 367.3 775.2 368 777.1 369.1 778.1 369.7 780.4 371.4 782.6 369.5 784 364.8 784.6 362.7 785.6 360.3 786.2 359.5 787.7 357.8 786.7 356.9 780.4 354.7 776.4 353.3 774.9 353.1 774.2 354ZM726 356.7C725.5 358.3 725.3 361.5 725.6 364.2 726.1 368.1 726.7 369 729.7 370.9 731.7 372.1 733.5 373.1 733.7 373.1 735 373.1 738.9 365.8 738.9 363.4 738.9 360 737.6 358.1 733.3 355.6 728.8 353 727.2 353.1 726 356.7ZM749.1 357.4C748 358.9 746.9 361.7 746.6 363.4 746 366.6 746.1 366.7 751.4 369 754.4 370.3 757.4 371.3 758.1 371.1 758.9 370.9 760.2 369.1 760.9 366.9 761.7 364.6 762.8 362.6 763.5 362.3 765.7 361.5 765 360.3 760.5 357.4 754.8 353.8 751.7 353.8 749.1 357.4ZM591.7 373.2C576.1 374.3 558.8 377.6 554.8 380.2 546.9 385.4 547.4 397.6 555.7 402.9 559.3 405 563.5 404.9 575 402.3 596 397.6 623.9 399.2 647 406.3 651.5 407.6 656.9 408.8 659.3 408.8 669.7 408.8 675.7 396.8 669.5 388.1 666.9 384.4 661.2 381.9 646.9 378.2 628.7 373.6 610 371.9 591.7 373.2ZM227.5 378.2C225.6 381.2 224.4 384.2 224.7 385.1 225.2 386.8 228.6 388.9 230.7 388.9 231.4 388.9 232.8 389.7 233.9 390.8L235.9 392.7 237.7 390.5C238.6 389.2 240 386.4 240.7 384.3 242.2 379.7 241.5 377.9 237.4 376.6 235.9 376.1 234.1 375.1 233.2 374.4 232.5 373.7 231.6 373.1 231.2 373.1 230.9 373.1 229.3 375.5 227.5 378.2ZM362 373.8C332.4 378.2 318.1 382.8 314.5 388.8 312.1 393 312.4 399.6 315.4 403.4 318.1 407 322 409.3 325.7 409.3 327.2 409.3 331.4 408.2 335.1 406.9 358 399.2 388.1 397.5 412 402.7 416.9 403.8 421.8 404.6 423 404.6 426.4 404.6 431.3 401.9 433.4 398.9 437.2 393.6 435.3 383.2 429.7 379.9 427.3 378.4 417.3 376.1 406 374.5 397.6 373.3 368.2 372.8 362 373.8ZM182.6 376.4C179.7 378.8 177.1 385.8 178.1 388.4 178.7 390.1 181.9 391.4 187 392.2 190.6 392.8 190.7 392.8 192.5 388.6 193.5 386.3 195 384 195.9 383.5 197.4 382.7 197.2 382.4 194.4 380.6 192.6 379.6 190.7 378.7 190.1 378.7 189.5 378.7 188.2 377.7 187.2 376.4L185.4 374.1 182.6 376.4ZM776.1 375.2C775.6 375.8 774.7 378.1 774.2 380.3 773.5 382.4 772.2 384.8 771.1 385.6 768.4 387.4 769.4 389.3 774 390.6 776 391.2 778.3 392.6 779.1 393.7 780.9 396.3 783 395.4 784.7 391 785.6 389.1 786.9 386.9 787.7 386.4 790 384.6 788 381 783.3 378.7 781.2 377.6 779.4 376.2 779 375.5 778.4 373.8 777.4 373.7 776.1 375.2ZM797.7 376.6C797.4 378.1 796.4 380.7 795.5 382.6 794 385.6 793.9 386.2 795 387.9 795.7 388.9 797.5 389.9 799 390.3 800.5 390.6 802.2 391.5 802.9 392.2 804.7 394.4 806.1 393.7 809.6 388.2 814.6 380.3 814.4 379.4 805.6 376 799 373.5 798.2 373.6 797.7 376.6ZM206 377.7C204.5 378.6 202.4 380.3 201.5 381.4 199.6 383.3 199.7 383.4 203.2 387 208.1 392 210.8 391.9 216.5 386.7L220.8 382.6 219 380.6C216.8 378.1 212.8 375.9 210.5 375.9 209.5 375.9 207.6 376.7 206 377.7ZM750.3 381.3C748.6 383.7 747.2 386.6 747.2 387.7 747.2 390.3 752.9 393.8 757.2 393.9 760.5 394 760.7 393.8 761.9 390 762.6 387.9 763.7 386.1 764.4 386.1 765.8 386.1 766.1 385.3 765 383.6 764.5 383 754 376.8 753.2 376.9 753.2 376.9 751.9 378.8 750.3 381.3ZM728.8 380.7C728.8 381.9 729.4 385.6 730 388.9 731.1 394.6 731.3 394.9 733.7 394.7 736.9 394.4 738.9 392.9 740.5 389.1 742.3 384.6 741.3 382.9 735.9 380.6 730 378.1 728.7 378.1 728.8 380.7ZM230.2 398.7C229.4 399.4 228.7 400.9 228.7 401.8 228.7 402.7 227.9 404.5 226.8 405.9 224.9 408.3 224.9 408.5 226.4 410.2 227.2 411.1 229.3 412.2 230.9 412.6 232.5 412.9 234.4 413.6 234.9 414.1 236.6 415.4 240.3 412.8 242.2 409.2 244.2 405.3 242.7 401.9 238.1 399.3 233.8 396.9 232.1 396.8 230.2 398.7ZM181.9 400.2C181.5 400.7 180.6 403.6 180 406.4 178.6 412.2 179.2 413.3 183.5 414.3 185.1 414.5 187.1 415.5 188 416.2 190.5 418.4 194 415.1 195.4 409.3 196.8 403.5 196 402.4 189.5 400.5 183.9 398.8 182.7 398.7 181.9 400.2ZM205.6 401.1C201.9 411.1 202 413 206 413 207.4 413 209.4 414 210.6 415.4 213.2 418.1 214.2 417.9 215.7 413.7 216.4 412 217.8 409.7 218.8 408.6 221.4 405.6 220.2 403.3 214.6 401 208.6 398.5 206.7 398.5 205.6 401.1ZM775.2 403.4C773.1 405.5 771.3 408.1 771.3 409.1 771.3 411 776.2 415.7 778.2 415.7 778.9 415.7 779.7 416.5 780 417.3 780.6 418.6 781.2 418.2 784.3 415.3 788.6 411 789 408.2 785.5 405.3 784.1 404.2 782.1 402.4 781.1 401.4L779.2 399.5 775.2 403.4ZM799.5 402.3C796.7 405 796.2 405.9 796.7 408.1 797.5 411.5 804 418.1 805.9 417.3 808.1 416.5 812.3 409.5 812.3 406.8 812.3 403.9 807.5 399.1 804.7 399.1 803.7 399.1 801.4 400.6 799.5 402.3ZM162.5 404C162.2 405.6 161.7 409 161.2 411.4 160.5 415.5 160.6 415.9 162.5 417.2 166 419.5 169 417.6 171.2 411.5 172.3 408.6 172.9 405.8 172.5 405.5 172.1 405.1 169.8 403.9 167.4 402.9L163.1 401 162.5 404ZM751.1 403.2C749.1 405.8 747.8 410.6 748.3 413.5 748.7 415.8 752.8 417.7 757.6 417.9 761.4 418.1 761.5 418 762.7 414 763.3 411.7 764.4 409.5 765 409.1 767.6 407.5 762 403 755.5 401.4 753.5 400.9 752.6 401.3 751.1 403.2ZM231.5 422.1C229.3 425.4 226.9 430.8 226.9 432.9 226.9 434.6 233.6 437.9 237.1 438 240.1 438 241.7 436.2 241.9 432.9 242 431.6 242.7 430.1 243.4 429.7 245.5 428.4 244.2 425.6 241 424.6 239.4 424.1 237.2 422.7 236.1 421.5 235.1 420.4 234 419.4 233.8 419.4 233.6 419.4 232.6 420.6 231.5 422.1ZM208.1 422.4C206.7 423.5 203.8 430.2 203.4 433.3 203.3 434.1 204.8 435.5 206.9 436.4 209 437.4 211.4 438.8 212.3 439.6 213.1 440.4 214 440.8 214.2 440.6 216.9 437 220.4 430.5 220.4 429 220.4 426.7 218.1 424.5 213.6 422.7 209.5 421 210 421 208.1 422.4ZM777.3 424.6C776.1 425.9 774.6 429 774.1 431.6 772.8 436.9 773.2 437.9 778.1 440.2 783.5 442.7 784.9 442.2 787.5 436.8 788.8 434 789.8 431.2 789.8 430.5 789.8 428.5 788 426.9 785.9 426.9 784.9 426.9 783.1 425.8 781.9 424.5L779.5 422.2 777.3 424.6ZM801.1 424.3C799.2 426.4 798 429 796.9 433.4 796.4 435.5 796.9 436 801.4 438.4L806.4 441.2 808.6 439.1C813.4 434.5 813.7 426.9 809.1 423.7 806.2 421.7 803.4 421.9 801.1 424.3ZM159.4 425.7C157.9 429.5 157.1 434.8 157.9 436.9 158.1 438 159.8 439.6 161.5 440.7 165.5 443.1 169.1 442 170 438.2 170.4 436.9 171.2 434.4 171.9 433 173.6 429.6 173 428.8 165.6 425.6L160.4 423.3 159.4 425.7ZM181.5 427C179.2 432.1 179.1 436 181.3 436.8 182.1 437 184.6 438.1 186.9 439.1 190.6 440.8 190.9 440.9 192.7 439.3 195.1 437.1 197.5 428.8 196.2 427.2 195.1 425.9 187.6 423.1 185 423.1 183.8 423.1 182.6 424.5 181.5 427ZM751.5 427.2C748.1 432.4 748.7 439.8 752.5 439.8 753.2 439.8 755.4 440.5 757.1 441.4 760.3 442.9 760.4 442.8 762.5 440.6 765.1 438.1 766.9 431.6 765.6 429.2 764.4 427.2 759.3 425 755.6 425 753.9 425 752.5 425.7 751.5 427.2ZM160.2 449.7C155.8 458.9 156 459.9 162.1 463.1 167.7 465.8 169.3 465.2 171.8 459.3 174.4 453.2 173.8 451.8 168.5 449.6 166.5 448.8 164.5 447.5 164.3 446.8 163.3 444.4 162.3 445.2 160.2 449.7ZM207.9 448.8C207.6 450.2 206.5 452.4 205.5 453.8 203.2 457 203.8 458.4 208.4 461 213.3 463.8 215.5 463.1 219.6 457.5L223 453 221 451.1C218.7 449 212.6 446.3 210.2 446.3 209.2 446.3 208.3 447.2 207.9 448.8ZM801.7 447.9C800.9 448.8 799.6 451.4 798.8 453.6 796.9 458.5 797.8 460.6 801.9 461.6 803.5 461.9 805.6 463 806.4 463.8 807.9 465.3 808.2 465 812.8 458.1 816.2 453.1 817.2 450.9 816.2 450.9 815.4 450.9 812.8 449.9 810.4 448.6 805.3 445.8 803.5 445.7 801.7 447.9ZM182.9 449.4C182 450.6 181.3 453.7 181.2 456L181 460.3 186.2 462.4C192.3 464.9 194 464.4 195.9 459.6 199 452.3 196.8 448.4 189.1 447.5 184.8 447 184.4 447.2 182.9 449.4ZM779.4 448.2C776.9 449.6 773.1 458.3 774.1 460.2 775.4 462.6 781.3 465.1 783.9 464.4 785.8 463.9 791.7 456.6 791.7 454.5 791.7 453.9 782.3 447.2 781.5 447.2 781.2 447.2 780.3 447.7 779.4 448.2ZM754.4 449.7C751.9 452.7 749.9 457.5 750.2 460 750.4 461.9 751.2 462.7 753.2 463.2 754.8 463.7 757.2 464.6 758.7 465.4 761.7 466.9 763.9 465.8 763.9 463 763.9 462 765 459.9 766.3 458.3 767.7 456.8 768.6 455.4 768.4 455.2 766 453.1 757.9 448.1 756.9 448.1 756.4 448.1 755.2 448.9 754.4 449.7ZM803 470.8C800.7 472.5 797.5 482.1 798.8 483.4 799.3 483.9 801.9 485 804.9 486 809.6 487.7 810.3 487.7 811.6 486.5 812.3 485.6 813 484.3 813 483.4 813 482.5 813.8 480.6 814.9 479.3 817.1 476.4 816.9 475.9 811.6 472.2 806.9 469.1 805.8 468.9 803 470.8ZM185.5 471.5C184.9 472.1 183.8 474.8 182.9 477.5 180.8 483.1 181.6 484.6 186.6 485.6 188.3 485.9 190.2 486.9 190.6 487.8 191.5 489.2 191.8 489.2 193.9 487.1 195.2 485.8 196.3 483.9 196.3 482.6 196.3 481.2 196.9 480.2 198.1 479.9 200.5 479.3 200.5 478.6 198.1 475.6 196.9 474.2 194.3 472.6 191.5 471.8 185.7 470.1 186.5 470.1 185.5 471.5ZM208.4 472C207.9 473.1 207.4 474.6 207.4 475.4 207.4 476.2 206.5 477.8 205.4 478.9 203.5 480.7 203.5 480.9 205.1 482.1 206.1 482.8 207.3 483.3 208 483.3 208.6 483.3 210.5 484.4 212 485.8 214.4 487.7 215.4 488.1 216.6 487.3 218.7 486 221 481.6 221.8 477.5 222.4 474.2 222.3 474 218.9 472.6 212.9 470.1 209.5 469.9 208.4 472ZM161.4 472.7C159.8 473.8 157.4 480.1 157.4 483.3 157.4 484.3 166.9 488.9 169 488.9 170.9 488.9 173 485.8 174.2 481.2 175.1 477.3 175 476.6 173.6 475 172.8 474.1 170.7 473 169.1 472.7 167.5 472.3 165.6 471.9 164.8 471.7 164 471.5 162.5 471.9 161.4 472.7ZM756.3 473.1C753.5 475.3 750.6 481.9 751.4 484.4 751.8 485.4 753.4 486.5 755.6 487 757.6 487.6 759.5 488.6 760 489.4 761.6 492.3 765.7 488 765.7 483.4 765.7 482.4 766.7 481.5 767.9 481.1 769.8 480.6 769.6 480.3 765.1 475.9 762.5 473.3 759.9 471.3 759.4 471.3 759 471.3 757.5 472.1 756.3 473.1ZM778.9 472.5C778.3 473.1 777.6 474.8 777.3 476.2 776.9 477.6 775.7 479.4 774.7 480.1 772.9 481.4 772.9 481.5 774.5 483.2 775.4 484.3 777 485.4 778.1 485.7 779.2 486 781 487.1 782.1 488.2 784.1 489.9 784.4 490 786.5 488.6 788.9 487 792.4 477.1 791 475.9 790.6 475.6 787.9 474.4 785 473.3 781 471.9 779.5 471.7 778.9 472.5ZM210.7 493.7C209.9 494.8 209.3 496.3 209.3 497 209.3 497.7 208.2 499.3 206.9 500.6 205.7 501.8 204.9 503.3 205.2 504 205.4 504.6 208.1 506.5 211.3 508.1 216.8 511 217.1 511 218.6 509.5 219.4 508.6 220.8 505.8 221.7 503.3 223.4 498 222.8 496.8 218 495.8 215.7 495.5 214.4 494.6 214.2 493.4 213.5 491.1 212.5 491.2 210.7 493.7ZM185.8 496.3C183.5 499 181.8 505.6 182.8 507.3 183.6 508.6 193.2 511.4 194.8 510.8 195.6 510.6 196.5 508.8 196.9 506.9 197.1 505.2 198.3 503.1 199.4 502.3 200.8 501.3 201 500.7 200.1 499.6 199.4 498.9 197.8 498 196.3 497.7 194.9 497.4 193 496.3 192 495.3 189.8 492.9 188.5 493.1 185.8 496.3ZM804 494.6C803.4 495.3 802.3 497.5 801.5 499.5 800.6 501.5 799.5 503.4 799 503.7 797 504.9 799.4 507.4 804.4 509.3 811.8 512 811.9 511.9 815.2 504.7 817.3 500.3 817.1 499.7 812.9 496.9 808.1 493.8 805.3 493.1 804 494.6ZM827 494.6C826.6 495.3 825.8 496.9 825.5 498.1 825.1 499.4 824.3 501.4 823.5 502.5 822.4 504.2 822.5 504.7 824.1 506.8 825.1 508.1 827 509.4 828.4 509.6 829.9 510 831.8 510.5 832.8 510.8 834.4 511.3 834.4 510.9 833.9 505 832.9 494.5 832.5 493.5 830.1 493.5 829 493.5 827.6 494.1 827 494.6ZM161.8 496C160.2 497.8 158 506.1 158.8 507.3 159 507.8 161.6 509.3 164.4 510.6L169.6 513.1 171.9 510.8C173.5 509.4 174.4 507.1 174.7 504.3 175.5 498.4 173.8 496.7 166.1 495 164.1 494.5 163 494.8 161.8 496ZM757.8 495.2C757.2 495.6 755.6 498.1 754.3 500.6 753 503.3 751.4 505.6 750.9 505.6 748.9 505.6 751.4 508.3 755.6 510.6 761.9 514.1 763.6 513.5 767 507.3 769.4 502.9 769.7 501.9 768.6 500.6 768 499.7 766.6 499.1 765.6 499.1 764.6 499.1 762.8 498.1 761.5 496.8 758.9 494.2 759.2 494.3 757.8 495.2ZM779.4 498.1C775.4 502.8 774.8 504.8 776.6 507.4 778.2 509.7 783.1 512 786.5 512 788.1 512 789 511.3 789.7 509.1 790.3 507.5 791.4 505.4 792.2 504.5 794.4 502.2 793.2 500.2 789.2 498.5 787.2 497.7 785 496.4 784.2 495.7 782.8 494.5 782.3 494.7 779.4 498.1ZM210.7 518.7C209.9 519.8 209.3 521.4 209.3 522.2 209.3 523 208.6 524.7 207.9 526.2 206.4 529 205.8 528.3 214.4 533.6L218.1 535.9 220.7 531.9C225.6 524 224.9 520.1 217.7 517.7 213.2 516.2 212.3 516.4 210.7 518.7ZM804.4 518.7C801.9 522.8 799.8 528.6 800.3 530 800.6 530.7 802.5 531.9 804.6 532.5 806.8 533.1 809 534.4 809.6 535.4 810.7 536.9 810.9 536.9 812.2 535.5 813.9 533.5 817.6 525.8 817.6 524.4 817.6 523.5 810.4 518.7 806.4 516.9 806.1 516.8 805.2 517.6 804.4 518.7ZM187.8 519.7C186.6 521 184.7 523.5 183.6 525.3L181.7 528.5 183.6 530.4C186 532.5 192 535.2 194.6 535.2 195.6 535.2 196.6 534.4 196.9 533.5 197.2 532.7 198.2 530.2 199.3 528 200.3 525.7 201 523.8 200.7 523.6 200.6 523.4 198.9 522.2 197 521 191.8 517.4 190.1 517.1 187.8 519.7ZM829.3 519.5C828 520.6 826 522.9 824.9 524.6L822.9 528.1 825.1 529.7C832.8 535.6 836.1 535.5 836.1 529.4 836.1 519.1 833.9 515.9 829.3 519.5ZM780.5 520.6C779.9 521.7 779.1 523.6 778.7 524.9 778.4 526.2 777.6 527.3 776.9 527.3 774.4 527.3 775.2 529.3 778.9 532.1 784.2 536.5 787.1 536.2 790.6 531.2 792 529.1 793.5 526.9 793.8 526.3 794.5 525 785.6 518.5 783.1 518.5 782.2 518.5 781 519.4 780.5 520.6ZM163.1 520.6C162.7 521.2 161.9 523.1 161.6 524.8 161.2 526.5 160.4 528.1 159.6 528.4 158.5 528.8 158.6 529.4 160.4 531.3 163.5 534.6 167.9 536.3 170.8 535.2 175.3 533.5 178.6 524.8 175.7 522.5 174.6 521.7 166.9 519.4 165 519.4 164.5 519.4 163.7 520 163.1 520.6ZM755.2 524.1C753.3 526.1 751.9 528.3 751.9 529.1 751.9 529.8 753.1 531.7 754.7 533.2 758.8 537.3 762.5 537.1 767.6 532.6 772.3 528.4 772.2 527.2 766.6 523.1 761.4 519.4 759.3 519.6 755.2 524.1ZM187 545.5C185.1 548.7 184.3 551.1 184.4 553.1 184.7 555.8 185.1 556.1 190.6 557.5 197 559.2 196.7 559.4 199.6 552.1 201.6 547.4 201.3 545.4 198.6 545.4 198.1 545.4 196.1 544.4 194.3 543.1 192.4 541.8 190.6 540.7 190.4 540.7 190.2 540.7 188.7 542.9 187 545.5ZM211.1 543.1C210.6 544.4 210.2 546 210.2 546.6 210.2 547.2 209.5 548.7 208.7 549.8 207.5 551.6 207.5 552.2 208.4 553.3 209.9 555.2 213.6 557 217.3 557.8 220.1 558.4 220.3 558.3 223 552.7L225.7 546.9 223.6 544.8C221.8 543 216.2 540.7 213.1 540.7 212.5 540.7 211.6 541.9 211.1 543.1ZM805.7 542.1C803.6 543.7 800.4 553 801.4 554.5 802.2 555.9 811.7 558.7 813.2 558.1 814.1 557.8 815.2 555.8 815.7 553.7 816.3 551.6 817.3 549.7 818.1 549.4 820 548.6 818.3 545.9 814.1 543.1 810.1 540.4 808.6 540.2 805.7 542.1ZM827.6 542.3C823.3 547.2 823.4 550 827.7 554.1 830.6 556.9 834.3 557.5 836.6 555.6 838.8 553.7 838.4 544.9 836.1 542.6 833.8 540.3 829.4 540.2 827.6 542.3ZM164.5 544.2C163.8 545.1 162.9 546.9 162.5 548.2 162.1 549.6 161.1 551.1 160.1 551.5 158.4 552.2 158.6 552.6 162.2 555.4 166.9 559 169.9 559.9 171.9 558.2 173.5 556.9 179.1 549.1 178.5 548.8 178.4 548.7 176.3 547.2 173.9 545.6 169.1 542.2 166.7 541.9 164.5 544.2ZM780.3 544.3C779.4 545.3 778.4 548.1 778.1 550.6 777.4 556.3 779.4 558.4 785.8 559L790.3 559.4 792.7 554.2C795 549.1 795 548.9 793.4 546.9 792.5 545.6 790.5 544.4 789 544.2 787.5 543.9 785.3 543.3 784.1 543.1 782.6 542.7 781.4 543.1 780.3 544.3ZM757.7 544.6C755.4 547.5 753.1 554.4 753.9 555.8 755.2 558.2 759.7 560.2 763.8 560.2 766.9 560.2 767.8 559.8 768.9 557.6 769.6 556.1 770.4 553.3 770.6 551.5 770.7 548.6 770.4 547.6 768.5 546.2 765.4 543.9 759.1 543 757.7 544.6ZM211.9 567.2C211.4 568.7 210.3 571.3 209.5 572.9 207.8 576.5 208.8 578.2 213.6 580.3 220.8 583.2 224.4 581.1 225.6 573 226.1 569.2 225.9 568.5 223.9 567.2 222.7 566.4 219.7 565.5 217.3 565.2 213.2 564.6 213 564.7 211.9 567.2ZM828.1 567.1C827.2 568.6 826.5 571.5 826.5 573.9 826.4 578 826.5 578.1 829.6 579 831.4 579.4 833.6 580.5 834.5 581.3 835.8 582.4 836.6 582.6 837.8 581.8 839.1 580.9 839.4 579.4 839.3 573.7 839.2 569.8 838.9 566.4 838.7 566.2 838.4 565.9 836.4 565.5 834.1 565.2 830.2 564.6 829.7 564.8 828.1 567.1ZM164.9 567.8C164.4 569 163.3 571.7 162.5 573.9 160.9 577.6 160.9 577.9 162.4 579.5 164.4 581.7 171.4 583.7 173.9 583 176.3 582.1 178.2 576.5 177.9 571 177.8 570 176.2 568.6 173.9 567.6 168.5 565.2 165.9 565.3 164.9 567.8ZM187.5 567.9C186.8 569.1 185.8 571.9 185.6 574.3L184.9 578.5 188.8 579.7C190.9 580.4 193.1 581.4 193.6 582.1 196.1 585 199.4 582.2 201.5 575.5 203.1 570 202.1 568.1 197.4 566.7 191.9 565.2 189.1 565.5 187.5 567.9ZM804.6 567.1C803 569.1 801.9 576 802.9 578 803.5 579.2 810.6 581.5 813.9 581.5 815.5 581.5 817.5 578.6 818.4 575.3 819.7 570.8 818 568.1 813.2 566.8 808.4 565.4 806 565.5 804.6 567.1ZM780.2 569.2C778.2 573.1 777.6 577.5 778.6 579.4 779.7 581.6 784.2 583.3 788.4 583.3 791.2 583.3 791.6 583 793.4 577.7 795.1 573.1 795.3 571.9 794.4 570.7 792.5 568.4 788.2 566.7 784.8 566.7 782.1 566.7 781.3 567.1 780.2 569.2ZM756.9 569.7C756.1 571 755.4 574.1 755.3 576.5L755.1 580.7 759.1 581.9C761.2 582.6 763.7 583.7 764.4 584.4 765.7 585.4 766.3 585.2 768.1 583.1 769.3 581.7 770.6 578.7 770.9 576.3 771.8 570.7 769.6 568.4 763.1 567.8 759 567.4 758.3 567.6 756.9 569.7ZM212.6 590C211.9 591.2 210.7 594 210.2 596.2 209.3 599.9 209.3 600.5 210.7 601.6 211.7 602.2 213.1 602.8 214 602.8 214.8 602.8 216.6 603.6 218 604.7L220.4 606.6 223.1 603.9C226 600.9 227.7 595.1 226.2 592.7 225.1 590.8 221.8 589.3 217.4 588.5 214.4 588 213.8 588.2 212.6 590ZM829 590.4C828.1 591.8 827.4 594.7 827.4 597 827.3 601.2 827.4 601.3 831.2 602.8 833.4 603.6 835.6 604.7 836.3 605.4 837.1 606.2 837.8 606.1 839.1 604.9 840.4 603.7 840.7 602 840.7 596.8L840.7 590 836.7 589C831 587.6 830.8 587.6 829 590.4ZM189.4 590.9C188.6 592 188 593.4 188 594 188 594.4 187.3 596.1 186.6 597.6 185.3 600.1 185.3 600.5 187.1 602.4 188.8 604.2 195 606.5 198.1 606.5 199.8 606.5 202.8 600.6 202.8 597 202.8 593.1 201.1 591.1 196.5 589.8 191.7 588.5 191 588.6 189.4 590.9ZM806.1 590.3C804.6 591.8 802.8 597.3 802.8 600.3 802.8 601.2 803.9 602.3 805.4 602.9 806.8 603.4 809.1 604.4 810.5 605.2 811.9 605.9 813.7 606.5 814.4 606.5 817.4 606.5 821.1 596.6 819.4 593.3 817.6 590.1 808.4 588 806.1 590.3ZM782.4 592.2C781.9 593.5 781.5 595.2 781.5 595.9 781.5 596.6 780.6 597.7 779.6 598.3 778.6 599 777.8 599.8 777.8 600.2 777.8 601.7 781.9 604.6 784.1 604.6 785.5 604.6 786.5 605.3 786.8 606.5 787.4 608.8 790 608.9 791.9 606.7 792.7 605.8 794.2 602.9 795.3 600.2L797.1 595.2 791.2 592.5C783.9 589.3 783.5 589.2 782.4 592.2ZM164.4 594.6C163.5 596.8 162.1 599 161.4 599.6 160 600.6 160.2 600.8 162.6 602.3 164.1 603.2 166.4 604.7 167.8 605.6 173.1 609.4 176.8 607.2 178.5 599.4 179.6 594.6 179.2 593.9 174.2 592.1 167.6 589.8 166.1 590.2 164.4 594.6ZM760 592.3C757.6 595.1 755.5 600 755.7 602.1 755.9 603.6 757.1 604.5 759.7 605.4 761.8 606 763.9 607.1 764.4 608 766.5 610.6 770.4 606.6 770.4 601.9 770.4 600.6 771 600 772.2 600 775.1 600 774.4 598.6 769.8 594.5 765.2 590.5 762.2 589.8 760 592.3ZM168.3 613.6C166.4 615.8 163 622.8 163 624.4 163 625.3 165.4 627.1 168.4 628.6 174.6 631.9 175.5 631.6 178.7 625.3 181 620.6 180.3 618.4 175.6 616.1 174 615.3 172 614 171.2 613.3 169.9 612.2 169.5 612.2 168.3 613.6ZM784.4 614.2C783.3 615.4 781.9 617.6 781.4 619.2 780.2 622.9 782.2 627.8 786.4 630.7L789.2 632.8 792.8 628.8C796.7 624.4 797.2 621.2 794.5 618.7 792.3 616.7 786.9 612 786.7 612 786.5 612 785.6 613 784.4 614.2ZM830 614.4C829.2 615.6 828.2 618.5 828 620.8 827.6 624.7 827.7 625 830.2 625.9 831.7 626.4 834.1 627.4 835.5 628.2 837.4 629.3 838.6 629.4 839.9 628.7 841.4 627.9 841.7 626.7 841.7 620.5 841.7 613.7 841.5 613.1 839.6 612.6 834.9 611.4 831.6 611.9 830 614.4ZM189.8 615.4C189.4 616.9 188.2 619.3 187.5 620.7 186.1 623.2 186.1 623.6 187.7 625.1 188.6 625.9 191.3 627.5 193.7 628.5L198.1 630.5 201.4 626.1C205.3 621.1 205.4 618.1 201.8 615.5 200.4 614.5 197.4 613.4 195 613.2 191 612.8 190.7 612.9 189.8 615.4ZM760.8 616.5C756.1 621.3 756.2 624.2 761.3 629.4 763.4 631.6 765.7 633.3 766.3 633.3 766.9 633.3 768.5 632 769.8 630.5 773.4 626.2 773.1 621.4 768.9 616.7 767 614.6 765.3 613 764.9 613 764.5 613 762.7 614.5 760.8 616.5ZM807.8 614.1C807.3 614.7 806 617.1 804.9 619.4L802.8 623.6 804.7 625.3C805.8 626.1 807.8 627.1 809.2 627.4 810.5 627.7 812.6 628.3 813.8 628.8 815.3 629.4 816.4 629.4 817.1 628.7 818.3 627.8 820.4 620.2 820.4 617.1 820.4 614 809.4 611.4 807.8 614.1ZM146.5 622.9C146.8 630.9 146.8 631 149.2 631.3 151.3 631.6 152 630.9 154.5 626.3 156.1 623.3 157.4 620.6 157.4 620.4 157.4 619.7 148.1 614.8 146.9 614.8 146.6 614.8 146.4 618.4 146.5 622.9ZM191.4 637.8C189.7 639.7 188 644.9 188 647.8 188 649.4 188.7 650.2 191.8 651.1 193.9 651.7 196 653 196.6 653.8 198.1 656.1 200 654.9 201.9 650.4 202.9 648.1 204.1 646.3 204.6 646.3 206.1 646.3 205.7 641.9 204.2 640.4 203.3 639.5 200.9 638.5 198.8 638 196.7 637.4 194.4 636.8 193.8 636.6 193.2 636.4 192.1 636.9 191.4 637.8ZM785.3 638.5C783.5 640.7 783.1 641.9 783.4 644.2 783.4 644.5 782.6 645.2 781.5 645.6 778.3 646.8 779.6 649.2 784.8 651.8 787.4 653.1 790.3 654.7 791.1 655.5 792.4 656.6 792.8 656.2 794.5 652.2 795.6 649.7 797 647.3 797.8 646.9 800.7 645.3 799.2 642.5 794 640.3 791.2 639 788.9 637.6 788.9 637 788.9 635.4 787.2 636 785.3 638.5ZM834.5 637.5C833.4 638.2 831.3 640.9 829.7 643.4L826.9 648.1 830.9 649.9C835.3 652 838.1 652.3 840.8 650.9 842.2 650.1 842.6 648.9 842.6 644.4 842.6 639.3 842.4 638.9 839.8 637.5 836.6 635.8 836.9 635.8 834.5 637.5ZM168.1 638.5C167.3 639.3 166.7 640.4 166.7 640.9 166.7 641.4 165.9 643.3 165.1 645.1 162.8 650 165.3 652.7 173.2 654.2 177.5 654.9 179.3 653.2 180.1 647.8 180.9 642.5 180.1 640.2 177 639.1 172 637.1 169.6 637 168.1 638.5ZM807.2 640.9C805.3 643.1 803.7 645 803.7 645.4 803.7 645.6 805.6 647.7 807.8 649.9 813.1 655.1 816.3 655 819 649.5 820 647.5 821.4 645.5 822 645.1 824.4 643.6 816.5 637 812.4 637 811.6 637 809.3 638.8 807.2 640.9ZM147 647.1L147.3 655.6 150.5 655.6C154.1 655.6 155.8 653.1 156.9 646.8 157.7 642.1 155.9 640.2 150.5 639.4L146.8 638.7 147 647.1ZM193.1 662.3C188.1 666.6 188.3 669.4 193.8 674.8 197.9 678.9 198.1 679 200.3 677.5 202.6 676 205.6 670.7 205.6 668 205.6 666.5 198.8 659.3 197.4 659.3 197 659.3 195.2 660.6 193.1 662.3ZM833.1 660.9C832.1 661.9 831.5 663.7 831.5 665 831.5 666.7 830.8 667.5 829.5 667.9 826.6 668.6 828.8 671.8 833.8 674 836.1 675 838 676.3 838 676.8 838 677.3 838.7 677.8 839.6 677.8 842 677.8 843.5 674 843.5 667.7L843.5 662.2 839.8 660.7C835.1 658.9 834.9 658.9 833.1 660.9ZM807.9 665.4C804.9 671.9 805 673 808.1 674.3 813.9 676.8 815.6 678.6 815.6 681.9 815.5 684.7 815.3 685 813.7 684.2 811.6 683.1 809.6 684.3 808.7 687.3 808.4 688.4 807.5 690.1 806.8 690.9 805.6 692.2 805.6 692.9 806.7 695 807.6 696.9 809.3 698.1 813.6 699.5L819.3 701.6 820.4 697.3C820.9 695 821.8 692.4 822.1 691.7 822.7 690.7 821.9 689.2 819.8 686.8 818 684.8 816.7 682.3 816.7 681 816.7 677.8 820.3 670 822.6 668.4 823.1 668.1 823.1 666.8 822.8 665.4 822.3 663.5 821.2 662.8 817.4 661.6 814.8 660.8 812 660.2 811.4 660.2 810.7 660.2 809.2 662.5 807.9 665.4ZM168.2 662.8C166.2 665 164.7 672.1 165.8 674.3 166.3 675.2 166.9 675.9 167 675.9 167.2 675.9 169.5 676.3 172.1 676.9 178 678 180 677.1 181.4 673.1 183.4 667.2 182.9 665.9 177.2 663.4 171 660.6 170.2 660.6 168.2 662.8ZM784.4 664.3C781.8 668.3 781.9 672.3 784.5 674.7 787.6 677.6 792.9 680.1 793.3 678.9 793.5 678.3 794.9 676.4 796.4 674.4 797.9 672.5 799.1 669.9 799.1 668.4 799.1 666.2 798.3 665.6 794.1 663.5 787.5 660.5 786.7 660.5 784.4 664.3ZM147.9 669.6C148.3 675 148.9 677.6 150.1 678.8 151.6 680.3 151.8 680.3 154 678 156.7 675.1 158.3 671.3 158.3 668 158.3 665.6 155.8 664.1 149.8 662.6L147.4 662 147.9 669.6ZM194.5 683.9C192 685.7 189.8 690.6 189.8 694.4 189.8 697.5 191.2 698.5 197 699.8 201.9 700.9 204.2 699.4 205 694.4 205.4 692.2 206.2 690.5 207.1 690.1 208.4 689.5 208.4 689.4 206.9 688.2 205.9 687.6 204.4 687 203.5 687 202.5 687 200.7 686 199.4 684.7 196.7 681.9 197.2 682 194.5 683.9ZM833.7 686.5C829.8 690.4 829.6 693.5 833 696.2 834.4 697.3 836 698.1 836.7 698.1 837.3 698.1 838.2 698.8 838.7 699.6 839.2 700.5 840.4 700.9 841.3 700.7 842.8 700.5 843.1 699.4 843.3 693.3L843.6 686.3 840.6 684.8C839 684 837.5 683.3 837.2 683.3 837 683.3 835.5 684.7 833.7 686.5ZM169.9 685.7C169.2 686.6 168.5 687.8 168.5 688.5 168.5 689.3 167.5 690.9 166.2 692.2 165 693.4 164.2 695 164.4 695.6 164.9 697 174.5 702.8 176.3 702.8 178.7 702.8 180.8 700.2 182 695.6 183.8 688.5 183.6 688.2 174.4 685.3 171.9 684.5 171 684.6 169.9 685.7ZM764.1 686.7C761.7 688.3 759.3 692.6 759.3 695.2 759.3 696.2 760.3 697.7 761.6 698.5 765.8 701.3 766.1 704 763 711.8 758.9 721.9 759.1 722.8 765.3 724.5 771.8 726.5 773.3 726.1 774.3 722.6 774.6 721 775.6 719.2 776.4 718.5 779.1 716.3 778 714.3 773.1 712.2 767.7 709.9 767.3 708.2 771.2 703.4 777 695.9 777.1 691.2 771.4 687.3 767.7 684.8 766.9 684.7 764.1 686.7ZM786.4 686.3C785.7 687.4 783.8 692.2 782.8 695.4 782.2 696.9 790.3 702.8 792.8 702.8 794.4 702.8 797.2 699.9 797.2 698.4 797.2 697.9 798.2 696 799.4 694.2 802 690.4 801.9 690.1 795.3 687.1 790.6 684.9 787.5 684.7 786.4 686.3ZM148.5 690.9C148.8 693.6 149.1 697.2 149.1 698.8 149.1 701.5 149.4 701.9 151.6 701.9 153.2 701.9 155.2 700.6 157.7 698L161.4 694.1 157.1 690.1C154.3 687.4 152 686.1 150.4 686.1 148 686.1 147.9 686.2 148.5 690.9ZM811.8 708.1C810.8 709.1 810.2 710.4 810.2 711.1 810.2 711.8 809.4 713.7 808.2 715.5 805.7 719.4 806.7 720.6 813.6 722.9 819.2 724.6 821.6 724 822 720.5 822.2 719.4 823.3 717.9 824.5 717 827.3 715.2 826.7 713.3 822.3 711.1 820.4 710.2 818.3 708.7 817.7 708 816 706 813.6 706.1 811.8 708.1ZM835.4 707.7C834.7 708.4 834 710.3 833.7 711.9 833.3 713.5 832.6 714.8 831.9 714.8 827.6 714.8 830.6 719.6 836 721.4 837.9 721.9 840.1 723.1 840.9 723.8 843.4 726 844.8 722.3 844.1 715.4 843.5 710.5 843.1 709.5 840.9 708.5 836.7 706.4 836.5 706.4 835.4 707.7ZM169.6 711.9C166.2 715.5 165.4 715.9 162.7 715.5 160.9 715.2 157.6 713.7 155.1 712.1 152.6 710.6 150.2 709.3 149.8 709.3 149.4 709.3 149.1 712.8 149.1 717 149.1 725.4 150 727.2 153.8 726.7 155.8 726.4 156.4 725.7 158.5 720.8 160 717.4 162.8 716.8 164.7 719.4 165.6 720.4 167.9 721.8 169.9 722.4 174.5 723.9 175 726.2 171.9 731.7 167.6 739.2 167.9 743.9 172.9 748.5 175.3 750.7 175.5 750.8 177.8 749.4 186.6 743.8 187.5 739.3 181 733.1 178.7 731 176.9 728.8 176.9 728.4 176.9 728 178.1 726.1 179.6 724.4 183.7 719.7 183.4 715.6 178.8 711 176.9 709 174.8 707.5 174.4 707.5 174 707.6 171.9 709.5 169.6 711.9ZM192.5 712.6C189.3 718.4 189.4 719.7 194 722.2 198.5 724.7 198.8 726.1 195.5 731.1 191.9 736.6 191.3 738.7 192.5 741.9 193.3 744.2 200.9 750 203 750 203.3 750 204.3 748.7 205.1 747.2 205.9 745.6 206.3 744.4 205.9 744.4 205.6 744.4 206.3 743.1 207.3 741.3 209.8 737.3 209.7 736.5 206.9 735.7 203.4 734.8 199.9 731 200.6 729 200.9 728.1 202.9 724.4 204.8 721 206.9 717.5 208.2 714.2 208.1 713.5 207.4 711.9 199.4 707.4 197.1 707.4 196.1 707.4 194.4 709.4 192.5 712.6ZM787.7 709C787.5 709.4 786.8 711.4 786.1 713.4 785.5 715.5 784.5 717.6 784.2 718.1 782.1 720.6 786.3 724 793.2 725.5 796 726 796.2 725.9 798.9 720.3L801.7 714.5 799.5 712.4C796.8 709.6 788.7 707.3 787.7 709ZM811.8 731.9C810.1 733.5 808.3 739 808.3 742.3 808.3 745 811.6 747 816.9 747.8 821 748.3 821.3 748.2 822.3 745.7 822.9 744.3 823.9 741.8 824.5 740.2 825.9 736.9 825.1 734.8 821.5 733 817 730.7 813.3 730.3 811.8 731.9ZM836.8 731.6C834.6 732.9 832.4 738 832.4 741.7 832.4 744.8 833.7 745.6 840.6 746.8L844.6 747.4 844 741.1C842.9 730.8 841.4 728.9 836.8 731.6ZM787.9 734.8C787.3 736.3 786.5 738.4 786 739.5 785.6 740.7 784.8 741.7 784.3 741.7 783.7 741.7 783.7 742.5 784.4 743.9 785.6 746.5 791.1 749.1 795.3 749.1 797.6 749.1 798.1 748.5 799.2 745.6 799.7 743.7 800.6 741.6 801.1 741 801.7 740.4 801.9 738.9 801.5 737.6 800.9 735.3 798.1 733.8 792.4 732.8 789.3 732.2 788.9 732.4 787.9 734.8ZM149.2 735.4C149.2 737.4 149.3 737.4 150 735.6 150.5 734.5 150.6 736.4 150.3 740.6 149.8 746.9 149.9 747.3 152.2 749.5L154.6 751.8 156.9 749.7C158.2 748.6 159.9 745.7 160.6 743.4 162.2 737.9 161 735.8 155.2 734.4 149.5 733 149.1 733.1 149.2 735.4ZM763.6 735C762.8 735.8 761.8 738.4 761.2 740.6 760.5 744.1 760.6 744.8 762.1 746.4 763.1 747.3 764.6 748.1 765.6 748.1 766.5 748.1 768.1 748.8 769.3 749.6 772.6 751.9 775.5 749.5 776.9 743.1 778.3 736.9 777.8 735.6 773.4 734.4 768.3 732.9 765.3 733.1 763.6 735ZM197.4 755.1C195.7 756.5 194 759.4 193.1 762.1 191.1 767.8 191.6 768.4 199 770.8 204 772.5 204.1 772.5 205.7 770.4 206.7 769.3 207.4 767.7 207.4 766.9 207.4 766 208.3 764.4 209.4 763.2 211.9 760.7 211.2 759.8 206 758.1 204 757.3 201.9 755.8 201.3 754.7L200.3 752.7 197.4 755.1ZM172.8 755.7C171.9 756.9 171.3 758.2 171.3 758.8 171.3 759.4 170.5 761.4 169.4 763.3 167.4 766.9 167.5 769.4 169.7 769.4 170.4 769.4 172.5 770.3 174.5 771.3 179.5 773.9 181.2 773.6 183.3 770.1 186.3 765.3 185.7 762.9 180.6 758.1 178.1 755.6 175.6 753.7 175.1 753.7 174.6 753.7 173.5 754.6 172.8 755.7ZM835.6 758.8C833.9 761.7 832.4 764.5 832.4 765.2 832.4 767.3 838.4 770.5 842.8 770.6L846.8 770.8 846.5 764.4C846.1 757.6 845.6 756.6 841.5 754.8 839 753.8 838.8 754 835.6 758.8ZM811.1 757.4C810.6 758.3 809.9 761 809.6 763.1 808.9 768.6 811.2 770.7 817.8 770.8 822.8 770.8 822.8 770.8 825.6 764.5 826.8 761.7 826.9 760.8 825.8 759.6 822.4 755.5 813 754 811.1 757.4ZM150.1 757.3C149.4 757.8 148.7 760.6 148.4 764.4 148 770.1 148.1 771 149.8 772.6 152.9 775.3 155.8 773.9 159.6 767.9L162.9 762.7 158.1 759.6C152.9 756.3 152 756.1 150.1 757.3ZM766.9 758.5C765.2 760.5 761.1 767.8 761.1 769 761.1 770.1 767.6 772.2 770.8 772.2 773.2 772.2 775 771.4 777.5 769.1L780.9 766 778.3 762.9C775.6 759.5 771.5 756.5 769.8 756.5 769.3 756.5 768 757.4 766.9 758.5ZM789.1 757.6C788.6 758.2 787.9 760.2 787.5 761.9 787.1 763.8 786.2 765.2 785.2 765.5 782.6 766.1 784 768.3 787.8 769.4 789.7 770.1 792.1 771.6 793.2 773L795.2 775.3 798 772.5C800.7 769.8 803.3 763 802.5 760.6 802 759.5 794 756.5 791.4 756.5 790.6 756.5 789.6 757 789.1 757.6ZM220.1 779.4C218.4 781.3 216.7 786.2 216.7 789.2 216.7 790.3 218.1 791.5 221.1 792.7 223.5 793.7 226.1 795.2 226.9 795.9 228.1 797 228.7 796.5 231.4 791.3 233.1 788 234.3 784.6 234.1 783.7 233.6 781.4 229.7 778.9 225.5 778.2 222.4 777.8 221.4 778.1 220.1 779.4ZM790.9 781C789.3 782.8 787.9 785 787.9 785.9 787.5 791 789.4 794.4 793.9 796.8 797.8 798.9 799.4 798 801 792.8 801.7 790.9 802.8 788.9 803.5 788.3 805.7 786.8 804.2 784.4 799.6 782.4 797.4 781.5 795.2 780 794.7 779.2 794 777.9 793.4 778.1 790.9 781ZM838.2 778.9C837.7 779.5 836.9 781.1 836.6 782.4 836.2 783.7 835.3 785.5 834.4 786.4 833.1 787.9 833.2 788.2 836.1 791.2 839.8 795 841.9 795.8 844.4 794.5 848.1 792.5 849.1 790.6 849.1 786.1 849.1 782.4 848.7 781.5 846.8 780.2 843.4 778 839.4 777.4 838.2 778.9ZM196.9 780.7C196 781.9 195.4 783.2 195.4 783.7 195.4 784.2 194.4 785.6 193.4 786.8 191.7 788.5 191.6 789.1 192.7 790.4 193.8 791.8 203 796.3 204.6 796.3 205.4 796.3 211.1 785.6 211.1 784.3 211.1 783.2 201.9 778.7 200 778.7 199 778.7 197.6 779.6 196.9 780.7ZM815.6 779.6C814.7 780.2 812.8 782.4 811.2 784.7L808.4 788.8 812.1 792C816.1 795.7 819.5 796.3 823 793.9 824.2 793.1 825 791.5 825 790.1 825 788.5 825.6 787.6 826.9 787.3 829.4 786.7 828.9 785.5 824.9 782.3 821.2 779.4 817.8 778.3 815.6 779.6ZM173.3 780.7C172.9 781.4 171.6 783.7 170.6 785.9L168.7 789.8 171.5 792.6C176.4 797.6 181.9 797.4 185.1 792.2 188.9 786.1 187.1 782.3 179.6 780.6 174.4 779.4 174.4 779.4 173.3 780.7ZM764.8 783.3C764.2 785 763.5 788.1 763.5 790.1 763.4 793.7 763.6 794 766.8 794.9 768.6 795.4 770.7 796.4 771.6 797 775 799.9 778.4 795.9 779.4 787.8 779.8 783.6 779.7 783.3 777.2 782.4 775.7 781.8 772.6 781.1 770.3 780.8 766.2 780.4 766 780.5 764.8 783.3ZM149.1 785.5C144.8 789.4 144.8 792.3 149 795.1 150.7 796.3 153 797.2 154.1 797.2 156.9 797.2 161.4 794.3 162.9 791.3 164.2 789 164.1 788.7 161.1 785.6 156.9 781.4 153.5 781.4 149.1 785.5ZM840.2 800.7C839.6 801.1 838.2 803.3 837.2 805.7 834.7 811.5 832.7 811.5 826.8 806 821.7 801.3 818 800.6 814.7 803.8 813.2 805.3 813 806.6 813.1 810.5 813.4 814.7 813.8 815.5 816.7 817.4 821 820.3 824.1 819.8 825.4 816 825.9 814.4 827.1 812.3 828 811.4 829.5 809.9 829.7 809.9 832.1 811.9 835.4 814.4 844.1 818.5 846.4 818.5 847.4 818.5 848.1 818 848.1 817.3 848.1 816.7 849 814.6 850 812.7 852.3 808.4 852.4 805.6 850.3 805 848.4 804.4 845.8 803.1 843.1 801.3 842 800.6 840.7 800.4 840.2 800.7ZM196.9 806.2C195 809.2 193.5 811.9 193.5 812.3 193.5 815 203.1 820.2 206 819.1 206.8 818.8 208.5 816.2 209.8 813.4 212.3 808 211.9 805.6 208.4 805.6 207.5 805.6 205.5 804.5 203.7 803.2 201.9 801.9 200.5 800.9 200.4 800.9 200.3 800.9 198.6 803.3 196.9 806.2ZM221.5 803.4C220.7 804.8 218.5 813.8 218.5 815.3 218.5 815.6 220.2 816 222.2 816.3 224.4 816.7 225.9 817.4 225.9 818.1 225.9 819.8 229.2 819.8 230.8 818.1 231.6 817.4 232.9 814.6 233.7 811.9 235.6 806.2 235.2 805.6 228.3 803.3 222.6 801.5 222.5 801.5 221.5 803.4ZM792.4 803.4C790.3 805.8 786.8 814.5 787.4 815.6 788.2 816.9 796.1 820.4 798.2 820.4 800.6 820.4 803 816.5 803.4 811.8 804 807.3 803 805.9 798.7 805.2 797.3 804.9 795.6 804.1 795 803.2 794 801.9 793.8 801.9 792.4 803.4ZM172.4 808.3C170.7 811.4 169.4 814.1 169.4 814.4 169.4 814.6 170.8 815.4 172.5 816 174.1 816.8 176.3 818.2 177.2 819.4 179 821.3 179 821.4 176.1 826.9 172.2 834.1 172.2 838.1 175.9 841.8 180 845.8 183.1 845.2 185.8 839.8 188.7 833.9 188.5 831.8 185 829.6 178.8 826 178.6 825.5 181.9 821.6 184.3 818.7 188.1 809.4 187.5 808.3 186.9 807.4 177.4 802.8 176.2 802.8 175.7 802.8 174 805.3 172.4 808.3ZM149.6 805.7C148 808.4 146 815.5 146.8 816.7 147 817 148.8 818 150.7 818.6 152.6 819.2 154.8 820.3 155.6 821 158.8 823.7 162.5 819.4 163.5 811.8 164.1 807.8 164.1 807.7 160.6 806.3 153.4 803.5 151.2 803.3 149.6 805.7ZM766.2 807.8C765.5 809.5 764.4 811.2 763.9 811.6 763.4 811.9 763 813.1 763 814.4 763 816.3 763.8 817.1 767.3 818.6 769.7 819.6 772 821 772.5 821.6 773.4 823.1 780.6 815 780.6 812.4 780.6 810.2 778.7 808.3 774.4 806.1 769.7 803.8 767.7 804.2 766.2 807.8ZM223.7 824.5C223 825.3 222.1 827.1 221.8 828.7 221.4 830.2 220.3 832.1 219.2 832.9 215.1 835.7 220.9 841.3 228.9 841.9 231.8 842.1 231.9 841.9 234 836.4 235.8 831.2 235.9 830.5 234.6 829.2 233.8 828.4 232.4 827.8 231.4 827.8 230.4 827.8 228.5 826.8 227.3 825.6 225.3 823.5 224.8 823.4 223.7 824.5ZM840 826.9C838.9 828 838 829.5 838 830.6 838 831.5 837.3 832.7 836.5 833.1 835.4 833.8 835.1 834.7 835.6 836.4 836 838.2 837 839.1 840.1 839.9 842.2 840.6 844.5 841.5 845.3 842 846.7 843.1 846.9 842.8 851.4 835.8 852.7 833.9 853.7 831.9 853.7 831.5 853.7 830.4 845.4 825 843.5 825 842.7 825 841.1 825.8 840 826.9ZM198.2 828.3C195.9 831.3 194.8 836.8 196 838.8 197.1 840.6 205 843.6 206.9 843 207.6 842.7 209 840.4 210 837.9 211.1 835.4 212.4 833.3 213 833.3 214.8 833.3 212.9 831.5 208.1 828.7 202.1 825.3 200.6 825.3 198.2 828.3ZM814.4 830.7C811.4 837.2 811.5 838.3 815.2 840.6 818.3 842.6 820.9 843.1 823.6 842 825.1 841.5 830.6 834.1 830.6 832.7 830.5 831.2 821.6 825.9 819.1 825.9 816.9 825.9 816.2 826.7 814.4 830.7ZM768.7 830.4C766.6 832.4 764.8 834.6 764.8 835.4 764.8 838.6 771.9 846.3 774.9 846.3 776.6 846.3 781.5 838.8 781.5 836.3 781.5 834.2 775.2 826.9 773.2 826.9 772.9 826.9 770.8 828.4 768.7 830.4ZM793.9 827.6C791.8 828.9 788.9 834.8 788.9 837.7 788.9 840.4 789.3 840.7 792.6 841.7 794.5 842.2 796.7 843.3 797.1 844.3 798 845.7 798.1 845.7 799.9 844 801.6 842.3 806.8 833.1 806.2 832.8 797.8 826.7 796.2 826 793.9 827.6ZM150.7 829.4C149.1 831.2 146.9 839.4 147.7 840.7 148 841.2 149.7 842 151.7 842.7 153.5 843.2 155.8 844.4 156.8 845.2 158.1 846.5 158.5 846.4 160.2 844.9 162.5 842.9 165.1 836.1 164.6 833.2 164.4 830.7 161.6 829.2 156 828.2 153.1 827.8 151.9 828.1 150.7 829.4ZM840.5 849.5C839.6 850.3 838.2 853.2 837.4 856.1 835.6 861.5 836.2 863.3 839.9 864.1 841.9 864.4 853.1 854 852.4 852.3 852.1 851.6 850.3 850.6 848.1 850 846 849.4 843.8 848.8 843.1 848.5 842.4 848.2 841.2 848.7 840.5 849.5ZM198.4 854.5C196.8 857.6 195.4 860.5 195.4 860.9 195.4 861.5 197.7 863.1 200.6 864.8 205 867.3 206.2 867.6 208 866.8 210.2 865.8 210.6 864.9 210.3 861.8 210.1 860.8 211 859.8 212.4 859.3 215.4 858.1 215.4 857.3 212.8 854.9 210.9 853.3 203 849.1 201.8 849.1 201.6 849.1 200 851.6 198.4 854.5ZM223.3 850.2C222.7 850.8 222.2 852.2 222.2 853.3 222.2 855.5 220.5 857.9 218.3 858.5 216.6 859.2 218.4 861.1 222.3 862.7 224.4 863.4 226.6 864.9 227.2 865.9 229.1 868.6 231.4 866.9 234.5 860.7 237.7 854.4 237.1 852.7 230.8 850.6 225.6 848.8 224.8 848.7 223.3 850.2ZM793 852.3C792.3 854.1 791.7 855.9 791.7 856.4 791.7 856.9 790.8 857.9 789.7 858.7 788.3 859.6 788 860.6 788.4 861.9 789.1 864.2 795.8 867.6 799.7 867.6 802.4 867.6 802.7 867.2 804.5 861.9 806.8 855.4 806.4 854.5 801 853 799.1 852.3 797.1 851.2 796.9 850.5 796 848.1 794.4 848.9 793 852.3ZM816.3 851.1C814.4 852.7 813.7 854.4 813.2 858.1L812.7 863 816.3 864.4C818.3 865.2 820.8 866.3 821.9 866.9 824.8 868.2 826.3 866.8 828.7 860.4 830.9 854.5 830.7 853.4 827.1 851.6 821.9 848.9 819 848.8 816.3 851.1ZM770.6 852C768 855.1 765.7 859.7 765.7 862.5 765.7 864.4 766.5 865.2 769.3 866.4 771.1 867.2 774.1 867.9 775.8 868 778.7 868.1 779.1 867.8 779.8 864.8 780.3 863.1 781.5 860.8 782.5 860 784.9 858 784.2 856.8 779.1 854.5 776.8 853.6 774.7 852.2 774.4 851.4 773.7 849.5 772.9 849.6 770.6 852ZM174.6 853C173.8 854.2 172.9 857 172.6 859.4L172 863.4 177.7 866C182.1 868.1 183.7 868.4 185.2 867.6 187.1 866.6 190.2 857.7 189.4 855.5 188.5 853.3 185.4 851.8 180.6 851.2 176.6 850.7 175.9 850.9 174.6 853ZM150.7 854.3C149.6 856.6 149.9 857 155.4 862.1 158.5 865.2 161.5 867.6 161.9 867.6 163.1 867.6 166 860.6 166 857.8 166 855.1 164.9 854.2 160.2 852.8 154.5 851.2 151.9 851.6 150.7 854.3ZM225.2 872.4C224.5 873.1 224.1 874.3 224.1 875.1 224.1 876 223.1 878 221.8 879.4 220.4 881.1 219.6 882.9 220 883.7 220.9 886 230.5 890.3 232.3 889.2 234.3 888 236.1 884.2 236.8 880 237.3 876.4 236.3 875 232.7 875 231.5 875 230.1 874.2 229.4 873.1 228.1 871 226.8 870.8 225.2 872.4ZM176.1 875.2C173.8 877.5 175.1 880.1 181 885 186.7 889.6 186.9 889.7 187.5 887.8 187.9 886.6 189.1 884.7 190.1 883.5L191.9 881.5 189.7 879.1C185.8 874.8 178.6 872.7 176.1 875.2ZM200.1 876.4C198.6 877.7 197 879.5 196.8 880.6 196 882.9 198.6 886.8 201.9 888.5 205 890.1 207.2 889.3 212.9 884.5 215.6 882.2 215.8 881.6 215 879.9 213.5 877.3 208.2 874.1 205.3 874.1 204 874.1 201.7 875.1 200.1 876.4ZM770.2 876.1C768.1 877.7 766.7 881.7 766.7 885.6 766.7 888.5 767 888.9 770.2 889.7 772 890.3 774.5 891.3 775.6 892.1 777.4 893.3 777.8 893.3 780 891.1 784.3 886.8 784.4 879 780.2 877 776.2 875.3 771.9 874.8 770.2 876.1ZM792.2 879.3C791.3 881.8 790.6 884.5 790.5 885.6 790.2 887.9 794.4 890.7 798.8 891.4 801.9 891.8 802.8 891.6 804.4 889.4 805.4 888.1 806.5 885.4 806.9 883.2 807.7 877.9 805.6 875.7 798.8 875.2L793.8 874.8 792.2 879.3ZM745.4 879.3C744.7 880.7 743.7 883.1 743 884.5 741.3 887.9 741.7 888.4 747.2 891.2 749.7 892.5 752 894 752.4 894.5 753.3 896.1 759.3 886.3 759.3 883.1 759.3 879.9 756.1 877.7 750.5 877 746.7 876.7 746.3 876.8 745.4 879.3ZM225.6 897.7C224.8 898.4 223.9 900.4 223.6 902 223.2 903.7 222.5 905.6 221.9 906.3 220.8 907.7 220.6 907.4 226.6 911.1 232 914.4 234.1 914.3 236.3 910.5 238.1 907.3 239.1 901.8 238.1 900.4 236.2 897.4 227.7 895.6 225.6 897.7ZM747.9 900.4C746.2 902.1 743.2 910 743.8 911.4 744.1 912 746.7 913.7 749.5 915.3L754.8 918.1 757 915.5C761.8 910 761.1 904.9 755.3 901.4 750.6 898.7 749.7 898.6 747.9 900.4ZM769.4 901.9C768.2 904.1 767.6 906.3 767.8 908.7 768.1 912 768.3 912.3 772.6 914L777.2 915.6 780.3 913.3C783.4 910.9 784.6 908.2 784.1 904.5 783.8 902 780.3 900 774.9 899.4 771.7 898.9 771.2 899.1 769.4 901.9Z", + "width": 1000 + }, + "search": [ + "roboticon" + ] } ] } \ No newline at end of file diff --git a/assets/app_icons/fonts/DQIcons.ttf b/assets/app_icons/fonts/DQIcons.ttf index 3cff7aa3..bc92c83d 100644 Binary files a/assets/app_icons/fonts/DQIcons.ttf and b/assets/app_icons/fonts/DQIcons.ttf differ diff --git a/assets/images/gif/robot-idle.gif b/assets/images/gif/robot-idle.gif new file mode 100644 index 00000000..89dee325 Binary files /dev/null and b/assets/images/gif/robot-idle.gif differ diff --git a/assets/images/gif/robot-speaking.gif b/assets/images/gif/robot-speaking.gif new file mode 100644 index 00000000..253d786b Binary files /dev/null and b/assets/images/gif/robot-speaking.gif differ diff --git a/assets/images/logo_HMG.png b/assets/images/logo_HMG.png new file mode 100644 index 00000000..0d9e4a56 Binary files /dev/null and b/assets/images/logo_HMG.png differ diff --git a/assets/images/pharmacy/Redheart.svg b/assets/images/pharmacy/Redheart.svg new file mode 100644 index 00000000..3bba67fa --- /dev/null +++ b/assets/images/pharmacy/Redheart.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/pharmacy/heart-empty.svg b/assets/images/pharmacy/heart-empty.svg new file mode 100644 index 00000000..a682a44e --- /dev/null +++ b/assets/images/pharmacy/heart-empty.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/pharmacy/sort.png b/assets/images/pharmacy/sort.png new file mode 100644 index 00000000..0143d915 Binary files /dev/null and b/assets/images/pharmacy/sort.png differ diff --git a/assets/images/roboticon.png b/assets/images/roboticon.png new file mode 100644 index 00000000..5b04e287 Binary files /dev/null and b/assets/images/roboticon.png differ diff --git a/assets/images/soundWaveAnimation.gif b/assets/images/soundWaveAnimation.gif new file mode 100644 index 00000000..730e27eb Binary files /dev/null and b/assets/images/soundWaveAnimation.gif differ diff --git a/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/bug_report.md b/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..614a6708 --- /dev/null +++ b/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,21 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +## 🐛 Bug Report + + + +### Expected behavior + +### Reproduction steps + +### Configuration + +**Version:** 0.1.x + +**Platform:** +- [ ] :iphone: iOS +- [ ] :robot: Android diff --git a/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/feature_request.md b/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..35a881a3 --- /dev/null +++ b/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## 🚀 Feature Requests + + + +### Contextualize the feature + + +### Describe the feature + + +### Platforms affected (mark all that apply) +- [ ] :iphone: iOS +- [ ] :robot: Android diff --git a/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/questions-and-help.md b/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/questions-and-help.md new file mode 100644 index 00000000..ba501f3c --- /dev/null +++ b/flutter_tts-voice_enhancement/.github/ISSUE_TEMPLATE/questions-and-help.md @@ -0,0 +1,9 @@ +--- +name: Questions and Help +about: If you have questions, please use this for support + +--- + +## 💬 Questions and Help + +Provide question related to this flutter plugin. diff --git a/flutter_tts-voice_enhancement/.github/workflows/main.yml b/flutter_tts-voice_enhancement/.github/workflows/main.yml new file mode 100644 index 00000000..832dd069 --- /dev/null +++ b/flutter_tts-voice_enhancement/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: github pages + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + + - name: Setup Flutter + run: | + git clone https://github.com/flutter/flutter.git --depth 1 -b beta _flutter + echo "::add-path::${GITHUB_WORKSPACE}/_flutter/bin" + + - name: Install + run: | + cd example + flutter config --enable-web + flutter pub get + + - name: Build + run: | + cd example + flutter build web + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./example/build/web diff --git a/flutter_tts-voice_enhancement/.gitignore b/flutter_tts-voice_enhancement/.gitignore new file mode 100644 index 00000000..bc0883df --- /dev/null +++ b/flutter_tts-voice_enhancement/.gitignore @@ -0,0 +1,94 @@ +# Miscellaneous +*.class +*.lock +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.project +.svn/ +bin/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# Android Studio related +android/.classpath +android/.settings/ + +# Visual Studio Code related +.vscode/ + +# Flutter repo-specific +/bin/cache/ +/bin/mingit/ +/dev/benchmarks/mega_gallery/ +/dev/bots/.recipe_deps +/dev/bots/android_tools/ +/dev/docs/doc/ +/dev/docs/lib/ +/dev/docs/pubspec.yaml +/packages/flutter/coverage/ +version + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.packages +.pub-cache/ +.pub/ +build/ +flutter_*.png +linked_*.ds +unlinked.ds +unlinked_spec.ds + +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +example/ios/Flutter/flutter_export_environment.sh diff --git a/flutter_tts-voice_enhancement/CHANGELOG.md b/flutter_tts-voice_enhancement/CHANGELOG.md new file mode 100644 index 00000000..bff8b759 --- /dev/null +++ b/flutter_tts-voice_enhancement/CHANGELOG.md @@ -0,0 +1,197 @@ +# ChangeLog + +## 1.3.0 + +- All: Adding await speak completion + +## 1.2.7 + +- iOS: Adding utterance settings to synthesizeToFile +- Android: Fix crash when utterance completes after Engine is detached + +## 1.2.6 + +- Android: Fixing new API onAttachedToEngine call + +## 1.2.5 + +- macOS: Adding support + +## 1.2.4 + +- iOS: Deactivate audio session only when needed +- Android: Better exception handling for getLanguages +- Android: Adding getEngines +- Android: Adding new Android plugin APIs + +## 1.2.3 + +- iOS: Adding synthesize to file +- iOS: Fix set category ios + +## 1.2.2 + +- Web: Adding pause and continue + +## 1.2.1 + +- iOS: Fix setting iOS Category +- iOS/Android: Adding additional platform calls + +## 1.2.0 + +- iOS: Adding Set Audio Session Category +- Android: Bug fixes + +## 1.1.0 + +- iOS: Adding Pause +- iOS: Adding set Shared Instance + +## 1.0.0 + +- iOS/Android: Feature - Speech marks +- iOS/Android: Breaking changes to Speech rate + +## 0.9.2 + +- iOS: Changing audio session to playAndRecord + +## 0.9.1 + +- Android: Fixing method call error + +## 0.9.0 + +- Android: Adding synthesize to file + +## 0.8.7 + +- Android: Fix sporadic ANR on initialization + +## 0.8.6 + +- iOS: Reducing volume of other sessions while TTS is playing + +## 0.8.5 + +- Android: Fix Android async platform initialization +- Android: Removing initHandler + +## 0.8.2 + +- Web: Adding isLanguageAvailable method +- All: Fixing isLanguageAvailable platform channel and making it case insensitive + +## 0.8.0 + +- Web: Adding Web Support + +## 0.7.0 + +- iOS: Adding Swift version 4.2 to podspec and correct audio playback category + +## 0.6.0 + +- Android: AndroidX support + +## 0.5.2 + +- Android: Bug Fix on isLanguageAvailable + +## 0.5.1 + +- Applying flutter format to fix health suggestion + +## 0.5.0 + +- Android: Adding silence before speak +- Android: Removing deprecated API + +## 0.2.6 + +- IOS: Add voice selection implementation + +## 0.2.5 + +- Android: Ensure invokeMethod runs on main thread + +## 0.2.4 + +- Android: setting minSDK back to 21 and adding instructions to readme +- Android: Adding fallback for getLanguages and defaultLanguage + +## 0.2.3 + +- IOS: Audio continues with the Ring/Silent switch set to silent + +## 0.2.2 + +- Android: Fixing Locale bug + +## 0.2.1 + +- IOS: Fixing getLanguages bug + +## 0.2.0 + +- Android: Adding exception catch for samsung devices +- Android: Using default com.google.android.tts engine +- Android: Get and Set Voice +- Android: InitHandler +- Cleaning up the example + +## 0.1.2 + +- Support for Android background execution +- Updating Android build gradle version to 3.2.1 + +## 0.1.1 + +- Fixing TTS bound error in the example +- Fixing default voice language not found error on Android + +## 0.1.0 + +- Updating version for improved maintenance score +- Updating package description for improved maintenance score + +## 0.0.8 + +- Adding analysis_options.yaml for improved health score +- Fixing info/errors from flutter analyze + +## 0.0.7 + +- Updating SDK version in pubspec.yaml +- Adding package link to README +- Fixing language string warning received from xcode + +## 0.0.6 + +- Android: Upgrading Gradle 4.1 to 4.4 +- Android: Setting minSdk version to 21 +- Android: Adding try/catch to getAvailableLanguages & getDefaultVoice methods (Issues with API 21 & 22) + +## 0.0.5 + +- Adding IOS/Android isLanguageAvailable +- Rename setRate to setSpeechRate + +## 0.0.4 + +- Simplify podspec for Cocoapods 1.5.0 + +## 0.0.3 + +- Adding IOS/Android speech pitch and volume + +## 0.0.2 + +- Flutter formatting and fixing pubspec sdk versioning + +## 0.0.1 + +- first POC : + - methods : speak, stop, setRate, setLangauge, getLanguages + - a globalHandler for completion diff --git a/flutter_tts-voice_enhancement/CODE_OF_CONDUCT.md b/flutter_tts-voice_enhancement/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..43989576 --- /dev/null +++ b/flutter_tts-voice_enhancement/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at eyedea32@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/flutter_tts-voice_enhancement/LICENSE b/flutter_tts-voice_enhancement/LICENSE new file mode 100644 index 00000000..56dcdf22 --- /dev/null +++ b/flutter_tts-voice_enhancement/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Daniel Lutton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/flutter_tts-voice_enhancement/README.md b/flutter_tts-voice_enhancement/README.md new file mode 100644 index 00000000..4e32d45d --- /dev/null +++ b/flutter_tts-voice_enhancement/README.md @@ -0,0 +1,194 @@ +# Text To Speech + +[![pub package](https://img.shields.io/pub/v/flutter_tts.svg?style=for-the-badge&colorB=green)](https://pub.dartlang.org/packages/flutter_tts) + +A flutter text to speech plugin (Swift,Java) + +## Features + +- [x] Android, iOS, Web, & macOS + - [x] speak + - [x] stop + - [x] get languages + - [x] set language + - [x] set speech rate + - [x] set speech volume + - [x] set speech pitch + - [x] is language available +- [x] Android, iOS + - [x] get voices + - [x] set voice + - [x] speech marks (requires iOS 7+ and Android 26+) + - [x] synthesize to file (requires iOS 13+) +- [x] iOS, Web + - [x] pause +- [x] Android + - [x] set Silence +- [x] iOS + - [x] set shared instance + - [x] set audio session category + +## Usage + +## macOS + +```bash +OSX version: 10.15 +``` + +[Example App](https://github.com/dlutton/flutter_tts/tree/macOS_app) from the macOS_app branch + +## Web + +[Website](https://dlutton.github.io/flutter_tts) from the example directory. + +## Android + +Change the minimum Android sdk version to 21 (or higher) in your `android/app/build.gradle` file. + +```java +minSdkVersion 21 +``` + +## iOS + +There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. [Flutter#16049](https://github.com/flutter/flutter/issues/16049) + +[Example](https://github.com/dlutton/flutter_tts/blob/master/example/lib/main.dart) + +To use this plugin : + +- add the dependency to your [pubspec.yaml](https://github.com/dlutton/flutter_tts/blob/master/example/pubspec.yaml) file. + +```yaml + dependencies: + flutter: + sdk: flutter + flutter_tts: +``` + +- instantiate FlutterTts + +```dart +FlutterTts flutterTts = FlutterTts(); + +``` + +To set shared audio [instance](https://developer.apple.com/documentation/avfoundation/avaudiosession/1616504-sharedinstance) (iOS only): + +```dart +await flutterTts.setSharedInstance(true); +``` + +To set audio [category and options](https://developer.apple.com/documentation/avfoundation/avaudiosession) (iOS only): + +```dart +await flutterTts + .setIosAudioCategory(IosTextToSpeechAudioCategory.playAndRecord, [ + IosTextToSpeechAudioCategoryOptions.allowBluetooth, + IosTextToSpeechAudioCategoryOptions.allowBluetoothA2DP, + IosTextToSpeechAudioCategoryOptions.mixWithOthers + ]); +``` + +To await speak completion. + +```dart +await flutterTts.awaitSpeakCompletion(true); +``` + +### speak, stop, getLanguages, setLanguage, setSpeechRate, setVoice, setVolume, setPitch, isLanguageAvailable, setSharedInstance + +```dart +Future _speak() async{ + var result = await flutterTts.speak("Hello World"); + if (result == 1) setState(() => ttsState = TtsState.playing); +} + +Future _stop() async{ + var result = await flutterTts.stop(); + if (result == 1) setState(() => ttsState = TtsState.stopped); +} + +List languages = await flutterTts.getLanguages; + +await flutterTts.setLanguage("en-US"); + +await flutterTts.setSpeechRate(1.0); + +await flutterTts.setVolume(1.0); + +await flutterTts.setPitch(1.0); + +await flutterTts.isLanguageAvailable("en-US"); + +// iOS and Web only +await flutterTts.pause(); + +// iOS, macOS, and Android only +await flutterTts.synthesizeToFile("Hello World", Platform.isAndroid ? "tts.wav" : "tts.caf"); + +await flutterTts.setVoice({"name": "Karen", "locale": "en-AU"}); + +// iOS only +await flutterTts.setSharedInstance(true); + +// Android only +await flutterTts.setSilence(2); + +await flutterTts.getEngines(); +``` + +### Listening for platform calls + +```dart +flutterTts.setStartHandler(() { + setState(() { + ttsState = TtsState.playing; + }); +}); + +flutterTts.setCompletionHandler(() { + setState(() { + ttsState = TtsState.stopped; + }); +}); + +flutterTts.setProgressHandler((String text, int startOffset, int endOffset, String word) { + setState(() { + _currentWord = word; + }); +}); + +flutterTts.setErrorHandler((msg) { + setState(() { + ttsState = TtsState.stopped; + }); +}); + +flutterTts.setCancelHandler((msg) { + setState(() { + ttsState = TtsState.stopped; + }); +}); + +// iOS and Web +flutterTts.setPauseHandler((msg) { + setState(() { + ttsState = TtsState.paused; + }); +}); + +flutterTts.setContinueHandler((msg) { + setState(() { + ttsState = TtsState.continued; + }); +}); +``` + +## Getting Started + +For help getting started with Flutter, view our online +[documentation](https://flutter.dev/). + +For help on editing plugin code, view the [documentation](https://flutter.dev/platform-plugins/#edit-code). diff --git a/flutter_tts-voice_enhancement/analysis_options.yaml b/flutter_tts-voice_enhancement/analysis_options.yaml new file mode 100644 index 00000000..e8779c50 --- /dev/null +++ b/flutter_tts-voice_enhancement/analysis_options.yaml @@ -0,0 +1,35 @@ +analyzer: + strong-mode: + implicit-casts: false + errors: + unused_import: error + unused_local_variable: error + dead_code: error +linter: + rules: + - avoid_empty_else + - comment_references + - control_flow_in_finally + - empty_statements + - hash_and_equals + - only_throw_errors + - test_types_in_equals + - throw_in_finally + - unrelated_type_equality_checks + - valid_regexps + - avoid_init_to_null + - avoid_return_types_on_setters + - await_only_futures + - camel_case_types + - directives_ordering + - empty_catches + - empty_constructor_bodies + - library_names + - library_prefixes + - non_constant_identifier_names + - omit_local_variable_types + - prefer_final_fields + - prefer_is_not_empty + - prefer_typing_uninitialized_variables + - slash_for_doc_comments + - type_init_formals \ No newline at end of file diff --git a/flutter_tts-voice_enhancement/android/.gitignore b/flutter_tts-voice_enhancement/android/.gitignore new file mode 100644 index 00000000..c6cbe562 --- /dev/null +++ b/flutter_tts-voice_enhancement/android/.gitignore @@ -0,0 +1,8 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/flutter_tts-voice_enhancement/android/build.gradle b/flutter_tts-voice_enhancement/android/build.gradle new file mode 100644 index 00000000..1308c920 --- /dev/null +++ b/flutter_tts-voice_enhancement/android/build.gradle @@ -0,0 +1,48 @@ +def PLUGIN = "flutter_tts"; +def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning"; +gradle.buildFinished { buildResult -> + if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) { + println ' *********************************************************' + println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.' + println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.' + println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.' + println ' *********************************************************' + rootProject.ext.set(ANDROIDX_WARNING, true); + } +} + +group 'com.tundralabs.fluttertts' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.4.2' + } +} + +rootProject.allprojects { + repositories { + google() + jcenter() + } +} + +apply plugin: 'com.android.library' + +android { + compileSdkVersion 28 + + defaultConfig { + minSdkVersion 21 + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + targetSdkVersion 27 + } + lintOptions { + disable 'InvalidPackage' + } +} diff --git a/flutter_tts-voice_enhancement/android/gradle.properties b/flutter_tts-voice_enhancement/android/gradle.properties new file mode 100644 index 00000000..a6738207 --- /dev/null +++ b/flutter_tts-voice_enhancement/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +android.enableR8=true diff --git a/flutter_tts-voice_enhancement/android/gradle/wrapper/gradle-wrapper.properties b/flutter_tts-voice_enhancement/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..8d9c8a3f --- /dev/null +++ b/flutter_tts-voice_enhancement/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Sep 27 12:18:40 PDT 2019 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/flutter_tts-voice_enhancement/android/settings.gradle b/flutter_tts-voice_enhancement/android/settings.gradle new file mode 100644 index 00000000..26aeb433 --- /dev/null +++ b/flutter_tts-voice_enhancement/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'flutter_tts' diff --git a/flutter_tts-voice_enhancement/android/src/main/AndroidManifest.xml b/flutter_tts-voice_enhancement/android/src/main/AndroidManifest.xml new file mode 100644 index 00000000..9cad3a1b --- /dev/null +++ b/flutter_tts-voice_enhancement/android/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + diff --git a/flutter_tts-voice_enhancement/android/src/main/java/com/tundralabs/fluttertts/FlutterTtsPlugin.java b/flutter_tts-voice_enhancement/android/src/main/java/com/tundralabs/fluttertts/FlutterTtsPlugin.java new file mode 100644 index 00000000..92e6a092 --- /dev/null +++ b/flutter_tts-voice_enhancement/android/src/main/java/com/tundralabs/fluttertts/FlutterTtsPlugin.java @@ -0,0 +1,454 @@ +package com.tundralabs.fluttertts; + +import android.content.Context; +import android.os.Build; +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.speech.tts.TextToSpeech; +import android.speech.tts.UtteranceProgressListener; +import android.speech.tts.Voice; +import android.util.Log; +import androidx.annotation.NonNull; +import io.flutter.embedding.engine.plugins.FlutterPlugin; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.MethodChannel.MethodCallHandler; +import io.flutter.plugin.common.MethodChannel.Result; +import io.flutter.plugin.common.PluginRegistry.Registrar; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.UUID; + +/** FlutterTtsPlugin */ +public class FlutterTtsPlugin implements MethodCallHandler, FlutterPlugin { + private Handler handler; + private MethodChannel methodChannel; + private MethodChannel.Result speakResult; + private boolean awaitSpeakCompletion = false; + private boolean speaking = false; + private Context context; + private TextToSpeech tts; + private final String tag = "TTS"; + private final String googleTtsEngine = "com.google.android.tts"; + private boolean isTtsInitialized = false; + private ArrayList pendingMethodCalls = new ArrayList<>(); + private final HashMap utterances = new HashMap<>(); + Bundle bundle; + private int silencems; + private static final String SILENCE_PREFIX = "SIL_"; + private static final String SYNTHESIZE_TO_FILE_PREFIX = "STF_"; + + /** Plugin registration. */ + public static void registerWith(Registrar registrar) { + FlutterTtsPlugin instance = new FlutterTtsPlugin(); + instance.initInstance(registrar.messenger(), registrar.activeContext()); + } + + private void initInstance(BinaryMessenger messenger, Context context) { + this.context = context; + methodChannel = new MethodChannel(messenger, "flutter_tts"); + methodChannel.setMethodCallHandler(this); + handler = new Handler(Looper.getMainLooper()); + bundle = new Bundle(); + tts = new TextToSpeech(context, onInitListener, googleTtsEngine); + } + + /** Android Plugin APIs */ + @Override + public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) { + initInstance(binding.getBinaryMessenger(), binding.getApplicationContext()); + } + + @Override + public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { + stop(); + tts.shutdown(); + context = null; + methodChannel.setMethodCallHandler(null); + methodChannel = null; + } + + private UtteranceProgressListener utteranceProgressListener = + new UtteranceProgressListener() { + @Override + public void onStart(String utteranceId) { + if (utteranceId != null && utteranceId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) { + invokeMethod("synth.onStart", true); + } else { + Log.d(tag, "Utterance ID has started: " + utteranceId); + invokeMethod("speak.onStart", true); + } + if (Build.VERSION.SDK_INT < 26) { + this.onProgress(utteranceId, 0, utterances.get(utteranceId).length()); + } + } + + @Override + public void onDone(String utteranceId) { + if (utteranceId != null && utteranceId.startsWith(SILENCE_PREFIX)) return; + if (utteranceId != null && utteranceId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) { + invokeMethod("synth.onComplete", true); + } else { + Log.d(tag, "Utterance ID has completed: " + utteranceId); + if (awaitSpeakCompletion) { + speakCompletion(1); + } + invokeMethod("speak.onComplete", true); + } + utterances.remove(utteranceId); + } + + @Override + public void onStop(String utteranceId, boolean interrupted) { + Log.d( + tag, + "Utterance ID has been stopped: " + utteranceId + ". Interrupted: " + interrupted); + if (awaitSpeakCompletion) { + speaking = false; + } + invokeMethod("speak.onCancel", true); + } + + private void onProgress(String utteranceId, int startAt, int endAt) { + if (utteranceId != null && !utteranceId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) { + final String text = utterances.get(utteranceId); + final HashMap data = new HashMap<>(); + data.put("text", text); + data.put("start", Integer.toString(startAt)); + data.put("end", Integer.toString(endAt)); + data.put("word", text.substring(startAt, endAt)); + invokeMethod("speak.onProgress", data); + } + } + + // Requires Android 26 or later + @Override + public void onRangeStart(String utteranceId, int startAt, int endAt, int frame) { + if (utteranceId != null && !utteranceId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) { + super.onRangeStart(utteranceId, startAt, endAt, frame); + this.onProgress(utteranceId, startAt, endAt); + } + } + + @Override + @Deprecated + public void onError(String utteranceId) { + if (utteranceId != null && utteranceId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) { + invokeMethod("synth.onError", "Error from TextToSpeech (synth)"); + } else { + if (awaitSpeakCompletion) { + speaking = false; + } + invokeMethod("speak.onError", "Error from TextToSpeech (speak)"); + } + } + + @Override + public void onError(String utteranceId, int errorCode) { + if (utteranceId != null && utteranceId.startsWith(SYNTHESIZE_TO_FILE_PREFIX)) { + invokeMethod("synth.onError", "Error from TextToSpeech (synth) - " + errorCode); + } else { + if (awaitSpeakCompletion) { + speaking = false; + } + invokeMethod("speak.onError", "Error from TextToSpeech (speak) - " + errorCode); + } + } + }; + + void speakCompletion(final int success) { + speaking = false; + handler.post( + new Runnable() { + @Override + public void run() { + speakResult.success(success); + } + }); + } + + private TextToSpeech.OnInitListener onInitListener = + new TextToSpeech.OnInitListener() { + @Override + public void onInit(int status) { + if (status == TextToSpeech.SUCCESS) { + tts.setOnUtteranceProgressListener(utteranceProgressListener); + + try { + Locale locale = tts.getDefaultVoice().getLocale(); + if (isLanguageAvailable(locale)) { + tts.setLanguage(locale); + } + } catch (NullPointerException | IllegalArgumentException e) { + Log.e(tag, "getDefaultLocale: " + e.getMessage()); + } + + // Handle pending method calls (sent while TTS was initializing) + isTtsInitialized = true; + for (Runnable call : pendingMethodCalls) { + call.run(); + } + } else { + Log.e(tag, "Failed to initialize TextToSpeech"); + } + } + }; + + @Override + public void onMethodCall(@NonNull final MethodCall call, @NonNull final Result result) { + // If TTS is still loading + if (!isTtsInitialized) { + // Suspend method call until the TTS engine is ready + final Runnable suspendedCall = + new Runnable() { + public void run() { + onMethodCall(call, result); + } + }; + pendingMethodCalls.add(suspendedCall); + return; + } + switch (call.method) { + case "speak": + { + String text = call.arguments.toString(); + if (this.speaking) { + result.success(0); + break; + } + speak(text); + if (this.awaitSpeakCompletion) { + this.speaking = true; + this.speakResult = result; + } else { + result.success(1); + } + break; + } + case "awaitSpeakCompletion": + { + this.awaitSpeakCompletion = Boolean.parseBoolean(call.arguments.toString()); + result.success(1); + break; + } + case "synthesizeToFile": + { + String text = call.argument("text"); + String fileName = call.argument("fileName"); + synthesizeToFile(text, fileName); + result.success(1); + break; + } + case "stop": + stop(); + result.success(1); + break; + case "setSpeechRate": + String rate = call.arguments.toString(); + setSpeechRate(Float.parseFloat(rate)); + result.success(1); + break; + case "setVolume": + String volume = call.arguments.toString(); + setVolume(Float.parseFloat(volume), result); + break; + case "setPitch": + String pitch = call.arguments.toString(); + setPitch(Float.parseFloat(pitch), result); + break; + case "setLanguage": + { + String language = call.arguments.toString(); + setLanguage(language, result); + break; + } + case "getLanguages": + getLanguages(result); + break; + case "getVoices": + getVoices(result); + break; + case "getSpeechRateValidRange": + getSpeechRateValidRange(result); + break; + case "getEngines": + getEngines(result); + break; + case "setVoice": + HashMap voice = call.arguments(); + setVoice(voice, result); + break; + case "isLanguageAvailable": + { + String language = call.arguments().toString(); + Locale locale = Locale.forLanguageTag(language); + result.success(isLanguageAvailable(locale)); + break; + } + case "setSilence": + String silencems = call.arguments.toString(); + this.silencems = Integer.parseInt(silencems); + break; + case "setSharedInstance": + result.success(1); + break; + default: + result.notImplemented(); + break; + } + } + + void setSpeechRate(float rate) { + tts.setSpeechRate(rate); + } + + Boolean isLanguageAvailable(Locale locale) { + return tts.isLanguageAvailable(locale) >= TextToSpeech.LANG_AVAILABLE; + } + + void setLanguage(String language, Result result) { + Locale locale = Locale.forLanguageTag(language); + if (isLanguageAvailable(locale)) { + tts.setLanguage(locale); + result.success(1); + } else { + result.success(0); + } + } + + void setVoice(HashMap voice, Result result) { + for (Voice ttsVoice : tts.getVoices()) { + if (ttsVoice.getName().equals(voice.get("name")) && ttsVoice.getLocale().toLanguageTag().equals(voice.get("locale"))) { + tts.setVoice(ttsVoice); + result.success(1); + return; + } + } + Log.d(tag, "Voice name not found: " + voice); + result.success(0); + } + + void setVolume(float volume, Result result) { + if (volume >= 0.0F && volume <= 1.0F) { + bundle.putFloat(TextToSpeech.Engine.KEY_PARAM_VOLUME, volume); + result.success(1); + } else { + Log.d(tag, "Invalid volume " + volume + " value - Range is from 0.0 to 1.0"); + result.success(0); + } + } + + void setPitch(float pitch, Result result) { + if (pitch >= 0.5F && pitch <= 2.0F) { + tts.setPitch(pitch); + result.success(1); + } else { + Log.d(tag, "Invalid pitch " + pitch + " value - Range is from 0.5 to 2.0"); + result.success(0); + } + } + + void getVoices(Result result) { + ArrayList> voices = new ArrayList<>(); + try { + for (Voice voice : tts.getVoices()) { + HashMap voiceMap = new HashMap<>(); + voiceMap.put("name", voice.getName()); + voiceMap.put("locale", voice.getLocale().toLanguageTag()); + voices.add(voiceMap); + } + result.success(voices); + } catch (NullPointerException e) { + Log.d(tag, "getVoices: " + e.getMessage()); + result.success(null); + } + } + + void getLanguages(Result result) { + ArrayList locales = new ArrayList<>(); + try { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + // While this method was introduced in API level 21, it seems that it + // has not been implemented in the speech service side until API Level 23. + for (Locale locale : tts.getAvailableLanguages()) { + locales.add(locale.toLanguageTag()); + } + } else { + for (Locale locale : Locale.getAvailableLocales()) { + if (locale.getVariant().isEmpty() && isLanguageAvailable(locale)) { + locales.add(locale.toLanguageTag()); + } + } + } + } catch (MissingResourceException | NullPointerException e) { + Log.d(tag, "getLanguages: " + e.getMessage()); + } + result.success(locales); + } + + void getEngines(Result result) { + ArrayList engines = new ArrayList<>(); + try { + for (TextToSpeech.EngineInfo engineInfo : tts.getEngines()) { + engines.add(engineInfo.name); + } + } catch (Exception e) { + Log.d(tag, "getEngines: " + e.getMessage()); + } + result.success(engines); + } + + void getSpeechRateValidRange(Result result) { + // Valid values available in the android documentation. + // https://developer.android.com/reference/android/speech/tts/TextToSpeech#setSpeechRate(float) + final HashMap data = new HashMap(); + data.put("min", "0"); + data.put("normal", "1"); + data.put("max", "3"); + data.put("platform", "android"); + result.success(data); + } + + private void speak(String text) { + String uuid = UUID.randomUUID().toString(); + utterances.put(uuid, text); + if (silencems > 0) { + tts.playSilentUtterance(silencems, TextToSpeech.QUEUE_FLUSH, SILENCE_PREFIX + uuid); + tts.speak(text, TextToSpeech.QUEUE_ADD, bundle, uuid); + } else { + tts.speak(text, TextToSpeech.QUEUE_FLUSH, bundle, uuid); + } + } + + private void stop() { + tts.stop(); + } + + private void synthesizeToFile(String text, String fileName) { + File file = new File(context.getExternalFilesDir(null), fileName); + String uuid = UUID.randomUUID().toString(); + bundle.putString(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, SYNTHESIZE_TO_FILE_PREFIX + uuid); + + int result = tts.synthesizeToFile(text, bundle, file, SYNTHESIZE_TO_FILE_PREFIX + uuid); + if (result == TextToSpeech.SUCCESS) { + Log.d(tag, "Successfully created file : " + file.getPath()); + } else { + Log.d(tag, "Failed creating file : " + file.getPath()); + } + } + + private void invokeMethod(final String method, final Object arguments) { + handler.post( + new Runnable() { + @Override + public void run() { + if (methodChannel != null) methodChannel.invokeMethod(method, arguments); + } + }); + } +} diff --git a/flutter_tts-voice_enhancement/example/.gitignore b/flutter_tts-voice_enhancement/example/.gitignore new file mode 100644 index 00000000..7e6bbd47 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/.gitignore @@ -0,0 +1,11 @@ +.DS_Store +.dart_tool/ + +.packages +.pub/ + +build/ + +.flutter-plugins +.flutter-plugins-dependencies +lib/generated_plugin_registrant.dart \ No newline at end of file diff --git a/flutter_tts-voice_enhancement/example/.metadata b/flutter_tts-voice_enhancement/example/.metadata new file mode 100644 index 00000000..3c0dd2c8 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/.metadata @@ -0,0 +1,8 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: b397406561f5e7a9c94e28f58d9e49fca0dd58b7 + channel: beta diff --git a/flutter_tts-voice_enhancement/example/README.md b/flutter_tts-voice_enhancement/example/README.md new file mode 100644 index 00000000..a1356260 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/README.md @@ -0,0 +1,16 @@ +# example + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/flutter_tts-voice_enhancement/example/android/.gitignore b/flutter_tts-voice_enhancement/example/android/.gitignore new file mode 100644 index 00000000..65b7315a --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/.gitignore @@ -0,0 +1,10 @@ +*.iml +*.class +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +GeneratedPluginRegistrant.java diff --git a/flutter_tts-voice_enhancement/example/android/.settings/org.eclipse.buildship.core.prefs b/flutter_tts-voice_enhancement/example/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..9f105273 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Apr 14 11:55:40 PDT 2018 +connection.project.dir= diff --git a/flutter_tts-voice_enhancement/example/android/app/.classpath b/flutter_tts-voice_enhancement/example/android/app/.classpath new file mode 100644 index 00000000..8d8d85f1 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/flutter_tts-voice_enhancement/example/android/app/.settings/org.eclipse.buildship.core.prefs b/flutter_tts-voice_enhancement/example/android/app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..0601ea50 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Apr 14 11:55:40 PDT 2018 +connection.project.dir=.. diff --git a/flutter_tts-voice_enhancement/example/android/app/build.gradle b/flutter_tts-voice_enhancement/example/android/app/build.gradle new file mode 100644 index 00000000..563b8f89 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/build.gradle @@ -0,0 +1,50 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + applicationId "com.tundralabs.flutterttsexample" + minSdkVersion 21 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test:runner:1.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' +} diff --git a/flutter_tts-voice_enhancement/example/android/app/src/debug/AndroidManifest.xml b/flutter_tts-voice_enhancement/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..49f10e46 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/AndroidManifest.xml b/flutter_tts-voice_enhancement/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..1caca009 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/res/drawable/launch_background.xml b/flutter_tts-voice_enhancement/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/flutter_tts-voice_enhancement/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/flutter_tts-voice_enhancement/example/android/app/src/main/res/values/styles.xml b/flutter_tts-voice_enhancement/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..1f83a33f --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/android/app/src/profile/AndroidManifest.xml b/flutter_tts-voice_enhancement/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..49f10e46 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/flutter_tts-voice_enhancement/example/android/build.gradle b/flutter_tts-voice_enhancement/example/android/build.gradle new file mode 100644 index 00000000..cd23eff8 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/build.gradle @@ -0,0 +1,29 @@ +buildscript { + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.0.0' + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/flutter_tts-voice_enhancement/example/android/gradle.properties b/flutter_tts-voice_enhancement/example/android/gradle.properties new file mode 100644 index 00000000..b6e61b62 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/gradle.properties @@ -0,0 +1,4 @@ +android.enableJetifier=true +android.useAndroidX=true +org.gradle.jvmargs=-Xmx1536M +android.enableR8=true diff --git a/flutter_tts-voice_enhancement/example/android/gradle/wrapper/gradle-wrapper.properties b/flutter_tts-voice_enhancement/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..495eba36 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue Jul 07 01:11:38 PDT 2020 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/flutter_tts-voice_enhancement/example/android/settings.gradle b/flutter_tts-voice_enhancement/example/android/settings.gradle new file mode 100644 index 00000000..5a2f14fb --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/settings.gradle @@ -0,0 +1,15 @@ +include ':app' + +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + +def plugins = new Properties() +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') +if (pluginsFile.exists()) { + pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } +} + +plugins.each { name, path -> + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() + include ":$name" + project(":$name").projectDir = pluginDirectory +} diff --git a/flutter_tts-voice_enhancement/example/android/settings_aar.gradle b/flutter_tts-voice_enhancement/example/android/settings_aar.gradle new file mode 100644 index 00000000..e7b4def4 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/android/settings_aar.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/flutter_tts-voice_enhancement/example/ios/.gitignore b/flutter_tts-voice_enhancement/example/ios/.gitignore new file mode 100644 index 00000000..1e1aafd6 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/.gitignore @@ -0,0 +1,42 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/app.flx +/Flutter/app.zip +/Flutter/flutter_assets/ +/Flutter/App.framework +/Flutter/Flutter.framework +/Flutter/Generated.xcconfig +/ServiceDefinitions.json + +Pods/ diff --git a/flutter_tts-voice_enhancement/example/ios/Flutter/.last_build_id b/flutter_tts-voice_enhancement/example/ios/Flutter/.last_build_id new file mode 100644 index 00000000..bfaaeba1 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Flutter/.last_build_id @@ -0,0 +1 @@ +b443c2d1b6b1e4df6c6fcc277a981410 \ No newline at end of file diff --git a/flutter_tts-voice_enhancement/example/ios/Flutter/AppFrameworkInfo.plist b/flutter_tts-voice_enhancement/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..6c2de808 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + UIRequiredDeviceCapabilities + + arm64 + + MinimumOSVersion + 8.0 + + diff --git a/flutter_tts-voice_enhancement/example/ios/Flutter/Debug.xcconfig b/flutter_tts-voice_enhancement/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..e8efba11 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/flutter_tts-voice_enhancement/example/ios/Flutter/Flutter.podspec b/flutter_tts-voice_enhancement/example/ios/Flutter/Flutter.podspec new file mode 100644 index 00000000..5ca30416 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# NOTE: This podspec is NOT to be published. It is only used as a local source! +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'High-performance, high-fidelity mobile apps.' + s.description = <<-DESC +Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. + DESC + s.homepage = 'https://flutter.io' + s.license = { :type => 'MIT' } + s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } + s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } + s.ios.deployment_target = '8.0' + s.vendored_frameworks = 'Flutter.framework' +end diff --git a/flutter_tts-voice_enhancement/example/ios/Flutter/Release.xcconfig b/flutter_tts-voice_enhancement/example/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..399e9340 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/flutter_tts-voice_enhancement/example/ios/Podfile b/flutter_tts-voice_enhancement/example/ios/Podfile new file mode 100644 index 00000000..1e8c3c90 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.pbxproj b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..28d4b795 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,488 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 72BCD356E80F9F5F32A2B586 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE3436CECE15DEA290DCD6B6 /* Pods_Runner.framework */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BE3436CECE15DEA290DCD6B6 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CED86603210BC43D753C699B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + CF068A80D9BD19FC43D3FE99 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 72BCD356E80F9F5F32A2B586 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 04223708A30129901099FE16 /* Frameworks */ = { + isa = PBXGroup; + children = ( + BE3436CECE15DEA290DCD6B6 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 1ED2DC2A248FC04D7FB5EA8C /* Pods */ = { + isa = PBXGroup; + children = ( + CF068A80D9BD19FC43D3FE99 /* Pods-Runner.debug.xcconfig */, + CED86603210BC43D753C699B /* Pods-Runner.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 1ED2DC2A248FC04D7FB5EA8C /* Pods */, + 04223708A30129901099FE16 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 3B0CA933DCDA45D4F71410D4 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 46F7EA90EF3F4667EDB9E562 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0940; + ORGANIZATIONNAME = "The Chromium Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0910; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 3B0CA933DCDA45D4F71410D4 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 46F7EA90EF3F4667EDB9E562 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${PODS_ROOT}/../Flutter/Flutter.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.tundralabs.flutterTtsExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.tundralabs.flutterTtsExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..4bafc458 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..21a3cc14 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/AppDelegate.swift b/flutter_tts-voice_enhancement/example/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..71cc41e3 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000..3d43d11e Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000..28c6bf03 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000..f091b6b0 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000..4cde1211 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000..d0ef06e7 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000..dcdc2306 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000..c8f9ed8f Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000..75b2d164 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000..c4df70d3 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000..6a84f41e Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000..d0e1f585 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter_tts-voice_enhancement/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Base.lproj/Main.storyboard b/flutter_tts-voice_enhancement/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Info.plist b/flutter_tts-voice_enhancement/example/ios/Runner/Info.plist new file mode 100644 index 00000000..dd2d9263 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flutter_tts_example + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/flutter_tts-voice_enhancement/example/ios/Runner/Runner-Bridging-Header.h b/flutter_tts-voice_enhancement/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..7335fdf9 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/flutter_tts-voice_enhancement/example/lib/main.dart b/flutter_tts-voice_enhancement/example/lib/main.dart new file mode 100644 index 00000000..97530bbb --- /dev/null +++ b/flutter_tts-voice_enhancement/example/lib/main.dart @@ -0,0 +1,292 @@ +import 'dart:async'; +import 'dart:io' show Platform; +import 'package:flutter/foundation.dart' show kIsWeb; + +import 'package:flutter/material.dart'; +import 'package:flutter_tts/flutter_tts.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatefulWidget { + @override + _MyAppState createState() => _MyAppState(); +} + +enum TtsState { playing, stopped, paused, continued } + +class _MyAppState extends State { + FlutterTts flutterTts; + dynamic languages; + String language; + double volume = 0.5; + double pitch = 1.0; + double rate = 0.5; + + String _newVoiceText; + + TtsState ttsState = TtsState.stopped; + + get isPlaying => ttsState == TtsState.playing; + + get isStopped => ttsState == TtsState.stopped; + + get isPaused => ttsState == TtsState.paused; + + get isContinued => ttsState == TtsState.continued; + + @override + initState() { + super.initState(); + initTts(); + } + + initTts() { + flutterTts = FlutterTts(); + + _getLanguages(); + + if (!kIsWeb) { + if (Platform.isAndroid) { + _getEngines(); + } + } + + flutterTts.setStartHandler(() { + setState(() { + print("Playing"); + ttsState = TtsState.playing; + }); + }); + + flutterTts.setCompletionHandler(() { + setState(() { + print("Complete"); + ttsState = TtsState.stopped; + }); + }); + + flutterTts.setCancelHandler(() { + setState(() { + print("Cancel"); + ttsState = TtsState.stopped; + }); + }); + + if (kIsWeb || Platform.isIOS) { + flutterTts.setPauseHandler(() { + setState(() { + print("Paused"); + ttsState = TtsState.paused; + }); + }); + + flutterTts.setContinueHandler(() { + setState(() { + print("Continued"); + ttsState = TtsState.continued; + }); + }); + } + + flutterTts.setErrorHandler((msg) { + setState(() { + print("error: $msg"); + ttsState = TtsState.stopped; + }); + }); + } + + Future _getLanguages() async { + languages = await flutterTts.getLanguages; + if (languages != null) setState(() => languages); + } + + Future _getEngines() async { + var engines = await flutterTts.getEngines; + if (engines != null) { + for (dynamic engine in engines) { + print(engine); + } + } + } + + Future _speak() async { + await flutterTts.setVolume(volume); + await flutterTts.setSpeechRate(rate); + await flutterTts.setPitch(pitch); + + if (_newVoiceText != null) { + if (_newVoiceText.isNotEmpty) { + await flutterTts.awaitSpeakCompletion(true); + await flutterTts.speak(_newVoiceText); + } + } + } + + Future _stop() async { + var result = await flutterTts.stop(); + if (result == 1) setState(() => ttsState = TtsState.stopped); + } + + Future _pause() async { + var result = await flutterTts.pause(); + if (result == 1) setState(() => ttsState = TtsState.paused); + } + + @override + void dispose() { + super.dispose(); + flutterTts.stop(); + } + + List> getLanguageDropDownMenuItems() { + var items = List>(); + for (dynamic type in languages) { + items.add( + DropdownMenuItem(value: type as String, child: Text(type as String))); + } + return items; + } + + void changedLanguageDropDownItem(String selectedType) { + setState(() { + language = selectedType; + flutterTts.setLanguage(language); + }); + } + + void _onChange(String text) { + setState(() { + _newVoiceText = text; + }); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: Text('Flutter TTS'), + ), + body: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Column(children: [ + _inputSection(), + _btnSection(), + languages != null ? _languageDropDownSection() : Text(""), + _buildSliders() + ])))); + } + + Widget _inputSection() => Container( + alignment: Alignment.topCenter, + padding: EdgeInsets.only(top: 25.0, left: 25.0, right: 25.0), + child: TextField( + onChanged: (String value) { + _onChange(value); + }, + )); + + Widget _btnSection() { + if (!kIsWeb && Platform.isAndroid) { + return Container( + padding: EdgeInsets.only(top: 50.0), + child: + Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ + _buildButtonColumn(Colors.green, Colors.greenAccent, + Icons.play_arrow, 'PLAY', _speak), + _buildButtonColumn( + Colors.red, Colors.redAccent, Icons.stop, 'STOP', _stop), + ])); + } else { + return Container( + padding: EdgeInsets.only(top: 50.0), + child: + Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ + _buildButtonColumn(Colors.green, Colors.greenAccent, + Icons.play_arrow, 'PLAY', _speak), + _buildButtonColumn( + Colors.red, Colors.redAccent, Icons.stop, 'STOP', _stop), + _buildButtonColumn( + Colors.blue, Colors.blueAccent, Icons.pause, 'PAUSE', _pause), + ])); + } + } + + Widget _languageDropDownSection() => Container( + padding: EdgeInsets.only(top: 50.0), + child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ + DropdownButton( + value: language, + items: getLanguageDropDownMenuItems(), + onChanged: changedLanguageDropDownItem, + ) + ])); + + Column _buildButtonColumn(Color color, Color splashColor, IconData icon, + String label, Function func) { + return Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + icon: Icon(icon), + color: color, + splashColor: splashColor, + onPressed: () => func()), + Container( + margin: const EdgeInsets.only(top: 8.0), + child: Text(label, + style: TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w400, + color: color))) + ]); + } + + Widget _buildSliders() { + return Column( + children: [_volume(), _pitch(), _rate()], + ); + } + + Widget _volume() { + return Slider( + value: volume, + onChanged: (newVolume) { + setState(() => volume = newVolume); + }, + min: 0.0, + max: 1.0, + divisions: 10, + label: "Volume: $volume"); + } + + Widget _pitch() { + return Slider( + value: pitch, + onChanged: (newPitch) { + setState(() => pitch = newPitch); + }, + min: 0.5, + max: 2.0, + divisions: 15, + label: "Pitch: $pitch", + activeColor: Colors.red, + ); + } + + Widget _rate() { + return Slider( + value: rate, + onChanged: (newRate) { + setState(() => rate = newRate); + }, + min: 0.0, + max: 1.0, + divisions: 10, + label: "Rate: $rate", + activeColor: Colors.green, + ); + } +} diff --git a/flutter_tts-voice_enhancement/example/macos/.gitignore b/flutter_tts-voice_enhancement/example/macos/.gitignore new file mode 100644 index 00000000..d2fd3772 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/.gitignore @@ -0,0 +1,6 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/xcuserdata/ diff --git a/flutter_tts-voice_enhancement/example/macos/Flutter/Flutter-Debug.xcconfig b/flutter_tts-voice_enhancement/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 00000000..785633d3 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/flutter_tts-voice_enhancement/example/macos/Flutter/Flutter-Release.xcconfig b/flutter_tts-voice_enhancement/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 00000000..5fba960c --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/flutter_tts-voice_enhancement/example/macos/Flutter/GeneratedPluginRegistrant.swift b/flutter_tts-voice_enhancement/example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 00000000..1e6ac53b --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,12 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import flutter_tts + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FlutterTtsPlugin.register(with: registry.registrar(forPlugin: "FlutterTtsPlugin")) +} diff --git a/flutter_tts-voice_enhancement/example/macos/Podfile b/flutter_tts-voice_enhancement/example/macos/Podfile new file mode 100644 index 00000000..5bf4307c --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Podfile @@ -0,0 +1,82 @@ +platform :osx, '10.15' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def parse_KV_file(file, separator='=') + file_abs_path = File.expand_path(file) + if !File.exists? file_abs_path + return []; + end + pods_ary = [] + skip_line_start_symbols = ["#", "/"] + File.foreach(file_abs_path) { |line| + next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } + plugin = line.split(pattern=separator) + if plugin.length == 2 + podname = plugin[0].strip() + path = plugin[1].strip() + podpath = File.expand_path("#{path}", file_abs_path) + pods_ary.push({:name => podname, :path => podpath}); + else + puts "Invalid plugin specification: #{line}" + end + } + return pods_ary +end + +def pubspec_supports_macos(file) + file_abs_path = File.expand_path(file) + if !File.exists? file_abs_path + return false; + end + File.foreach(file_abs_path) { |line| + return true if line =~ /^\s*macos:/ + } + return false +end + +target 'Runner' do + use_frameworks! + use_modular_headers! + + # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock + # referring to absolute paths on developers' machines. + ephemeral_dir = File.join('Flutter', 'ephemeral') + symlink_dir = File.join(ephemeral_dir, '.symlinks') + symlink_plugins_dir = File.join(symlink_dir, 'plugins') + system("rm -rf #{symlink_dir}") + system("mkdir -p #{symlink_plugins_dir}") + + # Flutter Pods + generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig')) + if generated_xcconfig.empty? + puts "Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." + end + generated_xcconfig.map { |p| + if p[:name] == 'FLUTTER_FRAMEWORK_DIR' + symlink = File.join(symlink_dir, 'flutter') + File.symlink(File.dirname(p[:path]), symlink) + pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path])) + end + } + + # Plugin Pods + plugin_pods = parse_KV_file('../.flutter-plugins') + plugin_pods.map { |p| + symlink = File.join(symlink_plugins_dir, p[:name]) + File.symlink(p[:path], symlink) + if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml')) + pod p[:name], :path => File.join(symlink, 'macos') + end + } +end + +# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. +install! 'cocoapods', :disable_input_output_paths => true diff --git a/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/project.pbxproj b/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..39fbd18c --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,656 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; }; + 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 3640FC23D5951A8FB0D6ECA0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A470206CCCE0007DE0E2807A /* Pods_Runner.framework */; }; + D73912F022F37F9E000D13A0 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; }; + D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */, + 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */, + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FlutterMacOS.framework; path = Flutter/ephemeral/FlutterMacOS.framework; sourceTree = SOURCE_ROOT; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 517AA5C8DE31A9B49D27971F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 66FE8AA741C2B7FC12BF1304 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + A470206CCCE0007DE0E2807A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C15A67B64555E7FFE7AD8B76 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + D73912EF22F37F9E000D13A0 /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/ephemeral/App.framework; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D73912F022F37F9E000D13A0 /* App.framework in Frameworks */, + 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */, + 3640FC23D5951A8FB0D6ECA0 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 5F9F48FBDE9334256A3D8D1C /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* example.app */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + D73912EF22F37F9E000D13A0 /* App.framework */, + 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + 5F9F48FBDE9334256A3D8D1C /* Pods */ = { + isa = PBXGroup; + children = ( + 66FE8AA741C2B7FC12BF1304 /* Pods-Runner.debug.xcconfig */, + 517AA5C8DE31A9B49D27971F /* Pods-Runner.release.xcconfig */, + C15A67B64555E7FFE7AD8B76 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + A470206CCCE0007DE0E2807A /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9A62F257D3FF7C7C94E365B2 /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + F7AADAC6A864E8BF8890B1EC /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1150; + ORGANIZATIONNAME = "The Flutter Authors"; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n"; + }; + 9A62F257D3FF7C7C94E365B2 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + F7AADAC6A864E8BF8890B1EC /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter/ephemeral", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter/ephemeral", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter/ephemeral", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..6111bd0a --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/flutter_tts-voice_enhancement/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..21a3cc14 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_tts-voice_enhancement/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/AppDelegate.swift b/flutter_tts-voice_enhancement/example/macos/Runner/AppDelegate.swift new file mode 100644 index 00000000..d53ef643 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..a2ec33f1 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 00000000..3c4935a7 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 00000000..ed4cc164 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 00000000..483be613 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 00000000..bcbf36df Binary files /dev/null and b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 00000000..9c0a6528 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 00000000..e71a7261 Binary files /dev/null and b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 00000000..8a31fe2d Binary files /dev/null and b/flutter_tts-voice_enhancement/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Base.lproj/MainMenu.xib b/flutter_tts-voice_enhancement/example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 00000000..537341ab --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Configs/AppInfo.xcconfig b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000..f960fd48 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.tundralabs.example + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2020 com.tundralabs. All rights reserved. diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Debug.xcconfig b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 00000000..36b0fd94 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Release.xcconfig b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 00000000..dff4f495 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Warnings.xcconfig b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 00000000..42bcbf47 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/DebugProfile.entitlements b/flutter_tts-voice_enhancement/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 00000000..dddb8a30 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Info.plist b/flutter_tts-voice_enhancement/example/macos/Runner/Info.plist new file mode 100644 index 00000000..4789daa6 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/MainFlutterWindow.swift b/flutter_tts-voice_enhancement/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 00000000..2722837e --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController.init() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/flutter_tts-voice_enhancement/example/macos/Runner/Release.entitlements b/flutter_tts-voice_enhancement/example/macos/Runner/Release.entitlements new file mode 100644 index 00000000..852fa1a4 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/flutter_tts-voice_enhancement/example/pubspec.yaml b/flutter_tts-voice_enhancement/example/pubspec.yaml new file mode 100644 index 00000000..54cbe6ed --- /dev/null +++ b/flutter_tts-voice_enhancement/example/pubspec.yaml @@ -0,0 +1,59 @@ +name: flutter_tts_example +description: Demonstrates how to use the flutter_tts plugin. + +dependencies: + flutter: + sdk: flutter + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^0.1.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_tts: + path: ../ + +# For information on the generic Dart part of this file, see the +# following page: https://www.dartlang.org/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.io/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.io/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.io/custom-fonts/#from-packages diff --git a/flutter_tts-voice_enhancement/example/test/widget_test.dart b/flutter_tts-voice_enhancement/example/test/widget_test.dart new file mode 100644 index 00000000..6db856cd --- /dev/null +++ b/flutter_tts-voice_enhancement/example/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import '../lib/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/flutter_tts-voice_enhancement/example/web/favicon.png b/flutter_tts-voice_enhancement/example/web/favicon.png new file mode 100644 index 00000000..8aaa46ac Binary files /dev/null and b/flutter_tts-voice_enhancement/example/web/favicon.png differ diff --git a/flutter_tts-voice_enhancement/example/web/icons/Icon-192.png b/flutter_tts-voice_enhancement/example/web/icons/Icon-192.png new file mode 100644 index 00000000..b749bfef Binary files /dev/null and b/flutter_tts-voice_enhancement/example/web/icons/Icon-192.png differ diff --git a/flutter_tts-voice_enhancement/example/web/icons/Icon-512.png b/flutter_tts-voice_enhancement/example/web/icons/Icon-512.png new file mode 100644 index 00000000..88cfd48d Binary files /dev/null and b/flutter_tts-voice_enhancement/example/web/icons/Icon-512.png differ diff --git a/flutter_tts-voice_enhancement/example/web/index.html b/flutter_tts-voice_enhancement/example/web/index.html new file mode 100644 index 00000000..20b0c00a --- /dev/null +++ b/flutter_tts-voice_enhancement/example/web/index.html @@ -0,0 +1,10 @@ + + + + + Flutter TTS example + + + + + diff --git a/flutter_tts-voice_enhancement/example/web/manifest.json b/flutter_tts-voice_enhancement/example/web/manifest.json new file mode 100644 index 00000000..8c012917 --- /dev/null +++ b/flutter_tts-voice_enhancement/example/web/manifest.json @@ -0,0 +1,23 @@ +{ + "name": "example", + "short_name": "example", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/flutter_tts-voice_enhancement/ios/.gitignore b/flutter_tts-voice_enhancement/ios/.gitignore new file mode 100644 index 00000000..956c87f3 --- /dev/null +++ b/flutter_tts-voice_enhancement/ios/.gitignore @@ -0,0 +1,31 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + diff --git a/flutter_tts-voice_enhancement/ios/Assets/.gitkeep b/flutter_tts-voice_enhancement/ios/Assets/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/flutter_tts-voice_enhancement/ios/Classes/AudioCategory.swift b/flutter_tts-voice_enhancement/ios/Classes/AudioCategory.swift new file mode 100644 index 00000000..74e8ea0b --- /dev/null +++ b/flutter_tts-voice_enhancement/ios/Classes/AudioCategory.swift @@ -0,0 +1,21 @@ +import AVFoundation + +enum AudioCategory: String { + case iosAudioCategoryAmbientSolo + case iosAudioCategoryAmbient + case iosAudioCategoryPlayback + case iosAudioCategoryPlaybackAndRecord + + func toAVAudioSessionCategory() -> AVAudioSession.Category { + switch self { + case .iosAudioCategoryAmbientSolo: + return .soloAmbient + case .iosAudioCategoryAmbient: + return .ambient + case .iosAudioCategoryPlayback: + return .playback + case .iosAudioCategoryPlaybackAndRecord: + return .playAndRecord + } + } +} diff --git a/flutter_tts-voice_enhancement/ios/Classes/AudioCategoryOptions.swift b/flutter_tts-voice_enhancement/ios/Classes/AudioCategoryOptions.swift new file mode 100644 index 00000000..f593bfdb --- /dev/null +++ b/flutter_tts-voice_enhancement/ios/Classes/AudioCategoryOptions.swift @@ -0,0 +1,42 @@ +import AVFoundation + +enum AudioCategoryOptions: String { + case iosAudioCategoryOptionsMixWithOthers + case iosAudioCategoryOptionsDuckOthers + case iosAudioCategoryOptionsInterruptSpokenAudioAndMixWithOthers + case iosAudioCategoryOptionsAllowBluetooth + case iosAudioCategoryOptionsAllowBluetoothA2DP + case iosAudioCategoryOptionsAllowAirPlay + case iosAudioCategoryOptionsDefaultToSpeaker + + func toAVAudioSessionCategoryOptions() -> AVAudioSession.CategoryOptions? { + switch self { + case .iosAudioCategoryOptionsMixWithOthers: + return .mixWithOthers + case .iosAudioCategoryOptionsDuckOthers: + return .duckOthers + case .iosAudioCategoryOptionsInterruptSpokenAudioAndMixWithOthers: + if #available(iOS 9.0, *) { + return .interruptSpokenAudioAndMixWithOthers + } else { + return nil + } + case .iosAudioCategoryOptionsAllowBluetooth: + return .allowBluetooth + case .iosAudioCategoryOptionsAllowBluetoothA2DP: + if #available(iOS 10.0, *) { + return .allowBluetoothA2DP + } else { + return nil + } + case .iosAudioCategoryOptionsAllowAirPlay: + if #available(iOS 10.0, *) { + return .allowAirPlay + } else { + return nil + } + case .iosAudioCategoryOptionsDefaultToSpeaker: + return .defaultToSpeaker + } + } +} diff --git a/flutter_tts-voice_enhancement/ios/Classes/FlutterTtsPlugin.h b/flutter_tts-voice_enhancement/ios/Classes/FlutterTtsPlugin.h new file mode 100644 index 00000000..13e3a21a --- /dev/null +++ b/flutter_tts-voice_enhancement/ios/Classes/FlutterTtsPlugin.h @@ -0,0 +1,4 @@ +#import + +@interface FlutterTtsPlugin : NSObject +@end diff --git a/flutter_tts-voice_enhancement/ios/Classes/FlutterTtsPlugin.m b/flutter_tts-voice_enhancement/ios/Classes/FlutterTtsPlugin.m new file mode 100644 index 00000000..3a1f187c --- /dev/null +++ b/flutter_tts-voice_enhancement/ios/Classes/FlutterTtsPlugin.m @@ -0,0 +1,8 @@ +#import "FlutterTtsPlugin.h" +#import + +@implementation FlutterTtsPlugin ++ (void)registerWithRegistrar:(NSObject*)registrar { + [SwiftFlutterTtsPlugin registerWithRegistrar:registrar]; +} +@end diff --git a/flutter_tts-voice_enhancement/ios/Classes/SwiftFlutterTtsPlugin.swift b/flutter_tts-voice_enhancement/ios/Classes/SwiftFlutterTtsPlugin.swift new file mode 100644 index 00000000..5c78c135 --- /dev/null +++ b/flutter_tts-voice_enhancement/ios/Classes/SwiftFlutterTtsPlugin.swift @@ -0,0 +1,386 @@ +import Flutter +import UIKit +import AVFoundation + +public class SwiftFlutterTtsPlugin: NSObject, FlutterPlugin, AVSpeechSynthesizerDelegate { + final var iosAudioCategoryKey = "iosAudioCategoryKey" + final var iosAudioCategoryOptionsKey = "iosAudioCategoryOptionsKey" + + let synthesizer = AVSpeechSynthesizer() + var language: String = AVSpeechSynthesisVoice.currentLanguageCode() + var rate: Float = AVSpeechUtteranceDefaultSpeechRate + var languages = Set() + var volume: Float = 1.0 + var pitch: Float = 1.0 + var voice: AVSpeechSynthesisVoice? + var awaitSpeakCompletion: Bool = false + var speakResult: FlutterResult! + + var channel = FlutterMethodChannel() + lazy var audioSession = AVAudioSession.sharedInstance() + init(channel: FlutterMethodChannel) { + super.init() + self.channel = channel + synthesizer.delegate = self + setLanguages() + + // Allow audio playback when the Ring/Silent switch is set to silent + do { + try audioSession.setCategory(.playAndRecord, options: [.defaultToSpeaker]) + } catch { + print(error) + } + } + + private func setLanguages() { + for voice in AVSpeechSynthesisVoice.speechVoices(){ + self.languages.insert(voice.language) + } + } + + public static func register(with registrar: FlutterPluginRegistrar) { + let channel = FlutterMethodChannel(name: "flutter_tts", binaryMessenger: registrar.messenger()) + let instance = SwiftFlutterTtsPlugin(channel: channel) + registrar.addMethodCallDelegate(instance, channel: channel) + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + switch call.method { + case "speak": + let text: String = call.arguments as! String + self.speak(text: text, result: result) + break + case "awaitSpeakCompletion": + self.awaitSpeakCompletion = call.arguments as! Bool + result(1) + break + case "synthesizeToFile": + guard let args = call.arguments as? [String: Any] else { + result("iOS could not recognize flutter arguments in method: (sendParams)") + return + } + let text = args["text"] as! String + let fileName = args["fileName"] as! String + self.synthesizeToFile(text: text, fileName: fileName, result: result) + break + case "pause": + self.pause(result: result) + break + case "setLanguage": + let language: String = call.arguments as! String + self.setLanguage(language: language, result: result) + break + case "setSpeechRate": + let rate: Double = call.arguments as! Double + self.setRate(rate: Float(rate)) + result(1) + break + case "setVolume": + let volume: Double = call.arguments as! Double + self.setVolume(volume: Float(volume), result: result) + break + case "setPitch": + let pitch: Double = call.arguments as! Double + self.setPitch(pitch: Float(pitch), result: result) + break + case "stop": + self.stop() + result(1) + break + case "getLanguages": + self.getLanguages(result: result) + break + case "getSpeechRateValidRange": + self.getSpeechRateValidRange(result: result) + break + case "isLanguageAvailable": + let language: String = call.arguments as! String + self.isLanguageAvailable(language: language, result: result) + break + case "getVoices": + self.getVoices(result: result) + break + case "setVoice": + guard let args = call.arguments as? [String: String] else { + result("iOS could not recognize flutter arguments in method: (sendParams)") + return + } + self.setVoice(voice: args, result: result) + break + case "setSharedInstance": + let sharedInstance = call.arguments as! Bool + self.setSharedInstance(sharedInstance: sharedInstance, result: result) + break + case "setIosAudioCategory": + guard let args = call.arguments as? [String: Any] else { + result("iOS could not recognize flutter arguments in method: (sendParams)") + return + } + let audioCategory = args["iosAudioCategoryKey"] as? String + let audioOptions = args[iosAudioCategoryOptionsKey] as? Array + self.setAudioCategory(audioCategory: audioCategory, audioOptions: audioOptions, result: result) + break + default: + result(FlutterMethodNotImplemented) + } + } + + private func speak(text: String, result: @escaping FlutterResult) { + if (self.synthesizer.isPaused) { + if (self.synthesizer.continueSpeaking()) { + if self.awaitSpeakCompletion { + self.speakResult = result + } else { + result(1) + } + } else { + result(0) + } + } else { + let utterance = AVSpeechUtterance(string: text) + if self.voice != nil { + utterance.voice = self.voice! + } else { + utterance.voice = AVSpeechSynthesisVoice(language: self.language) + } + utterance.rate = self.rate + utterance.volume = self.volume + utterance.pitchMultiplier = self.pitch + + self.synthesizer.speak(utterance) + if self.awaitSpeakCompletion { + self.speakResult = result + } else { + result(1) + } + } + } + + private func synthesizeToFile(text: String, fileName: String, result: FlutterResult) { + var output: AVAudioFile? + var failed = false + let utterance = AVSpeechUtterance(string: text) + + if self.voice != nil { + utterance.voice = self.voice! + } else { + utterance.voice = AVSpeechSynthesisVoice(language: self.language) + } + utterance.rate = self.rate + utterance.volume = self.volume + utterance.pitchMultiplier = self.pitch + + if #available(iOS 13.0, *) { + self.synthesizer.write(utterance) { (buffer: AVAudioBuffer) in + guard let pcmBuffer = buffer as? AVAudioPCMBuffer else { + NSLog("unknow buffer type: \(buffer)") + failed = true + return + } + print(pcmBuffer.format) + if pcmBuffer.frameLength == 0 { + // finished + } else { + // append buffer to file + let fileURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(fileName) + NSLog("Saving utterance to file: \(fileURL.absoluteString)") + + if output == nil { + do { + output = try AVAudioFile( + forWriting: fileURL, + settings: pcmBuffer.format.settings, + commonFormat: .pcmFormatInt16, + interleaved: false) + } catch { + NSLog(error.localizedDescription) + failed = true + return + } + } + + try! output!.write(from: pcmBuffer) + } + } + } else { + result("Unsupported iOS version") + } + if failed { + result(0) + } + result(1) + } + + private func pause(result: FlutterResult) { + if (self.synthesizer.pauseSpeaking(at: AVSpeechBoundary.word)) { + result(1) + } else { + result(0) + } + } + + private func setLanguage(language: String, result: FlutterResult) { + if !(self.languages.contains(where: {$0.range(of: language, options: [.caseInsensitive, .anchored]) != nil})) { + result(0) + } else { + self.language = language + self.voice = nil + result(1) + } + } + + private func setRate(rate: Float) { + self.rate = rate + } + + private func setVolume(volume: Float, result: FlutterResult) { + if (volume >= 0.0 && volume <= 1.0) { + self.volume = volume + result(1) + } else { + result(0) + } + } + + private func setPitch(pitch: Float, result: FlutterResult) { + if (volume >= 0.5 && volume <= 2.0) { + self.pitch = pitch + result(1) + } else { + result(0) + } + } + + private func setSharedInstance(sharedInstance: Bool, result: FlutterResult) { + do { + try AVAudioSession.sharedInstance().setActive(sharedInstance) + result(1) + } catch { + result(0) + } + } + + private func setAudioCategory(audioCategory: String?, audioOptions: Array?, result: FlutterResult){ + let category: AVAudioSession.Category = AudioCategory(rawValue: audioCategory ?? "")?.toAVAudioSessionCategory() ?? audioSession.category + let options: AVAudioSession.CategoryOptions = audioOptions?.reduce([], { (result, option) -> AVAudioSession.CategoryOptions in + return result.union(AudioCategoryOptions(rawValue: option)?.toAVAudioSessionCategoryOptions() ?? []) + }) ?? [] + + do { + try audioSession.setCategory(category, options: options) + result(1) + } catch { + print(error) + result(0) + } + } + + private func stop() { + self.synthesizer.stopSpeaking(at: AVSpeechBoundary.immediate) + } + + private func getLanguages(result: FlutterResult) { + result(Array(self.languages)) + } + + private func getSpeechRateValidRange(result: FlutterResult) { + let validSpeechRateRange: [String:String] = [ + "min": String(AVSpeechUtteranceMinimumSpeechRate), + "normal": String(AVSpeechUtteranceDefaultSpeechRate), + "max": String(AVSpeechUtteranceMaximumSpeechRate), + "platform": "ios" + ] + result(validSpeechRateRange) + } + + private func isLanguageAvailable(language: String, result: FlutterResult) { + var isAvailable: Bool = false + if (self.languages.contains(where: {$0.range(of: language, options: [.caseInsensitive, .anchored]) != nil})) { + isAvailable = true + } + result(isAvailable); + } + + private func getVoices(result: FlutterResult) { + if #available(iOS 9.0, *) { + let voices = NSMutableArray() + var voiceDict: [String: String] = [:] + for voice in AVSpeechSynthesisVoice.speechVoices() { + voiceDict["name"] = voice.name + voiceDict["locale"] = voice.language + voices.add(voiceDict) + } + result(voices) + } else { + // Since voice selection is not supported below iOS 9, make voice getter and setter + // have the same bahavior as language selection. + getLanguages(result: result) + } + } + + private func setVoice(voice: [String:String], result: FlutterResult) { + if #available(iOS 9.0, *) { + if let voice = AVSpeechSynthesisVoice.speechVoices().first(where: { $0.name == voice["name"]! && $0.language == voice["locale"]! }) { + self.voice = voice + self.language = voice.language + result(1) + return + } + result(0) + } else { + setLanguage(language: voice["name"]!, result: result) + } + } + + private func shouldDeactivateAndNotifyOthers(_ session: AVAudioSession) -> Bool { + var options: AVAudioSession.CategoryOptions = .duckOthers + if #available(iOS 9.0, *) { + options.insert(.interruptSpokenAudioAndMixWithOthers) + } + options.remove(.mixWithOthers) + + return !options.isDisjoint(with: session.categoryOptions) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) { + if shouldDeactivateAndNotifyOthers(audioSession) { + do { + try audioSession.setActive(false, options: .notifyOthersOnDeactivation) + } catch { + print(error) + } + } + if self.awaitSpeakCompletion { + self.speakResult(1) + } + self.channel.invokeMethod("speak.onComplete", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didStart utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onStart", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didPause utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onPause", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didContinue utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onContinue", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didCancel utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onCancel", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, willSpeakRangeOfSpeechString characterRange: NSRange, utterance: AVSpeechUtterance) { + let nsWord = utterance.speechString as NSString + let data: [String:String] = [ + "text": utterance.speechString, + "start": String(characterRange.location), + "end": String(characterRange.location + characterRange.length), + "word": nsWord.substring(with: characterRange) + ] + self.channel.invokeMethod("speak.onProgress", arguments: data) + } + +} diff --git a/flutter_tts-voice_enhancement/ios/flutter_tts.podspec b/flutter_tts-voice_enhancement/ios/flutter_tts.podspec new file mode 100644 index 00000000..03099f45 --- /dev/null +++ b/flutter_tts-voice_enhancement/ios/flutter_tts.podspec @@ -0,0 +1,22 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# +Pod::Spec.new do |s| + s.name = 'flutter_tts' + s.version = '0.0.1' + s.summary = 'A flutter text to speech plugin.' + s.description = <<-DESC +A flutter text to speech plugin + DESC + s.homepage = 'https://github.com/dlutton/flutter_tts' + s.license = { :file => '../LICENSE' } + s.author = { 'tundralabs' => 'eyedea32@gmail.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.ios.deployment_target = '8.0' + s.swift_version = '4.2' + s.static_framework = true +end + diff --git a/flutter_tts-voice_enhancement/lib/flutter_tts.dart b/flutter_tts-voice_enhancement/lib/flutter_tts.dart new file mode 100644 index 00000000..c823a91d --- /dev/null +++ b/flutter_tts-voice_enhancement/lib/flutter_tts.dart @@ -0,0 +1,342 @@ +import 'dart:async'; +import 'dart:io' show Platform; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/services.dart'; + +typedef void ErrorHandler(dynamic message); +typedef ProgressHandler = void Function( + String text, int start, int end, String word); + +const String iosAudioCategoryOptionsKey = 'iosAudioCategoryOptionsKey'; +const String iosAudioCategoryKey = 'iosAudioCategoryKey'; +const String iosAudioCategoryAmbientSolo = 'iosAudioCategoryAmbientSolo'; +const String iosAudioCategoryAmbient = 'iosAudioCategoryAmbient'; +const String iosAudioCategoryPlayback = 'iosAudioCategoryPlayback'; +const String iosAudioCategoryPlaybackAndRecord = + 'iosAudioCategoryPlaybackAndRecord'; + +const String iosAudioCategoryOptionsMixWithOthers = + 'iosAudioCategoryOptionsMixWithOthers'; +const String iosAudioCategoryOptionsDuckOthers = + 'iosAudioCategoryOptionsDuckOthers'; +const String iosAudioCategoryOptionsInterruptSpokenAudioAndMixWithOthers = + 'iosAudioCategoryOptionsInterruptSpokenAudioAndMixWithOthers'; +const String iosAudioCategoryOptionsAllowBluetooth = + 'iosAudioCategoryOptionsAllowBluetooth'; +const String iosAudioCategoryOptionsAllowBluetoothA2DP = + 'iosAudioCategoryOptionsAllowBluetoothA2DP'; +const String iosAudioCategoryOptionsAllowAirPlay = + 'iosAudioCategoryOptionsAllowAirPlay'; +const String iosAudioCategoryOptionsDefaultToSpeaker = + 'iosAudioCategoryOptionsDefaultToSpeaker'; + +enum TextToSpeechPlatform { android, ios } + +enum IosTextToSpeechAudioCategory { + /// Audio is silenced by screen lock and the silent switch; audio will not mix + /// with other apps' audio. + ambientSolo, + + /// Audio is silenced by screen lock and the silent switch; audio will mix + /// with other apps' (mixable) audio. + ambient, + + /// Audio is not silenced by screen lock or silent switch; audio will not mix + /// with other apps' audio. + /// + playback, + + /// The category for recording (input) and playback (output) of audio, + /// such as for a Voice over Internet Protocol (VoIP) app. + /// The default value. + playAndRecord, +} + +enum IosTextToSpeechAudioCategoryOptions { + /// An option that indicates whether audio from this session mixes with audio + /// from active sessions in other audio apps. + mixWithOthers, + + /// An option that reduces the volume of other audio session while audio + /// from this session plays. + duckOthers, + + /// An option that determines whether to pause spoken audio content + /// from other sessions when your app plays its audio. + interruptSpokenAudioAndMixWithOthers, + + ///An option that determines whether Bluetooth hands-free devices + /// appear as available input routes. + allowBluetooth, + + ///An option that determines whether you can stream audio + /// from this session to Bluetooth devices that support the Advanced Audio Distribution Profile (A2DP). + allowBluetoothA2DP, + + ///An option that determines whether you can stream audio + /// from this session to AirPlay devices. + allowAirPlay, + + ///An option that determines whether audio + /// from the session defaults to the built-in speaker instead of the receiver. + /// The default value. + defaultToSpeaker, +} + +class SpeechRateValidRange { + final double min; + final double normal; + final double max; + final TextToSpeechPlatform platform; + + SpeechRateValidRange(this.min, this.normal, this.max, this.platform); +} + +// Provides Platform specific TTS services (Android: TextToSpeech, IOS: AVSpeechSynthesizer) +class FlutterTts { + static const MethodChannel _channel = const MethodChannel('flutter_tts'); + + VoidCallback startHandler; + VoidCallback completionHandler; + VoidCallback pauseHandler; + VoidCallback continueHandler; + VoidCallback cancelHandler; + ProgressHandler progressHandler; + ErrorHandler errorHandler; + + FlutterTts() { + _channel.setMethodCallHandler(platformCallHandler); + } + + /// [Future] which sets speak's future to return on completion of the utterance + Future awaitSpeakCompletion(bool awaitCompletion) async => + _channel.invokeMethod('awaitSpeakCompletion', awaitCompletion); + + /// [Future] which invokes the platform specific method for speaking + Future speak(String text) async => + _channel.invokeMethod('speak', text); + + /// [Future] which invokes the platform specific method for pause + /// ***iOS supported only*** + Future pause() async => _channel.invokeMethod('pause'); + + /// [Future] which invokes the platform specific method for synthesizeToFile + /// ***Android and iOS supported only*** + Future synthesizeToFile(String text, String fileName) async => + _channel.invokeMethod('synthesizeToFile', { + "text": text, + "fileName": fileName, + }); + + /// [Future] which invokes the platform specific method for setLanguage + Future setLanguage(String language) async => + _channel.invokeMethod('setLanguage', language); + + /// [Future] which invokes the platform specific method for setSpeechRate + /// Allowed values are in the range from 0.0 (slowest) to 1.0 (fastest) + Future setSpeechRate(double rate) async => + _channel.invokeMethod('setSpeechRate', rate); + + /// [Future] which invokes the platform specific method for setVolume + /// Allowed values are in the range from 0.0 (silent) to 1.0 (loudest) + Future setVolume(double volume) async => + _channel.invokeMethod('setVolume', volume); + + /// [Future] which invokes the platform specific method for shared instance + /// ***iOS supported only*** + Future setSharedInstance(bool sharedSession) async => + _channel.invokeMethod('setSharedInstance', sharedSession); + + /// [Future] which invokes the platform specific method for setting audio category + /// ***Ios supported only*** + Future setIosAudioCategory(IosTextToSpeechAudioCategory category, + List options) async { + const categoryToString = { + IosTextToSpeechAudioCategory.ambientSolo: iosAudioCategoryAmbientSolo, + IosTextToSpeechAudioCategory.ambient: iosAudioCategoryAmbient, + IosTextToSpeechAudioCategory.playback: iosAudioCategoryPlayback + }; + const optionsToString = { + IosTextToSpeechAudioCategoryOptions.mixWithOthers: + 'iosAudioCategoryOptionsMixWithOthers', + IosTextToSpeechAudioCategoryOptions.duckOthers: + 'iosAudioCategoryOptionsDuckOthers', + IosTextToSpeechAudioCategoryOptions.interruptSpokenAudioAndMixWithOthers: + 'iosAudioCategoryOptionsInterruptSpokenAudioAndMixWithOthers', + IosTextToSpeechAudioCategoryOptions.allowBluetooth: + 'iosAudioCategoryOptionsAllowBluetooth', + IosTextToSpeechAudioCategoryOptions.allowBluetoothA2DP: + 'iosAudioCategoryOptionsAllowBluetoothA2DP', + IosTextToSpeechAudioCategoryOptions.allowAirPlay: + 'iosAudioCategoryOptionsAllowAirPlay', + IosTextToSpeechAudioCategoryOptions.defaultToSpeaker: + 'iosAudioCategoryOptionsDefaultToSpeaker', + }; + if (!Platform.isIOS) return; + try { + return _channel + .invokeMethod('setIosAudioCategory', { + iosAudioCategoryKey: categoryToString[category], + iosAudioCategoryOptionsKey: + options.map((o) => optionsToString[o]).toList(), + }); + } on PlatformException catch (e) { + print( + 'setIosAudioCategory error, category: $category, error: ${e.message}'); + } + } + + /// [Future] which invokes the platform specific method for setPitch + /// 1.0 is default and ranges from .5 to 2.0 + Future setPitch(double pitch) async => + _channel.invokeMethod('setPitch', pitch); + + /// [Future] which invokes the platform specific method for setVoice + /// ***Android, iOS, and macOS supported only*** + Future setVoice(Map voice) async => + _channel.invokeMethod('setVoice', voice); + + /// [Future] which invokes the platform specific method for stop + Future stop() async => _channel.invokeMethod('stop'); + + /// [Future] which invokes the platform specific method for getLanguages + /// Android issues with API 21 & 22 + /// Returns a list of available languages + Future get getLanguages async { + final languages = await _channel.invokeMethod('getLanguages'); + return languages; + } + + /// [Future] which invokes the platform specific method for getEngines + /// Returns a list of installed TTS engines + /// ***Android supported only*** + Future get getEngines async { + final engines = await _channel.invokeMethod('getEngines'); + return engines; + } + + /// [Future] which invokes the platform specific method for getVoices + /// Returns a `List` of `Maps` containing a voice name and locale + /// ***Android, iOS, and macOS supported only*** + Future get getVoices async { + final voices = await _channel.invokeMethod('getVoices'); + return voices; + } + + /// [Future] which invokes the platform specific method for isLanguageAvailable + /// Returns `true` or `false` + Future isLanguageAvailable(String language) async => + _channel.invokeMethod('isLanguageAvailable', language); + + Future get getSpeechRateValidRange async { + final validRange = await _channel.invokeMethod('getSpeechRateValidRange') + as Map; + final min = double.parse(validRange['min'].toString()); + final normal = double.parse(validRange['normal'].toString()); + final max = double.parse(validRange['max'].toString()); + final platformStr = validRange['platform'].toString(); + final platform = TextToSpeechPlatform.values + .firstWhere((e) => describeEnum(e) == platformStr); + + return SpeechRateValidRange(min, normal, max, platform); + } + + /// [Future] which invokes the platform specific method for setSilence + /// 0 means start the utterance immediately. If the value is greater than zero a silence period in milliseconds is set according to the parameter + /// ***Android supported only*** + Future setSilence(int timems) async => + _channel.invokeMethod('setSilence', timems ?? 0); + + void setStartHandler(VoidCallback callback) { + startHandler = callback; + } + + void setCompletionHandler(VoidCallback callback) { + completionHandler = callback; + } + + void setContinueHandler(VoidCallback callback) { + continueHandler = callback; + } + + void setPauseHandler(VoidCallback callback) { + pauseHandler = callback; + } + + void setCancelHandler(VoidCallback callback) { + cancelHandler = callback; + } + + void setProgressHandler(ProgressHandler callback) { + progressHandler = callback; + } + + void setErrorHandler(ErrorHandler handler) { + errorHandler = handler; + } + + /// Platform listeners + Future platformCallHandler(MethodCall call) async { + switch (call.method) { + case "speak.onStart": + if (startHandler != null) { + startHandler(); + } + break; + case "synth.onStart": + if (startHandler != null) { + startHandler(); + } + break; + case "speak.onComplete": + if (completionHandler != null) { + completionHandler(); + } + break; + case "synth.onComplete": + if (completionHandler != null) { + completionHandler(); + } + break; + case "speak.onPause": + if (pauseHandler != null) { + pauseHandler(); + } + break; + case "speak.onContinue": + if (continueHandler != null) { + continueHandler(); + } + break; + case "speak.onCancel": + if (cancelHandler != null) { + cancelHandler(); + } + break; + case "speak.onError": + if (errorHandler != null) { + errorHandler(call.arguments); + } + break; + case 'speak.onProgress': + if (progressHandler != null) { + final args = call.arguments as Map; + progressHandler( + args['text'].toString(), + int.parse(args['start'].toString()), + int.parse(args['end'].toString()), + args['word'].toString(), + ); + } + break; + case "synth.onError": + if (errorHandler != null) { + errorHandler(call.arguments); + } + break; + default: + print('Unknowm method ${call.method}'); + } + } +} diff --git a/flutter_tts-voice_enhancement/lib/flutter_tts_web.dart b/flutter_tts-voice_enhancement/lib/flutter_tts_web.dart new file mode 100644 index 00000000..182e9dfa --- /dev/null +++ b/flutter_tts-voice_enhancement/lib/flutter_tts_web.dart @@ -0,0 +1,184 @@ +import 'dart:async'; +import 'dart:html' as html; +import 'dart:js'; + +import 'package:flutter/services.dart'; +import 'package:flutter_web_plugins/flutter_web_plugins.dart'; + +enum TtsState { playing, stopped, paused, continued } + +class FlutterTtsPlugin { + static const String PLATFORM_CHANNEL = "flutter_tts"; + static MethodChannel channel; + bool awaitSpeakCompletion = false; + + TtsState ttsState = TtsState.stopped; + + get isPlaying => ttsState == TtsState.playing; + + get isStopped => ttsState == TtsState.stopped; + + get isPaused => ttsState == TtsState.paused; + + get isContinued => ttsState == TtsState.continued; + + static void registerWith(Registrar registrar) { + channel = MethodChannel( + PLATFORM_CHANNEL, const StandardMethodCodec(), registrar.messenger); + final instance = FlutterTtsPlugin(); + channel.setMethodCallHandler(instance.handleMethodCall); + } + + html.SpeechSynthesis synth; + html.SpeechSynthesisUtterance utterance; + List voices; + List languages; + + FlutterTtsPlugin() { + utterance = html.SpeechSynthesisUtterance(); + synth = html.window.speechSynthesis; + + _listeners(); + } + + void _listeners() { + utterance.onStart.listen((e) { + ttsState = TtsState.playing; + channel.invokeMethod("speak.onStart", null); + }); + utterance.onEnd.listen((e) { + ttsState = TtsState.stopped; + channel.invokeMethod("speak.onComplete", null); + if (awaitSpeakCompletion) { + return 1; + } + }); + utterance.onPause.listen((e) { + ttsState = TtsState.paused; + channel.invokeMethod("speak.onPause", null); + }); + utterance.onResume.listen((e) { + ttsState = TtsState.continued; + channel.invokeMethod("speak.onContinue", null); + }); + utterance.onError.listen((e) { + channel.invokeMethod("speak.onError", e); + if (awaitSpeakCompletion) { + return 0; + } + }); + } + + Future handleMethodCall(MethodCall call) async { + switch (call.method) { + case 'speak': + final text = call.arguments as String; + _speak(text); + if (!awaitSpeakCompletion) { + return 1; + } + break; + case 'awaitSpeakCompletion': + awaitSpeakCompletion = call.arguments as bool; + return 1; + break; + case 'stop': + _stop(); + return 1; + break; + case 'pause': + _pause(); + return 1; + break; + case 'setLanguage': + final language = call.arguments as String; + _setLanguage(language); + return 1; + break; + case 'getLanguages': + return _getLanguages(); + break; + case 'setSpeechRate': + final rate = call.arguments as num; + _setRate(rate); + return 1; + break; + case 'setVolume': + final volume = call.arguments as num; + _setVolume(volume); + return 1; + break; + case 'setPitch': + final pitch = call.arguments as num; + _setPitch(pitch); + return 1; + break; + case 'isLanguageAvailable': + final lang = call.arguments as String; + return _isLanguageAvailable(lang); + break; + default: + throw PlatformException( + code: 'Unimplemented', + details: "The flutter_tts plugin for web doesn't implement " + "the method '${call.method}'"); + } + } + + void _speak(String text) { + if (ttsState == TtsState.stopped || ttsState == TtsState.paused) { + utterance.text = text; + if (ttsState == TtsState.paused) { + synth.resume(); + } else { + synth.speak(utterance); + } + } + } + + void _stop() { + if (ttsState != TtsState.stopped) { + synth.cancel(); + } + } + + void _pause() { + if (ttsState == TtsState.playing || ttsState == TtsState.continued) { + synth.pause(); + } + } + + void _setRate(num rate) => utterance.rate = rate * 2.0; + void _setVolume(num volume) => utterance.volume = volume; + void _setPitch(num pitch) => utterance.pitch = pitch; + void _setLanguage(String language) => utterance.lang = language; + + bool _isLanguageAvailable(String language) { + if (voices?.isEmpty ?? true) _setVoices(); + if (languages?.isEmpty ?? true) _setLanguages(); + for (var lang in languages) { + if (lang.toLowerCase() == language.toLowerCase()) return true; + } + return false; + } + + List _getLanguages() { + if (voices?.isEmpty ?? true) _setVoices(); + if (languages?.isEmpty ?? true) _setLanguages(); + return languages; + } + + void _setVoices() { + voices = + context['speechSynthesis'].callMethod('getVoices') as JsArray; + } + + void _setLanguages() { + var langs = Set(); + for (var v in voices) { + langs.add(v['lang'] as String); + } + + languages = langs.toList(); + } +} diff --git a/flutter_tts-voice_enhancement/macos/Classes/FlutterTtsPlugin.swift b/flutter_tts-voice_enhancement/macos/Classes/FlutterTtsPlugin.swift new file mode 100644 index 00000000..ec4bffa1 --- /dev/null +++ b/flutter_tts-voice_enhancement/macos/Classes/FlutterTtsPlugin.swift @@ -0,0 +1,315 @@ +import FlutterMacOS +import Foundation +import AVFoundation + +public class FlutterTtsPlugin: NSObject, FlutterPlugin, AVSpeechSynthesizerDelegate { + final var iosAudioCategoryKey = "iosAudioCategoryKey" + final var iosAudioCategoryOptionsKey = "iosAudioCategoryOptionsKey" + + let synthesizer = AVSpeechSynthesizer() + var language: String = AVSpeechSynthesisVoice.currentLanguageCode() + var rate: Float = AVSpeechUtteranceDefaultSpeechRate + var languages = Set() + var volume: Float = 1.0 + var pitch: Float = 1.0 + var voice: AVSpeechSynthesisVoice? + var awaitSpeakCompletion: Bool = false + var speakResult: FlutterResult! + + var channel = FlutterMethodChannel() + init(channel: FlutterMethodChannel) { + super.init() + self.channel = channel + synthesizer.delegate = self + setLanguages() + } + + private func setLanguages() { + for voice in AVSpeechSynthesisVoice.speechVoices(){ + self.languages.insert(voice.language) + } + } + + public static func register(with registrar: FlutterPluginRegistrar) { + let channel = FlutterMethodChannel(name: "flutter_tts", binaryMessenger: registrar.messenger) + let instance = FlutterTtsPlugin(channel: channel) + registrar.addMethodCallDelegate(instance, channel: channel) + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + switch call.method { + case "speak": + let text: String = call.arguments as! String + self.speak(text: text, result: result) + break + case "awaitSpeakCompletion": + self.awaitSpeakCompletion = call.arguments as! Bool + result(1) + break + case "synthesizeToFile": + guard let args = call.arguments as? [String: Any] else { + result("iOS could not recognize flutter arguments in method: (sendParams)") + return + } + let text = args["text"] as! String + let fileName = args["fileName"] as! String + self.synthesizeToFile(text: text, fileName: fileName, result: result) + break + case "pause": + self.pause(result: result) + break + case "setLanguage": + let language: String = call.arguments as! String + self.setLanguage(language: language, result: result) + break + case "setSpeechRate": + let rate: Double = call.arguments as! Double + self.setRate(rate: Float(rate)) + result(1) + break + case "setVolume": + let volume: Double = call.arguments as! Double + self.setVolume(volume: Float(volume), result: result) + break + case "setPitch": + let pitch: Double = call.arguments as! Double + self.setPitch(pitch: Float(pitch), result: result) + break + case "stop": + self.stop() + result(1) + break + case "getLanguages": + self.getLanguages(result: result) + break + case "getSpeechRateValidRange": + self.getSpeechRateValidRange(result: result) + break + case "isLanguageAvailable": + let language: String = call.arguments as! String + self.isLanguageAvailable(language: language, result: result) + break + case "getVoices": + self.getVoices(result: result) + break + case "setVoice": + guard let args = call.arguments as? [String: String] else { + result("iOS could not recognize flutter arguments in method: (sendParams)") + return + } + self.setVoice(voice: args, result: result) + break + default: + result(FlutterMethodNotImplemented) + } + } + + private func speak(text: String, result: @escaping FlutterResult) { + if (self.synthesizer.isPaused) { + if (self.synthesizer.continueSpeaking()) { + if self.awaitSpeakCompletion { + self.speakResult = result + } else { + result(1) + } + } else { + result(0) + } + } else { + let utterance = AVSpeechUtterance(string: text) + if self.voice != nil { + utterance.voice = self.voice! + } else { + utterance.voice = AVSpeechSynthesisVoice(language: self.language) + } + utterance.rate = self.rate + utterance.volume = self.volume + utterance.pitchMultiplier = self.pitch + + self.synthesizer.speak(utterance) + if self.awaitSpeakCompletion { + self.speakResult = result + } else { + result(1) + } + } + } + + private func synthesizeToFile(text: String, fileName: String, result: FlutterResult) { + var output: AVAudioFile? + var failed = false + let utterance = AVSpeechUtterance(string: text) + + if #available(iOS 13.0, *) { + self.synthesizer.write(utterance) { (buffer: AVAudioBuffer) in + guard let pcmBuffer = buffer as? AVAudioPCMBuffer else { + NSLog("unknow buffer type: \(buffer)") + failed = true + return + } + print(pcmBuffer.format) + if pcmBuffer.frameLength == 0 { + // finished + } else { + // append buffer to file + let fileURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(fileName) + NSLog("Saving utterance to file: \(fileURL.absoluteString)") + + if output == nil { + do { + output = try AVAudioFile( + forWriting: fileURL, + settings: pcmBuffer.format.settings, + commonFormat: .pcmFormatInt16, + interleaved: false) + } catch { + NSLog(error.localizedDescription) + failed = true + return + } + } + + try! output!.write(from: pcmBuffer) + } + } + } else { + result("Unsupported iOS version") + } + if failed { + result(0) + } + result(1) + } + + private func pause(result: FlutterResult) { + if (self.synthesizer.pauseSpeaking(at: AVSpeechBoundary.word)) { + result(1) + } else { + result(0) + } + } + + private func setLanguage(language: String, result: FlutterResult) { + if !(self.languages.contains(where: {$0.range(of: language, options: [.caseInsensitive, .anchored]) != nil})) { + result(0) + } else { + self.language = language + self.voice = nil + result(1) + } + } + + private func setRate(rate: Float) { + self.rate = rate + } + + private func setVolume(volume: Float, result: FlutterResult) { + if (volume >= 0.0 && volume <= 1.0) { + self.volume = volume + result(1) + } else { + result(0) + } + } + + private func setPitch(pitch: Float, result: FlutterResult) { + if (volume >= 0.5 && volume <= 2.0) { + self.pitch = pitch + result(1) + } else { + result(0) + } + } + + private func stop() { + self.synthesizer.stopSpeaking(at: AVSpeechBoundary.immediate) + } + + private func getLanguages(result: FlutterResult) { + result(Array(self.languages)) + } + + private func getSpeechRateValidRange(result: FlutterResult) { + let validSpeechRateRange: [String:String] = [ + "min": String(AVSpeechUtteranceMinimumSpeechRate), + "normal": String(AVSpeechUtteranceDefaultSpeechRate), + "max": String(AVSpeechUtteranceMaximumSpeechRate), + "platform": "ios" + ] + result(validSpeechRateRange) + } + + private func isLanguageAvailable(language: String, result: FlutterResult) { + var isAvailable: Bool = false + if (self.languages.contains(where: {$0.range(of: language, options: [.caseInsensitive, .anchored]) != nil})) { + isAvailable = true + } + result(isAvailable); + } + + private func getVoices(result: FlutterResult) { + if #available(iOS 9.0, *) { + let voices = NSMutableArray() + var voiceDict: [String: String] = [:] + for voice in AVSpeechSynthesisVoice.speechVoices() { + voiceDict["name"] = voice.name + voiceDict["locale"] = voice.language + voices.add(voiceDict) + } + result(voices) + } else { + // Since voice selection is not supported below iOS 9, make voice getter and setter + // have the same bahavior as language selection. + getLanguages(result: result) + } + } + + private func setVoice(voice: [String:String], result: FlutterResult) { + if #available(iOS 9.0, *) { + if let voice = AVSpeechSynthesisVoice.speechVoices().first(where: { $0.name == voice["name"]! && $0.language == voice["locale"]! }) { + self.voice = voice + self.language = voice.language + result(1) + return + } + result(0) + } else { + setLanguage(language: voice["name"]!, result: result) + } + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) { + if self.awaitSpeakCompletion { + self.speakResult(1) + } + self.channel.invokeMethod("speak.onComplete", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didStart utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onStart", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didPause utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onPause", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didContinue utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onContinue", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didCancel utterance: AVSpeechUtterance) { + self.channel.invokeMethod("speak.onCancel", arguments: nil) + } + + public func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, willSpeakRangeOfSpeechString characterRange: NSRange, utterance: AVSpeechUtterance) { + let nsWord = utterance.speechString as NSString + let data: [String:String] = [ + "text": utterance.speechString, + "start": String(characterRange.location), + "end": String(characterRange.location + characterRange.length), + "word": nsWord.substring(with: characterRange) + ] + self.channel.invokeMethod("speak.onProgress", arguments: data) + } + +} diff --git a/flutter_tts-voice_enhancement/macos/flutter_tts.podspec b/flutter_tts-voice_enhancement/macos/flutter_tts.podspec new file mode 100644 index 00000000..2838eb07 --- /dev/null +++ b/flutter_tts-voice_enhancement/macos/flutter_tts.podspec @@ -0,0 +1,22 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# +Pod::Spec.new do |s| + s.name = 'flutter_tts' + s.version = '0.0.1' + s.summary = 'macOS implementation of the flutter_tts plugin.' + s.description = <<-DESC + A flutter text to speech plugin + DESC + s.homepage = 'https://github.com/dlutton/flutter_tts' + s.license = { :file => '../LICENSE' } + s.author = { 'Daniel Lutton' => 'eyedea32@gmail.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'FlutterMacOS' + + s.platform = :osx, '10.15' + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } + s.swift_version = '5.0' + + end \ No newline at end of file diff --git a/flutter_tts-voice_enhancement/pubspec.yaml b/flutter_tts-voice_enhancement/pubspec.yaml new file mode 100644 index 00000000..06e93f33 --- /dev/null +++ b/flutter_tts-voice_enhancement/pubspec.yaml @@ -0,0 +1,28 @@ +name: flutter_tts +description: A flutter plugin for Text to Speech. This plugin is supported on iOS, Android, Web, & macOS. +version: 1.3.0 +homepage: https://github.com/dlutton/flutter_tts + +dependencies: + flutter: + sdk: flutter + flutter_web_plugins: + sdk: flutter + +flutter: + plugin: + platforms: + android: + package: com.tundralabs.fluttertts + pluginClass: FlutterTtsPlugin + ios: + pluginClass: FlutterTtsPlugin + macos: + pluginClass: FlutterTtsPlugin + web: + pluginClass: FlutterTtsPlugin + fileName: flutter_tts_web.dart + +environment: + sdk: ">=2.1.0 <3.0.0" + flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/ios/Podfile b/ios/Podfile index 5579d926..d68afba2 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project - platform :ios, '11.0' +# platform :ios, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0d6f024b..b09a4a0c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -462,6 +462,8 @@ PODS: - Flutter - shared_preferences_windows (0.0.1): - Flutter + - sms_otp_auto_verify (0.0.1): + - Flutter - speech_to_text (0.0.1): - Flutter - Try @@ -546,6 +548,7 @@ DEPENDENCIES: - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`) - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`) - shared_preferences_windows (from `.symlinks/plugins/shared_preferences_windows/ios`) + - sms_otp_auto_verify (from `.symlinks/plugins/sms_otp_auto_verify/ios`) - speech_to_text (from `.symlinks/plugins/speech_to_text/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - twilio_programmable_video (from `.symlinks/plugins/twilio_programmable_video/ios`) @@ -683,6 +686,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/shared_preferences_web/ios" shared_preferences_windows: :path: ".symlinks/plugins/shared_preferences_windows/ios" + sms_otp_auto_verify: + :path: ".symlinks/plugins/sms_otp_auto_verify/ios" speech_to_text: :path: ".symlinks/plugins/speech_to_text/ios" sqflite: @@ -784,6 +789,7 @@ SPEC CHECKSUMS: shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae + sms_otp_auto_verify: 201803ac25e13feedaae96eda8b70b10c55b3338 speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7 @@ -804,6 +810,6 @@ SPEC CHECKSUMS: webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 wifi: d7d77c94109e36c4175d845f0a5964eadba71060 -PODFILE CHECKSUM: 5a17be3f8af73a757fa4439c77cf6ab2db29a6e7 +PODFILE CHECKSUM: ac5efa1ac3c9555d0008dc18004313c84746da62 COCOAPODS: 1.10.1 diff --git a/ios/Runner/WifiConnect/GoogleService-Info.plist b/ios/Runner/WifiConnect/GoogleService-Info.plist new file mode 100644 index 00000000..633037cb --- /dev/null +++ b/ios/Runner/WifiConnect/GoogleService-Info.plist @@ -0,0 +1,38 @@ + + + + + CLIENT_ID + 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt + ANDROID_CLIENT_ID + 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com + API_KEY + AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA + GCM_SENDER_ID + 815750722565 + PLIST_VERSION + 1 + BUNDLE_ID + com.HMG.HMG-Smartphone + PROJECT_ID + api-project-815750722565 + STORAGE_BUCKET + api-project-815750722565.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:815750722565:ios:328ec247a81a2ca23c186c + DATABASE_URL + https://api-project-815750722565.firebaseio.com + + \ No newline at end of file diff --git a/key b/key new file mode 100644 index 00000000..15b9f5d1 Binary files /dev/null and b/key differ diff --git a/lib/config/config.dart b/lib/config/config.dart index 3c7e1e9a..6a96b76d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -1,9 +1,7 @@ import 'dart:io'; -import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart'; import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; const MAX_SMALL_SCREEN = 660; @@ -18,11 +16,15 @@ const PACKAGES_ORDERS = '/api/orders'; const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; -//const BASE_PHARMACY_URL = 'http://swd-pharapp-01:7200/api/'; -const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; +// Pharmacy UAT URLs +// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; + +// Pharmacy Production URLs +const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; +const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; @@ -38,38 +40,52 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; - // Wifi Credentials -const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; +const WIFI_CREDENTIALS = + "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; ///Doctor -const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_MY_DOCTOR = + 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; -const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; -const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; +const GET_DOCTOR_RATING_NOTES = + 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; +const GET_DOCTOR_RATING_DETAILS = + 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; ///Prescriptions const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +const GET_PRESCRIPTIONS_ALL_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PRESCRIPTION_REPORT = + 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +const SEND_PRESCRIPTION_EMAIL = + 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +const GET_PRESCRIPTION_REPORT_ENH = + 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; -const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; -const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +const GET_Patient_LAB_SPECIAL_RESULT = + 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +const SEND_LAB_RESULT_EMAIL = + 'Services/Notifications.svc/REST/SendLabReportEmail'; +const GET_Patient_LAB_RESULT = + 'Services/Patients.svc/REST/GetPatientLabResults'; +const GET_Patient_LAB_ORDERS_RESULT = + 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; /// const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; +const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = + 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; -const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; +const GET_PATIENT_ORDERS_DETAILS = + 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; -const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; +const SEND_RAD_REPORT_EMAIL = + 'Services/Notifications.svc/REST/SendRadReportEmail'; ///Feedback const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; @@ -78,17 +94,29 @@ const GET_PATIENT_AppointmentHistory = 'Services' '/Doctors.svc/REST/PateintHasAppoimentHistory'; ///VITAL SIGN -const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +const GET_PATIENT_VITAL_SIGN = + 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; ///Er Nearest -const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; +const GET_NEAREST_HOSPITAL = + 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; + +///ED Online +const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; +const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; +const ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; ///Er Nearest -const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; -const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_AMBULANCE_REQUEST = + 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +const GET_PATIENT_ALL_PRES_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = + 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +const UPDATE_PRESS_ORDER = + 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; +const INSERT_ER_INERT_PRES_ORDER = + 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; ///FindUs const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; @@ -97,13 +125,15 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; ///babyInformation -const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; +const GET_BABYINFORMATION_REQUEST = + 'Services/Community.svc/REST/GetBabyByUserID'; ///Get Baby By User ID const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; +const GET_USERINFORMATION_REQUEST = + 'Services/Community.svc/REST/GetUserInformation_New'; ///Update email const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; @@ -125,16 +155,29 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; ///BloodDetails -const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; +const GET_BLOOD_REQUEST = + 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; + +const SAVE_BLOOD_REQUEST = + 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; + +const GET_BLOOD_AGREEMENT = + 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; +const SAVE_BLOOD_AGREEMENT = + 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; ///Reports const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; -const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; -const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; +const INSERT_REQUEST_FOR_MEDICAL_REPORT = + 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; +const SEND_MEDICAL_REPORT_EMAIL = + 'Services/Notifications.svc/REST/SendMedicalReportEmail'; ///Rate -const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; -const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; +const IS_LAST_APPOITMENT_RATED = + 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; +const GET_APPOINTMENT_DETAILS_BY_NO = + 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; @@ -146,7 +189,8 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; //URL to get active appointment list -const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; +const GET_ACTIVE_APPOINTMENTS_LIST_URL = + "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; //URL to get projects list const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; @@ -155,86 +199,115 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; //URL to dental doctors list -const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; +const GET_DENTAL_DOCTORS_LIST_URL = + "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; //URL to get doctor free slots const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; //URL to insert appointment -const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; +const INSERT_SPECIFIC_APPOINTMENT = + "Services/Doctors.svc/REST/InsertSpecificAppointment"; //URL to get patient share -const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; +const GET_PATIENT_SHARE = + "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; +const GET_PATIENT_APPOINTMENT_HISTORY = + "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; //URL to get patient appointment curfew history -const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; +const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = + "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; //URL to confirm appointment -const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; +const CONFIRM_APPOINTMENT = + "Services/MobileNotifications.svc/REST/ConfirmAppointment"; -const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; +const INSERT_VIDA_REQUEST = + "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; //URL to cancel appointment const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; //URL get appointment QR -const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; +const GENERATE_QR_APPOINTMENT = + "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; //URL send email appointment QR -const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; +const EMAIL_QR_APPOINTMENT = + "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; //URL check payment status -const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; +const CHECK_PAYMENT_STATUS = + "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; //URL create advance payment const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; -const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; +const HIS_CREATE_ADVANCE_PAYMENT = + "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; -const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; +const ADD_ADVANCE_NUMBER_REQUEST = + 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; -const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; +const IS_ALLOW_ASK_DOCTOR = + 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_CALL_REQUEST_TYPE = + 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +const ADD_VIDA_REQUEST = + 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; -const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; -const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; +const GET_LIVECARE_CLINICS = + 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; -const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; +const GET_LIVECARE_SCHEDULE_CLINICS = + 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; -const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; +const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = + 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; -const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; +const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = + 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; -const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; +const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = + 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; -const GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; +const GET_PATIENT_SHARE_LIVECARE = + "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; -const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; +const GET_LIVECARE_CLINIC_TIMING = + 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; -const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; +const GET_ER_APPOINTMENT_FEES = + 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; -const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; +const ADD_NEW_CALL_FOR_PATIENT_ER = + 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; -const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; -const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; -const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; +const GET_LIVECARE_HISTORY = + 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; +const CANCEL_LIVECARE_REQUEST = + 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; +const SEND_LIVECARE_INVOICE_EMAIL = + 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; -const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; +const UPDATE_HEALTH_TERMS = + 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; -const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; +const GET_PATIENT_HEALTH_STATS = + 'Services/Patients.svc/REST/Med_GetTransactionsSts'; //URL to get medicine and pharmacies list const CHANNEL = 3; const GENERAL_ID = 'Cs2020@2016\$2958'; const IP_ADDRESS = '10.20.10.20'; -const VERSION_ID = 6.1; +const VERSION_ID = 8.8; const SETUP_ID = '91877'; const LANGUAGE = 2; const PATIENT_OUT_SA = 0; @@ -243,20 +316,27 @@ const IS_DENTAL_ALLOWED_BACKEND = false; const PATIENT_TYPE = 1; const PATIENT_TYPE_ID = 1; var DEVICE_TOKEN = ""; +var IS_VOICE_COMMAND_CLOSED = false; +var IS_TEXT_COMPLETED = false; var DeviceTypeID = Platform.isIOS ? 1 : 2; const LANGUAGE_ID = 1; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; -const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; +const GET_PAtIENTS_INSURANCE = + "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; +const GET_PAtIENTS_INSURANCE_UPDATED = + "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; +const GET_PATIENT_INSURANCE_DETAILS = + "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +const UPLOAD_INSURANCE_CARD = + 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; -const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; +const GET_PAtIENTS_INSURANCE_APPROVALS = + "Services/Patients.svc/REST/GetApprovalStatus"; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; @@ -266,48 +346,81 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; -const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; -const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; -const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; -const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; -const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; +const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = + 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; +const GET_PATIENT_INFO_BY_ID = + 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; +const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = + 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; +const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = + 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; +const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = + 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; -const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; +const GET_COVID_DRIVETHRU_PROJECT_LIST = + 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; +const GET_COVID_DRIVETHRU_PAYMENT_INFO = + 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; -const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +const GET_COVID_DRIVETHRU_FREE_SLOTS = + 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; ///Smartwatch Integration Services -const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; +const GET_PATIENT_LAST_RECORD = + 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; ///My Trackers -const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; -const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; -const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; -const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; -const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; -const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; - -const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; -const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; -const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; -const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; -const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; -const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; -const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; - -const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; -const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; -const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; - -const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; -const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; - -const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; - -const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; -const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +const GET_DIABETIC_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; +const GET_DIABTEC_RESULT = + 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; +const ADD_DIABTEC_RESULT = + 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; + +const GET_BLOOD_PRESSURE_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; +const GET_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; +const ADD_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; + +const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; +const GET_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; +const ADD_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; + +const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = + 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; + +const GET_CALL_INFO_HOURS_RESULT = + 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; +const GET_CALL_REQUEST_TYPE_LOV = + 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; + +const UPDATE_DIABETIC_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; + +const SEND_AVERAGE_BLOOD_SUGAR_REPORT = + 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; +const DEACTIVATE_DIABETIC_STATUS = + 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; +const DEACTIVATE_BLOOD_PRESSURES_STATUS = + 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; + +const UPDATE_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; +const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = + 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; +const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = + 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; + +const UPDATE_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; +const DEACTIVATE_WEIGHT_PRESSURE_RESULT = + 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; @@ -315,25 +428,41 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; // H2O -const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; -const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; -const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; -const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; -const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; +const H2O_GET_USER_PROGRESS = + "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; +const H2O_INSERT_USER_ACTIVITY = + "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; +const H2O_GET_USER_DETAIL = + "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; +const H2O_UPDATE_USER_DETAIL = + "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; +const H2O_UNDO_USER_ACTIVITY = + "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; //E_Referral Services -const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; -const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; -const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; +const GET_ALL_RELATIONSHIP_TYPES = + "Services/Patients.svc/REST/GetAllRelationshipTypes"; +const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = + 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; +const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = + 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; +// Encillary Orders + +const GET_ANCILLARY_ORDERS = + 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; + +const GET_ANCILLARY_ORDERS_DETAILS = + 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; + //Pharmacy wishlist // const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; // pharmacy -const PHARMACY_AUTORZIE_CUSTOMER = "epharmacy/api/AutorizeCustomer"; +const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; const PHARMACY_GET_COUNTRY = "countries"; const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; @@ -354,32 +483,51 @@ const GET_Cancel_ORDER = "cancelorder/"; const WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; const GET_SHOPPING_CART = "shopping_cart_items/"; const GET_SHIPPING_OPTIONS = "get_shipping_option/"; -const DELETE_SHOPPING_CART = "epharmacy/api/delete_shopping_cart_items/"; +const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; -const ORDER_SHOPPING_CART = "epharmacy/api/orders"; -const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; -const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; -const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; -const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; -const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; -const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; -const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; +const ORDER_SHOPPING_CART = "orders"; +const GET_LACUM_ACCOUNT_INFORMATION = + "Services/Patients.svc/REST/GetLakumAccountInformation"; +const GET_LACUM_GROUP_INFORMATION = + "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; +const LACUM_ACCOUNT_ACTIVATE = + "Services/Patients.svc/REST/LakumAccountActivation"; +const LACUM_ACCOUNT_DEACTIVATE = + "Services/Patients.svc/REST/LakumAccountDeactivation"; +const CREATE_LAKUM_ACCOUNT = + "Services/Patients.svc/REST/PHR_CreateLakumAccount"; +const TRANSFER_YAHALA_LOYALITY_POINTS = + "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; +const LAKUM_GET_USER_TERMS_AND_CONDITIONS = + "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; +const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; // Home Health Care -const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +const HHC_GET_ALL_SERVICES = + "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +const HHC_GET_ALL_CMC_SERVICES = + "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +const PATIENT_ER_UPDATE_PRES_ORDER = + "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +const GET_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +const GET_CMC_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; -const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; -const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; -const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = + 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; +const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = + 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; +const GET_PATIENT_ALL_PRES_ORD = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const PATIENT_ER_INSERT_PRES_ORDER = + 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews'; -const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +const BLOOD_DONATION_REGISTER_BLOOD_TYPE = + 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = + 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; //Pharmacy wishlist const GET_WISHLIST = "shopping_cart_items/"; @@ -390,25 +538,33 @@ const GET_TOP_BRANDS = "topmanufacturer?page=1&limit=8"; const GET_PRODUCT_DETAIL = "products/"; const GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; const GET_SPECIFICATION = "productspecification/"; -const GET_BRAND_ITEMS = "products?ManufacturerId="; +const GET_BRAND_ITEMS = "products"; // External API -const ADD_ADDRESS_INFO = "https://mdlaboratories.com/exacartapi/api/addcustomeraddress"; -const GET_CUSTOMER_ADDRESSES = "https://mdlaboratories.com/exacartapi/api/Customers/"; -const GET_CUSTOMER_INFO = "https://mdlaboratories.com/exacartapi/api/VerifyCustomer"; +const ADD_ADDRESS_INFO = + "addcustomeraddress"; +const GET_CUSTOMER_ADDRESSES = + "Customers/"; +const GET_CUSTOMER_INFO = + "VerifyCustomer"; //Pharmacy -const GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; +const GET_PHARMACY_CATEGORISE = + 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; const GET_OFFERS_CATEGORISE = 'discountcategories'; const GET_OFFERS_PRODUCTS = 'offerproducts/'; -const GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +const GET_CATEGORISE_PARENT = + 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; const GET_PARENT_PRODUCTS = 'products?categoryid='; -const GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +const GET_SUB_CATEGORISE = + 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; const GET_SUB_PRODUCTS = 'products?categoryid='; const GET_FINAL_PRODUCTS = - 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; -const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; + 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; +const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; +const GET_DISEASE_BY_CLINIC_ID = + 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const TIMER_MIN = 10; @@ -422,6 +578,8 @@ const GET_SEARCH_PRODUCTS = const SCAN_QR_CODE = 'productbysku/'; +const FILTERED_PRODUCTS = 'products?categoryids='; + class AppGlobal { static var context; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index fa4d06f7..6e2bc9ad 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -2,32 +2,45 @@ // Used for Native through Platform Method Channel // --------- - -- - - - - - - - - ---------------- const Map platformLocalizedValues = { - "errorConnectingHmgNetwork": {"en": "Sorry you are not connecting to HMG network", "ar": "نعتذر لست متصل في شكبة مستشفى د.سليمان الحبيب"}, + "errorConnectingHmgNetwork": { + "en": "Sorry you are not connecting to HMG network", + "ar": "نعتذر لست متصل في شكبة مستشفى د.سليمان الحبيب" + }, "successConnectingHmgNetwork": { "en": "You connected to HMG network successfully, you can access the app", - "ar": "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب" + "ar": + "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب" }, "failedConnectingHmgNetwork": { - "en": "Sorry the connection to HMG network had been failed, make sure you are in range of HMG network", - "ar": "نعتذر لقد فشل الاتصال بشبكة د.سليمان الحبيب, تاكد من وجودك داخل نطاق الشبكة" + "en": + "Sorry the connection to HMG network had been failed, make sure you are in range of HMG network", + "ar": + "نعتذر لقد فشل الاتصال بشبكة د.سليمان الحبيب, تاكد من وجودك داخل نطاق الشبكة" }, "alreadyConnectedHmgNetwork": { "en": " You already connected to HMG network to access Alhabib app", "ar": "انت متصل مسبقاً بالشبكة تستطيع استخدام تطبيق الحبيب" }, - "somethingWentWrong": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر لخدمتكم يرجى المحاولة لاحقا"}, + "somethingWentWrong": { + "en": "Sorry something went wrong please try again later", + "ar": "نعتذر لخدمتكم يرجى المحاولة لاحقا" + }, "enablingWifi": {"en": "Enabling wifi...", "ar": "Enabling wifi..."}, "connectedHmgNetworkWithInternet": { "en": "Successfully connected to the HMG network to access internet", "ar": "Successfully connected to the HMG network to access internet" }, "connectedToHmgNetworkWithNoInternet": { - "en": "Successfully connected to the HMG network but it have no internet access", - "ar": "Successfully connected to the HMG network but it have no internet access" + "en": + "Successfully connected to the HMG network but it have no internet access", + "ar": + "Successfully connected to the HMG network but it have no internet access" }, "notConnectedToHmgNetworkSecurityIssue": { - "en": "We are not able to connect you to HMG network due to security reasons", - "ar": "We are not able to connect you to HMG network due to security reasons" + "en": + "We are not able to connect you to HMG network due to security reasons", + "ar": + "We are not able to connect you to HMG network due to security reasons" } }; @@ -54,7 +67,10 @@ const Map localizedValues = { 'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'}, 'doctorName': {'en': 'Doctor Name', 'ar': 'إسم الطبيب'}, 'nearestAppo': {'en': 'Nearest appointment', 'ar': 'أقرب موعد'}, - 'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'}, + 'searchByDocText': { + 'en': 'Type the name of the doctor to help you find him', + 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه' + }, 'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'}, 'search': {'en': 'Search', 'ar': 'بحث'}, 'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'}, @@ -64,11 +80,17 @@ const Map localizedValues = { 'gender': {'en': 'Gender', 'ar': 'الجنس'}, 'nationality': {'en': 'Nationality', 'ar': 'الجنسية'}, 'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'}, - 'confirmAppoHeading': {'en': 'Kindly confirm your Appointment', 'ar': 'يرجى تأكيد موعدك'}, + 'confirmAppoHeading': { + 'en': 'Kindly confirm your Appointment', + 'ar': 'يرجى تأكيد موعدك' + }, 'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'}, 'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'}, 'patientShare': {'en': 'Patient Share', 'ar': 'المبلغ المستحق'}, - 'patientShareWithTax': {'en': 'Patient Share with Tax', 'ar': 'المبلغ الإجمالي المستحق'}, + 'patientShareWithTax': { + 'en': 'Patient Share with Tax', + 'ar': 'المبلغ الإجمالي المستحق' + }, 'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'}, 'confirm': {'en': 'Confirm', 'ar': 'تأكيد'}, 'confirmLiveCare': {'en': 'Confirm LiveCare', 'ar': 'تأكيد لايف كير'}, @@ -85,25 +107,46 @@ const Map localizedValues = { 'instruction': {'en': 'Instructions', 'ar': 'تعليمات'}, 'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'}, 'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'}, - 'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, + 'cancelAppoMsg': { + 'en': 'Are you sure you want to cancel this appointment?', + 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟' + }, - 'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'}, - 'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'}, + 'upcoming-noAction': { + 'en': 'No Action Required', + 'ar': 'لا يوجد إجراء مطلوب' + }, + 'upcoming-confirm': { + 'en': 'Please confirm the appointment to avoid cancellation', + 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء' + }, "book-success-confirm-more-24-1-2": { - "en": "The online payment process will be available 24 hours before the appointment.", + "en": + "The online payment process will be available 24 hours before the appointment.", "ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة." }, 'upcoming-payment-pending': { - 'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', + 'en': + 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز' }, - 'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي الانتظار'}, - 'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'}, + 'upcoming-payment-now': { + 'en': 'Pay Online now to avoid long waiting queue', + 'ar': 'ادفع الآن لتفادي الانتظار' + }, + 'upcoming-QR': { + 'en': 'Use the QR Code to Check-In in hospital', + 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى' + }, 'upcoming-virtual': { - 'en': 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', + 'en': + 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.' }, - 'upcoming-livecare': {'en': 'This is a LiveCare appointment', 'ar': 'هذا موعد لايف كير'}, + 'upcoming-livecare': { + 'en': 'This is a LiveCare appointment', + 'ar': 'هذا موعد لايف كير' + }, 'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'}, 'reschedule': {'en': 'Reschedule', 'ar': 'إعادة جدولة'}, 'raise': {'en': 'Raise', 'ar': 'رفع'}, @@ -120,21 +163,42 @@ const Map localizedValues = { 'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'}, 'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'}, "welcome": {"en": "Welcome", "ar": "مرحبا"}, - "welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"}, - 'welcome_text2': {'en': 'Have you visited AlHabib Medical Group before? ', 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'}, + "welcome_text": { + "en": "Dr. Sulaiman Al Habib Mobile Application", + "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك" + }, + 'welcome_text2': { + 'en': 'Have you visited AlHabib Medical Group before? ', + 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟' + }, 'yes': {'en': 'Yes', 'ar': 'نعم'}, 'no': {'en': 'No', 'ar': 'لا'}, - "logintyperadio": {"en": "Choose from below options to login to your medical file.", "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."}, + "logintyperadio": { + "en": "Choose from below options to login to your medical file.", + "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي." + }, "registernow": {"en": "Register Now", "ar": "تسجيل الان"}, - "nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"}, + "nationalID": { + "en": "Enter the Identification Number", + "ar": "أدخل رقم الهوية الوطنية او الاقامة" + }, "national-id": {"en": "National ID", "ar": "رقم الهوية"}, "fileNo": {"en": "File Number", "ar": "رقم الملف"}, "fileno": {"en": "File No", "ar": "رقم الملف"}, "forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"}, - "forgotFileNoTitle": {"en": "Forgot medical file Number", "ar": "نسيت رقم الملف"}, + "forgotFileNoTitle": { + "en": "Forgot medical file Number", + "ar": "نسيت رقم الملف" + }, - "enter-national-id": {"en": "Please enter mobile number and identification number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"}, - "profile-info": {"en": "Please enter profile information", "ar": "الرجاء إدخال معلومات الملف الشخصي"}, + "enter-national-id": { + "en": "Please enter mobile number and identification number", + "ar": "الرجاء إدخال رقم الجوال ورقم الهوية" + }, + "profile-info": { + "en": "Please enter profile information", + "ar": "الرجاء إدخال معلومات الملف الشخصي" + }, "submit": {"en": "Submit", "ar": "ارسال"}, "forgot-desc": { "en": "Enter the mobile number to receive the Medical file Number via SMS", @@ -143,7 +207,10 @@ const Map localizedValues = { "dob": {"en": "Birth Date:", "ar": "تاريخ الميلاد"}, "hijri-date": {"en": "Hijri Date", "ar": "التاريخ الهجري"}, "gregorian-date": {"en": "Gregorian Date", "ar": "التاريخ الميلادي"}, - "verify-login-with": {"en": "Please choose one of the following options to verify", "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات"}, + "verify-login-with": { + "en": "Please choose one of the following options to verify", + "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات" + }, "register-user": {"en": "Register", "ar": "تسجيل"}, "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, "verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"}, @@ -152,19 +219,33 @@ const Map localizedValues = { "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "verify-fingerprint": { - "en": "To activate the fingerprint login service, please verify data by using one of the following options.", - "ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" + "en": + "To activate the fingerprint login service, please verify data by using one of the following options.", + "ar": + "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" }, 'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'}, 'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدلايات'}, - 'searchMedicineHere': {'en': 'Search Medicine Here', 'ar': 'ابحث عن الدواء هنا'}, + 'searchMedicineHere': { + 'en': 'Search Medicine Here', + 'ar': 'ابحث عن الدواء هنا' + }, 'description': {'en': 'Description', 'ar': 'الوصف'}, 'howToUse': {'en': 'How to Use', 'ar': 'طريقة الأستخدام'}, 'price': {'en': 'Price', 'ar': 'السعر'}, 'youCanFindItIn': {'en': 'You can find it in', 'ar': 'يمكنكة ان تجده في'}, - 'pleaseEnterMedicineName': {'en': 'Please Enter Medicine Name', 'ar': 'الرجائ ادخال اسم الدواء'}, - "verification_message": {"en": "Please enter the Verification Code sent to", "ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى"}, - "validation_message": {"en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال"}, + 'pleaseEnterMedicineName': { + 'en': 'Please Enter Medicine Name', + 'ar': 'الرجائ ادخال اسم الدواء' + }, + "verification_message": { + "en": "Please enter the Verification Code sent to", + "ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى" + }, + "validation_message": { + "en": "The verification code expires in", + "ar": "تنتهي صلاحية رمز التحقق خلال" + }, "arabic-change": {"en": "عربي", "ar": "English"}, "notification": {"en": "Notifications", "ar": "إشعارات"}, "app-settings": {"en": "App Settings", "ar": "إعدادات التطبيق"}, @@ -172,32 +253,63 @@ const Map localizedValues = { "before": {"en": "Before", "ar": "قبل"}, "minute": {"en": "Minutes", "ar": "دقيقة"}, "hour": {"en": "Hour", "ar": "ساعة"}, - "reminderSuccess": {"en": "The reminder has been added successfully", "ar": "يضاف التذكير بنجاح"}, - "patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, + "reminderSuccess": { + "en": "The reminder has been added successfully", + "ar": "يضاف التذكير بنجاح" + }, + "patientShareToDo": { + "en": "Amount before tax: ", + "ar": "المبلغ قبل الضريبة:" + }, "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, - "patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"}, + "patientShareTotalToDo": { + "en": "Total amount Due: ", + "ar": "المبلغ الإجمالي المستحق:" + }, 'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'}, - 'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'}, - 'useQRAppoAttend': {'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'}, + 'noNeedToWaitInLine': { + 'en': 'No need to stand in line.', + 'ar': 'لا داعي للوقوف في الطابور.' + }, + 'useQRAppoAttend': { + 'en': 'Use the QR code to register the appointment attendance.', + 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.' + }, 'passQRAppoAttend': { - 'en': 'Pass the QR code through the attendance devices available in the Hospital.', + 'en': + 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.' }, - 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, - 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, + 'sitWaitingQR': { + 'en': 'Sit in the waiting rooms until called by the nurse.', + 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.' + }, + 'attendRegisterCode': { + 'en': 'Attendance registration code', + 'ar': 'رمز تسجيل الحضور' + }, 'scanQRHospital': { 'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى' }, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"}, - "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"}, - "EmailSentError": {"en": "Error Sending Email", "ar": "خطأ في إرسال البريد الإلكتروني"}, + "EmailSentSuccessfully": { + "en": "Email Sent Successfully", + "ar": "تم إرسال البريد الإلكتروني بنجاح" + }, + "EmailSentError": { + "en": "Error Sending Email", + "ar": "خطأ في إرسال البريد الإلكتروني" + }, "close": {"en": "Close", "ar": "مغلق"}, "booked": {"en": "Booked", "ar": "محجوز"}, "confirmed": {"en": "Confirmed", "ar": "مؤكد"}, "arrived": {"en": "Arrived", "ar": "تم الحضور"}, - "payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"}, + "payNowBookSuccess": { + "en": "Pay now via Al Habib App", + "ar": "ادفع الآن عبر تطبيق الحبيب" + }, "payNowBookSuccesstext1": { "en": "Pay Now using online payment service From secure payment gateways", "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة" @@ -211,9 +323,15 @@ const Map localizedValues = { 'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط' }, - "more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"}, + "more-verify": { + "en": "More Verification Options", + "ar": "المزيد من خيارات التحقق" + }, "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"}, - "account-info": {"en": "Would you like to login with current username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"}, + "account-info": { + "en": "Would you like to login with current username?", + "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟" + }, "another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"}, "next": {"en": "Next", "ar": 'التالى'}, "first-name": {"en": "First Name", "ar": "الاسم الأول"}, @@ -224,7 +342,10 @@ const Map localizedValues = { "preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"}, "english": {"en": "English", "ar": "الإنجليزية"}, "arabic": {"en": "Arabic", "ar": "العربية"}, - "locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"}, + "locations-register": { + "en": "Where do you want to create this file?", + "ar": "أين تريد فتح هذا الملف؟" + }, "ksa": {"en": "KSA", "ar": "السعودية"}, "dubai": {"en": "Dubai", "ar": "دبي"}, "enter-email": {"en": "Please Enter Email", "ar": "ادخل البريد الالكتروني"}, @@ -244,7 +365,7 @@ const Map localizedValues = { 'painScale': {'en': 'Pain Scale', 'ar': 'مقياس الألم'}, 'weight': {'en': 'Weight', 'ar': 'الوزن'}, 'height': {'en': 'Height', 'ar': 'الطول'}, - 'heart': {'en': 'Heart', 'ar': 'قلب'}, + 'heart': {'en': 'Heart Rate', 'ar': 'معدل النبض'}, "heightUnit": {"en": "height unit", "ar": "وحدة الطول"}, "weightUnit": {"en": "Weight Unit", "ar": "وحدة الوزن"}, "request": {"en": "Request", "ar": "طلبات الاضافة"}, @@ -264,7 +385,10 @@ const Map localizedValues = { "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, "usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"}, "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "}, - "totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"}, + "totalApproval": { + "en": "Total approval unused", + "ar": "اجمالي الموافقات الغير مستخدمة" + }, "category": {"en": "Category: ", "ar": "الفئة"}, "expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"}, "patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"}, @@ -272,35 +396,70 @@ const Map localizedValues = { "seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"}, "insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, "requestType": {"en": "Request Type", "ar": "نوع الاستفسار"}, - "register-info-family": {"en": "How would like to add the new member?", "ar": "كيف ترغب باضافة العضو الجديد؟"}, - "remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"}, + "register-info-family": { + "en": "How would like to add the new member?", + "ar": "كيف ترغب باضافة العضو الجديد؟" + }, + "remove-family-member": { + "en": "Remove this member?", + "ar": "إزالة ملف العضو؟" + }, "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'}, - "myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'}, + "myMedicalFileSubTitle": { + "en": "All your medical records", + 'ar': 'جميع سجلاتك الطبية' + }, "viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, - "homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'}, + "homeHealthCareService": { + "en": "Home Health Care Service", + 'ar': 'الرعاية الصحية المنزلية' + }, "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'}, "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, - "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتدوني'}, - "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, - "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل'}, + "OnlinePaymentService": { + "en": "Online Payment Service", + 'ar': 'خدمة الدفع الإلكتدوني' + }, + "OffersAndPackages": { + "en": "Online transfer request", + 'ar': 'طلب التحويل الالكتروني' + }, + "ComprehensiveMedicalCheckup": { + "en": "Comprehensive Medical Check up", + 'ar': 'فحص طبي شامل' + }, "HMGService": {"en": "HMG Service", 'ar': 'جميع خدمات الحبيب'}, - "ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'}, + "ViewAllHabibMedicalService": { + "en": "View All Habib Medical Service", + 'ar': 'عرض خدمات الحبيب الطبية' + }, "viewAll": {"en": "View All", 'ar': 'عرض الكل'}, "view": {"en": "View", 'ar': 'عرض'}, "ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'}, - "ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'}, + "ViewAllWaysReachUs": { + "en": "View All Ways Reach Us", + 'ar': 'جميع طرق الاتصال بنا' + }, "medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'}, "consultation": {"en": "Consultation", "ar": "استشارة"}, "logs": {"en": "Logs", "ar": "السجلات"}, "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"}, "locationDialogMessage": { - "en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", - "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." + "en": + "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", + "ar": + "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." }, - "user-view-requester": {"en": "User Wants To View Your Medical File", "ar": "أشخاص يرغبون الاطلاع على ملفك الطبي"}, - "user-view": {"en": "User Can View Your Medical File", "ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي"}, + "user-view-requester": { + "en": "User Wants To View Your Medical File", + "ar": "أشخاص يرغبون الاطلاع على ملفك الطبي" + }, + "user-view": { + "en": "User Can View Your Medical File", + "ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي" + }, "parking": {"en": "Parking", "ar": "مواقف"}, "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"}, @@ -323,9 +482,18 @@ const Map localizedValues = { "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "requestA": {"en": "Request:", "ar": "اسعاف"}, "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"}, - "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, - "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, - "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"}, + "NoBookedAppointments": { + "en": "No Booked Appointments", + "ar": "لا توجد مواعيد محجوزة" + }, + "NoConfirmedAppointments": { + "en": "No Confirmed Appointments", + "ar": "لا توجد مواعيد مؤكدة" + }, + "noArrivedAppointments": { + "en": "No Arrived Appointments", + "ar": "لم تصل المواعيد" + }, "MyAppointmentsList": {"en": "List", "ar": "قائمة بمواعدي"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, @@ -384,10 +552,19 @@ const Map localizedValues = { "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"}, "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"}, "km": {"en": "KMs:", "ar": "كم"}, - "PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"}, - "ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions Report", "ar": " عرض الشروط والأحكام "}, + "PatientHealthSummaryReport": { + "en": "Patient Health Summary Report", + "ar": " ملخص التقارير الشهرية" + }, + "ToViewTheTermsAndConditions": { + "en": "To View The Terms And Conditions Report", + "ar": " عرض الشروط والأحكام " + }, "ClickHere": {"en": "Click here", "ar": "أنقر هنا"}, - "IAgreeToTheTermsAndConditions": {"en": "I agree to the terms and conditions ", "ar": "أوافق على الشروط والاحكام "}, + "IAgreeToTheTermsAndConditions": { + "en": "I agree to the terms and conditions ", + "ar": "أوافق على الشروط والاحكام " + }, "IAgreeToTheTermsAndConditionsSubtitle": { "en": "I agree to the terms and conditions ", "ar": @@ -396,23 +573,34 @@ const Map localizedValues = { "Save": {"en": "Save", "ar": "حفظ "}, "UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "}, "UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"}, - "CHECK_VACCINE_AVAILABILITY": {"en": "CHECK VACCINE AVAILABILITY", "ar": "تحقق من توافر اللقاح"}, - "MyVaccinesAvailability": {"en": "MyVaccinesAvailability", "ar": "توفر لقاحي"}, + "CHECK_VACCINE_AVAILABILITY": { + "en": "CHECK VACCINE AVAILABILITY", + "ar": "تحقق من توافر اللقاح" + }, + "MyVaccinesAvailability": { + "en": "MyVaccinesAvailability", + "ar": "توفر لقاحي" + }, "PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"}, "PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, "OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"}, "MyBalances": {"en": "My Balances", "ar": "رصيدي"}, - "BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"}, - "TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"}, - "CreateAdvancedPayment": {"en": "Create Advanced Payment", "ar": "إنشاء دفعة مقدمة"}, + "BalanceAmount": {"en": "Wallet Amount", "ar": "مبلغ المحفظة"}, + "TotalBalance": {"en": "Total Amount", "ar": "المبلغ الإجمالي"}, + "CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "إعادة شحن المحفظة"}, + "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, "AdvancePaymentLabel": { - "en": "You can create and add an Advanced Payment for you account or other accounts.", + "en": + "You can create and add an Advanced Payment for you account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين" }, "FileNumber": {"en": "File Number", "ar": "رقم الملف"}, "Amount": {"en": "Amount *", "ar": "المبلغ *"}, - "DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"}, + "DepositorEmail": { + "en": "Depositor Email *", + "ar": "البريد الإلكتروني للمودع *" + }, "Notes": {"en": "Notes", "ar": "ملاحظات"}, "SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المريض"}, "SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"}, @@ -425,10 +613,22 @@ const Map localizedValues = { "DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"}, "MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"}, "Ok": {"en": "Ok", "ar": "حسنا"}, - "WaterConsumedInWeek": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"}, - "WaterConsumedInMonth": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"}, - "TheVerificationCodeExpiresIn": {"en": "The Verification Code Expires In", "ar": "تنتهي صلاحية رمز التحقق في"}, - "PleaseEnterTheVerificationCode": {"en": "Please enter the verification code send to", "ar": "الرجاء إدخال رمز التحقق المرسل إلى"}, + "WaterConsumedInWeek": { + "en": "Water consumed in a week", + "ar": "معدل شرب الماء خلال الاسبوع" + }, + "WaterConsumedInMonth": { + "en": "Water consumed in a month", + "ar": "معدل شرب الماء خلال الشهر" + }, + "TheVerificationCodeExpiresIn": { + "en": "The Verification Code Expires In", + "ar": "تنتهي صلاحية رمز التحقق في" + }, + "PleaseEnterTheVerificationCode": { + "en": "Please enter the verification code send to", + "ar": "الرجاء إدخال رمز التحقق المرسل إلى" + }, "EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"}, "Measurements": {"en": "Measurements", "ar": "قياسات"}, "Classes": {"en": "Classes", "ar": "نظارات"}, @@ -451,8 +651,10 @@ const Map localizedValues = { "DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"}, "AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"}, "reminderDes": { - "en": "Please select treatment start day and time to be notified when it\'s time to take the medicine", - "ar": " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" + "en": + "Please select treatment start day and time to be notified when it\'s time to take the medicine", + "ar": + " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" }, "StartDay": {"en": "Start Day", "ar": "يوم البداية"}, "EndDay": {"en": "End Day", "ar": "يوم الانتهاء"}, @@ -462,12 +664,24 @@ const Map localizedValues = { "DoctorResponses": {"en": "Doctor Responses", "ar": "ردود الأطباء"}, "New": {"en": "New", "ar": "جديد"}, "All": {"en": "All", "ar": "الكل"}, - "QuestionHere": {"en": "Enter the question here...", "ar": "اضف الاستفسار هنا"}, - "ViewDoctorResponses": {"en": "View Doctor Responses", "ar": "الاطلاع على ردود الأطباء"}, + "QuestionHere": { + "en": "Enter the question here...", + "ar": "اضف الاستفسار هنا" + }, + "ViewDoctorResponses": { + "en": "View Doctor Responses", + "ar": "الاطلاع على ردود الأطباء" + }, "ServiceInformationButton": {"en": "LOGIN / REGISTER", "ar": "دخول / تسجيل"}, - "ServiceInformationTitle": {"en": "Service Information", "ar": "معلومات الخدمة"}, + "ServiceInformationTitle": { + "en": "Service Information", + "ar": "معلومات الخدمة" + }, "ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"}, - "HomeHealthCare": {"en": "Home Health Care", "ar": " الرعاية الصحية المنزلية "}, + "HomeHealthCare": { + "en": "Home Health Care", + "ar": " الرعاية الصحية المنزلية " + }, "HomeHealthCareText": { "en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", @@ -479,11 +693,14 @@ const Map localizedValues = { "info-lab": { "en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.", - "ar": "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية." + "ar": + "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية." }, "info-radiology": { - "en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.", - "ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." + "en": + "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.", + "ar": + "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." }, "orders": {"en": "Orders", "ar": "الطلبات"}, "lakum": {"en": "Lakum", "ar": "لكم"}, @@ -517,10 +734,19 @@ const Map localizedValues = { "recommended": {"en": " Recommended For You", "ar": "موصى لك"}, "myPrescription": {"en": " My Prescriptions", "ar": "وصفاتي"}, "quantity": {"en": " QTY ", "ar": "الكمية"}, - "backMyAccount": {"en": "BACK TO MY ACCOUNT ", "ar": " الرجوع لحسابي الشخصي"}, + "backMyAccount": { + "en": "BACK TO MY ACCOUNT ", + "ar": " الرجوع لحسابي الشخصي" + }, "reviewSuccessful": {"en": "Review Successful", "ar": " تقييم ناجح"}, - "reviewShared": {"en": "Your review has been shared on product review section", "ar": " تمت مشاركة تقييمك في قسم تقييم المنتج"}, - "reviewComment": {"en": "Your reviews help other to choose better product", "ar": " تقييمك سوف يساعد الأخرين في اختيار المنتج الأفضل"}, + "reviewShared": { + "en": "Your review has been shared on product review section", + "ar": " تمت مشاركة تقييمك في قسم تقييم المنتج" + }, + "reviewComment": { + "en": "Your reviews help other to choose better product", + "ar": " تقييمك سوف يساعد الأخرين في اختيار المنتج الأفضل" + }, "shippedMethod": {"en": "SHIP BY:", "ar": " الشحن بواسطة:"}, "orderDetail": {"en": "Order Details", "ar": " تفاصيل الطلب"}, "orderSummary": {"en": "Order Summary", "ar": " تفاصيل المنتج"}, @@ -541,38 +767,73 @@ const Map localizedValues = { "confirmLocation": {"en": "CONFIRM LOCATION ", "ar": " تأكيد الموقع "}, "conditionsHMG": {"en": "Terms & Conditions ", "ar": "الشروط و الأحكام "}, "conditions": {"en": "Terms & Conditions of Lakum", "ar": "شروط و احكام لكم"}, - "confirmDeleteMsg": {"en": "Are you sure! want to delete ", "ar": "هل انت متأكد تريد الحذف "}, + "confirmDeleteMsg": { + "en": "Are you sure! want to delete ", + "ar": "هل انت متأكد تريد الحذف " + }, "confirmDelete": {"en": "DELETE", "ar": "حذف"}, - "confirmCancellation": {"en": "Are you sure! want to cancel this order ", "ar": "هل انت متأكد تريد حذف هذا المنتج "}, + "confirmCancellation": { + "en": "Are you sure! want to cancel this order ", + "ar": "هل انت متأكد تريد حذف هذا المنتج " + }, "orderNumber": {"en": "Order#: ", "ar": "الطلب: "}, "orderDate": {"en": "Date", "ar": "التاريخ:"}, "itemsNo": {"en": "items(s)", "ar": "عناصر"}, "noOrder": {"en": "You Don't have any orders.", "ar": "ليس لديك طلبات"}, "TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"}, - "Beforeusing": {"en": "Before using the checkup, please read Terms of Service.", "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"}, - "accept": {"en": "I read and accept Terms of Service and Privacy Policy", "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"}, + "Beforeusing": { + "en": "Before using the checkup, please read Terms of Service.", + "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة" + }, + "accept": { + "en": "I read and accept Terms of Service and Privacy Policy", + "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية" + }, "data-safe-info": { - "en": "Information that you provide is anonymous and not shared with anyone.", + "en": + "Information that you provide is anonymous and not shared with anyone.", "ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص" }, "data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"}, "informational": { - "en": "Checkup is for informational purposes and is not a qualified medical opinion", + "en": + "Checkup is for informational purposes and is not a qualified medical opinion", "ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل" }, - "not-use-in-emerbency": {"en": "Do not use in emergencies.", "ar": "لا تستخدم في حالات الطوارئ"}, - "not-use-in-emerbency-details": {"en": "In case of health emergency, ", "ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"}, - "not-use-in-emerbency-details-call": {"en": "call the nearest emergency number immediately", "ar": " اتصل بأقرب رقم للطوارئ على الفور"}, - "check-diagnosis": {"en": "Checkup is not a diagnosis.", "ar": "الفحص ليس تشخيص."}, + "not-use-in-emerbency": { + "en": "Do not use in emergencies.", + "ar": "لا تستخدم في حالات الطوارئ" + }, + "not-use-in-emerbency-details": { + "en": "In case of health emergency, ", + "ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور" + }, + "not-use-in-emerbency-details-call": { + "en": "call the nearest emergency number immediately", + "ar": " اتصل بأقرب رقم للطوارئ على الفور" + }, + "check-diagnosis": { + "en": "Checkup is not a diagnosis.", + "ar": "الفحص ليس تشخيص." + }, "remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"}, - "loginToUseService": {"en": "You need to login to use this service", "ar": "هذة الخدمة تتطلب تسجيل الدخول"}, + "loginToUseService": { + "en": "You need to login to use this service", + "ar": "هذة الخدمة تتطلب تسجيل الدخول" + }, // pharmacy module "medicationRefill": {"en": "MEDICATION REFILL", "ar": "إعادة تعبئة الدواء"}, - "offersAndPromotions": {"en": "OFFERS & SPECIAL PROMOTIONS", "ar": "العروض والترقيات الخاصة"}, + "offersAndPromotions": { + "en": "OFFERS & SPECIAL PROMOTIONS", + "ar": "العروض والترقيات الخاصة" + }, "myPrescriptions": {"en": "MY PRESCRIPTIONS", "ar": "وصفاتي"}, - "searchAndScanMedication": {"en": "SEARCH & SCAN FOR MEDICATION", "ar": "البحث والمسح للأدوية"}, + "searchAndScanMedication": { + "en": "SEARCH & SCAN FOR MEDICATION", + "ar": "البحث والمسح للأدوية" + }, "shopByBrands": {"en": "Shop By Brands", "ar": "تسوق حسب الماركات"}, "recentlyViewed": {"en": "Recently Viewed", "ar": "شوهدت مؤخرا"}, "bestSellers": {"en": "Best Sellers", "ar": "أفضل البائعين"}, @@ -582,7 +843,10 @@ const Map localizedValues = { "selectAddress": {"en": "Select Address", "ar": "حدد العنوان"}, "shippingAddress": {"en": "SHIPPING ADDRESS", "ar": "عنوان الشحن"}, "changeAddress": {"en": "Change Address", "ar": "تغيير العنوان"}, - "selectPaymentOption": {"en": "Select Payment Option", "ar": "حدد خيار الدفع"}, + "selectPaymentOption": { + "en": "Select Payment Option", + "ar": "حدد خيار الدفع" + }, "changeMethod": {"en": "Change Method", "ar": "تغيير خيار الدفع"}, "reviewOrder": {"en": "Review Order", "ar": "مراجعة الطلب"}, "active": {"en": "ACTIVE", "ar": "فعال"}, @@ -594,23 +858,31 @@ const Map localizedValues = { "checkBeneficiary": {"en": "CHECK BENEFICIARY", "ar": "تحقق من المستفيد"}, "beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"}, "accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"}, + "lakumTransfer": {"en": "Lakum Transfer", "ar": "تفعيل الحساب"}, "acceptLbl": {"en": "Accept", "ar": "موافقة"}, "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"}, "i-am-a": {"en": "I am a ...", "ar": "أنا ..."}, "select-age": {"en": "Select Your Age", "ar": "حدد العمر"}, "i-am": {"en": "I am", "ar": "أنا"}, "years-old": {"en": "years old", "ar": "سنة"}, - "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"}, + "drag-point": { + "en": "Drag point to change your age", + "ar": "اسحب لتغيير عمرك" + }, "categorise": {"en": "Categories", "ar": "التطبيقات"}, "wishList": {"en": "WishList", "ar": "الرغبات"}, "myAccount": {"en": "My Account", "ar": "حسابي"}, "cart": {"en": "Cart", "ar": "التسوق"}, - "searchProductHere": {"en": "Search Product here", "ar": "ابحث في الطلب الخاص بك"}, + "searchProductHere": { + "en": "Search Product here", + "ar": "ابحث في الطلب الخاص بك" + }, "HHCNotAuthMsg": { "en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", - "ar": "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي)..." + "ar": + "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي)..." }, "email": {"en": "Email", "ar": "البريد الالكتروني"}, "Book": {"en": "Book", "ar": "احجز"}, @@ -621,7 +893,10 @@ const Map localizedValues = { "profile": {"en": "Profile", "ar": "ملفي"}, "notifications": {"en": "Notifications", "ar": "إشعارات"}, "notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, - "notificationDetailsa": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, + "notificationDetailsa": { + "en": "Notification Details", + "ar": "تفاصيل الاشعار" + }, "info-my-doctor-points": { "en": [ @@ -638,11 +913,14 @@ const Map localizedValues = { ] }, "info-my-doctor": { - "en": "This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:", - "ar": "خدمة اطبائي: هذه الخدمة تمكنك من الاطلاع على جميع الاطباء الذين قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" + "en": + "This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:", + "ar": + "خدمة اطبائي: هذه الخدمة تمكنك من الاطلاع على جميع الاطباء الذين قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" }, "info-prescriptions": { - "en": "This service allows you to view all the medical prescriptions issued by Al Habib Medical Group, and through this service, you can:", + "en": + "This service allows you to view all the medical prescriptions issued by Al Habib Medical Group, and through this service, you can:", "ar": "خدمة الوصفات الطبية: هذه الخدمة تمكنك من الاطلاع على جميع الوصفات الطبية التي تم اصدارها في مجموعة الحبيب الطبية، كما تستطيع من خلال هذه الخدمة:" }, @@ -668,7 +946,8 @@ const Map localizedValues = { }, "info-insurance-cards": { - "en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", + "en": + "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" }, @@ -693,15 +972,19 @@ const Map localizedValues = { }, "info-allergies": { - "en": "This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.", - "ar": "خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية." + "en": + "This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.", + "ar": + "خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية." }, "sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"}, "info-sick-leaves": { - "en": "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:", - "ar": "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:" + "en": + "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:", + "ar": + "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:" }, "info-sick-leave-points": { "en": [ @@ -721,8 +1004,10 @@ const Map localizedValues = { }, "info-approvals": { - "en": "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:", - "ar": "خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:" + "en": + "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:", + "ar": + "خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:" }, "info-approval-points": { @@ -743,16 +1028,34 @@ const Map localizedValues = { "ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية." }, - "language-setting": {"en": "SMS and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة و الاتصال الآلي"}, + "language-setting": { + "en": "SMS and Confirmation Calls Language", + "ar": "لغة الرسائل القصيرة و الاتصال الآلي" + }, "alert": {"en": "Alerts", "ar": "التنبيهات"}, - "email-alert": {"en": "Alert By Email", "ar": "استلام التنبيهات بالبريد الالكتروني"}, - "sms-alert": {"en": "Alert By SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"}, + "email-alert": { + "en": "Alert By Email", + "ar": "استلام التنبيهات بالبريد الالكتروني" + }, + "sms-alert": { + "en": "Alert By SMS", + "ar": "استلام التنبيهات بالرسائل القصيرة" + }, "contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"}, - "emrg-name": {"en": "Emergency Contact Name", "ar": "اسم للتواصل في حالة الطوارئ"}, - "emrg-no": {"en": "Emergency Contact Number", "ar": "رقم للتواصل في حالة الطوارئ"}, + "emrg-name": { + "en": "Emergency Contact Name", + "ar": "اسم للتواصل في حالة الطوارئ" + }, + "emrg-no": { + "en": "Emergency Contact Number", + "ar": "رقم للتواصل في حالة الطوارئ" + }, "modes": {"en": "Modes", "ar": "الاوضاع"}, "vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"}, - "blind-modes": {"en": "Modes for Partially Blind", "ar": "تأثيرات لدعم ضعاف البصر"}, + "blind-modes": { + "en": "Modes for Partially Blind", + "ar": "تأثيرات لدعم ضعاف البصر" + }, "invert-theme": {"en": "Invert", "ar": "ألوان سلبية"}, "off-theme": {"en": "Off", "ar": "إيقاف"}, "dim-theme": {"en": "Dim", "ar": "ضوء خافت"}, @@ -769,8 +1072,14 @@ const Map localizedValues = { "LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"}, "Service": {"en": "Service", "ar": "خدمة"}, "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'}, - "HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '}, - "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '}, + "HealthWeatherIndicators": { + "en": "Health Weather Indicators", + 'ar': ' مؤشرات الطقس الصحية ' + }, + "HealthTipsBasedOnCurrentWeather": { + "en": "Health Tips Based On Current Weather", + 'ar': ' نصائح صحية على أساس الطقس الحالي ' + }, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, "ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"}, @@ -794,28 +1103,55 @@ const Map localizedValues = { "send": {"en": "Send", "ar": "أرسل"}, "status": {"en": "Status", "ar": "الحالة"}, "like-to-hear": { - "en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form", - "ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة" + "en": + "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form", + "ar": + "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة" }, "subject": {"en": "Subject", "ar": "الموضوع"}, "message": {"en": "Message", "ar": "رسالة"}, - "empty-subject": {"en": "Please enter the subject", "ar": "يرجى ادخال الموضوع"}, + "empty-subject": { + "en": "Please enter the subject", + "ar": "يرجى ادخال الموضوع" + }, "empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الرسالة"}, "select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"}, "complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"}, - "complain-without-appo": {"en": "Complaint without appointment", "ar": "شكوى بدون موعد"}, + "complain-without-appo": { + "en": "Complaint without appointment", + "ar": "شكوى بدون موعد" + }, "question": {"en": "Question", "ar": "سؤال"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, "compliment": {"en": "compliment", "ar": "ثناء"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"}, - "your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقراحك شكرا لك"}, - "select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"}, + "your-feedback": { + "en": "Your feedback was sent", + "ar": "لقد تم ارسال اقراحك شكرا لك" + }, + "select-part": { + "en": "Please select the part that complain about", + "ar": "يرجى تحديد الجزء الذي تشكو منه" + }, "number": {"en": "Number", "ar": "الرقم"}, "not-classified": {"en": "Not classified", "ar": "غير محدد"}, "selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"}, - "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"}, + "searchItemError": { + "en": "Item name should be more than 3 character ", + "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف" + }, "YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "}, "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "}, + "blood-donation": {"en": "Blood Donation", "ar": "التبرع بالدم"}, + "blood-instruction": { + "en": + "Enter the required information, In order to register for Blood Donation Service", + "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم" + }, + "view-terms": { + "en": "To view the terms and conditions", + "ar": "عرض الشروط والأحكام" + }, "wantConnectHmgNetwork": { "en": "Dear customer there is no internet access, Do you want to connect with HMG network to use our app, make sure you are in range of HMG network", @@ -827,7 +1163,7 @@ const Map localizedValues = { "ar": "Connected with HMG Network,\n\nBut failed to access HMG services" }, "offerAndPackages": {"en": "Offers And Packages", "ar": "العروض والباقات"}, - "InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"}, + "InvoiceNo": {"en": "Invoice No", "ar": "رقم الفاتورة"}, "SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"}, "GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"}, "show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, @@ -857,20 +1193,31 @@ const Map localizedValues = { "info-advance-payment": { "en": "This service designed so that you can deposit an amount in advance either in your account or in someone else's account with Al Habib Medical Group.", - "ar": "تم تصميم هذه الخدمة حتى تتمكن من دفع مبلغ مقدما او تحت الحساب سواء في حسابك او في حساب شخص اخر لدى مجموعة الحبيب الطبية." + "ar": + "تم تصميم هذه الخدمة حتى تتمكن من دفع مبلغ مقدما او تحت الحساب سواء في حسابك او في حساب شخص اخر لدى مجموعة الحبيب الطبية." + }, + "info-my-balance": { + "en": "This service allows you to check your balance in all branchs", + "ar": "هذه الخدمه تتيح لك الاطلاع رصيدك في كل الفروع" }, - "info-my-balance": {"en": "This service allows you to check your balance in all branchs", "ar": "هذه الخدمه تتيح لك الاطلاع رصيدك في كل الفروع"}, "er-contant": { - "en": "This service displays nearest branch among all the branches of Al Habib Medical Group based on your current location.", - "ar": "تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي." + "en": + "This service displays nearest branch among all the branches of Al Habib Medical Group based on your current location.", + "ar": + "تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي." }, "er": {"en": "ER", "ar": "الطوارىء"}, "transportation-Service": {"en": "Ambulance Request", "ar": "طلب نقل اسعاف"}, "info-ambulance": { - "en": "Through this service, you can request evacuation by ambulance, whether from home or to home, in addition to a set of other services", - "ar": "عن طريق هذه الخدمة يمكنك طلب اخلاء بواسطة سيارة اسعاف سواء من المزل او الى المنزل بالاضافة الى مجموعة من الخدمات الاخرى" + "en": + "Through this service, you can request evacuation by ambulance, whether from home or to home, in addition to a set of other services", + "ar": + "عن طريق هذه الخدمة يمكنك طلب اخلاء بواسطة سيارة اسعاف سواء من المزل او الى المنزل بالاضافة الى مجموعة من الخدمات الاخرى" + }, + "RRT-transport-heading": { + "en": "Select Transportation Method", + "ar": "حدد طريقة النقل" }, - "RRT-transport-heading": {"en": "Select Transportation Method", "ar": "حدد طريقة النقل"}, "RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"}, "to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"}, "from-hospital": {"en": "From Hospital", "ar": "من المستشفى"}, @@ -881,12 +1228,21 @@ const Map localizedValues = { "inside-home": {"en": "Inside Home", "ar": "داخل المنزل"}, "have-appo": {"en": "Do you have an appointment ?", "ar": "هل لديك موعد ؟"}, "dropoff-location": {"en": "Dropoff Location", "ar": "نقطة الوصول"}, - "select-all": {"en": "Please select all fields", "ar": "يرجى تحديد جميع الحقول"}, + "select-all": { + "en": "Please select all fields", + "ar": "يرجى تحديد جميع الحقول" + }, "select-map": {"en": "Select From Map", "ar": "حدد من الخريطة"}, - "no-appointment": {"en": "You don't have any appointments yet", "ar": "ليس لديك أي مواعيد حتى الآن"}, + "no-appointment": { + "en": "You don't have any appointments yet", + "ar": "ليس لديك أي مواعيد حتى الآن" + }, "patient-share": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, "patient-share-tax": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, - "patient-share-total": {"en": "Total amount payable: ", "ar": "المبلغ الإجمالي المستحق:"}, + "patient-share-total": { + "en": "Total amount payable: ", + "ar": "المبلغ الإجمالي المستحق:" + }, "select-ambulate": {"en": "Select Ambulate", "ar": "بحاجة للتنقل بواسطة"}, "wheelchair": {"en": "Wheelchair", "ar": "كرسي متحرك"}, "walker": {"en": "Walker", "ar": "مشاية"}, @@ -897,28 +1253,57 @@ const Map localizedValues = { "transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"}, "directions": {"en": "Directions", "ar": "الاتجاهات"}, "info-my-appointments": { - "en": "This service allows you to see all the appointment you have visited in Al Habib Medical Group, and through this service:", - "ar": "خدمة مواعيدي: هذه الخدمة تمكنك من الاطلاع على جميع المواعيد التي قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" + "en": + "This service allows you to see all the appointment you have visited in Al Habib Medical Group, and through this service:", + "ar": + "خدمة مواعيدي: هذه الخدمة تمكنك من الاطلاع على جميع المواعيد التي قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" }, "info-todo": { - "en": "This service is designed to enable you to have a quick link to the list of tasks that need to be done", - "ar": "هذه الخدمة تم تصميمها لتمكنك من الوصول الى رابط سريع لقائمة المهام التي يجب القيام بها" + "en": + "This service is designed to enable you to have a quick link to the list of tasks that need to be done", + "ar": + "هذه الخدمة تم تصميمها لتمكنك من الوصول الى رابط سريع لقائمة المهام التي يجب القيام بها" }, "family-info": { "en": "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.", - "ar": "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." + "ar": + "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." + }, + "update-succ": { + "en": "Successfully updated profile", + "ar": "تم تحديث البيانات بنجاح" }, - "update-succ": {"en": "Successfully updated profile", "ar": "تم تحديث البيانات بنجاح"}, "dental-complains": {"en": "Symptoms", "ar": "الأعراض"}, - "empty-result": {"en": "There is no search results found", "ar": "لايوجد نتائج"}, + "empty-result": { + "en": "There is no search results found", + "ar": "لايوجد نتائج" + }, - "no-booked-appointment": {"en": "No booked appointments", "ar": "لا يوجد مواعيد محجوزة"}, - "no-confirmed-appointment": {"en": "No confirmed appointments", "ar": "لا توجد مواعيد مؤكدة"}, - "no-arrived-appointment": {"en": "No arrived appointments", "ar": "لا يوجد مواعيد"}, - "upcoming-empty": {"en": "You do not have any Todo actions yet.", "ar": "ليس لديك أي إجراءات الآن."}, - "upcoming-timeLeft": {"en": "time left for appointment", "ar": "الوقت المتبقي للموعد"}, - "covid-test-all-services": {"en": "Covid-19 Drive-Thru Test", "ar": "فحص كورونا من داخل السيارة"}, + "no-booked-appointment": { + "en": "No booked appointments", + "ar": "لا يوجد مواعيد محجوزة" + }, + "no-confirmed-appointment": { + "en": "No confirmed appointments", + "ar": "لا توجد مواعيد مؤكدة" + }, + "no-arrived-appointment": { + "en": "No arrived appointments", + "ar": "لا يوجد مواعيد" + }, + "upcoming-empty": { + "en": "You do not have any Todo actions yet.", + "ar": "ليس لديك أي إجراءات الآن." + }, + "upcoming-timeLeft": { + "en": "time left for appointment", + "ar": "الوقت المتبقي للموعد" + }, + "covid-test-all-services": { + "en": "Covid-19 Drive-Thru Test", + "ar": "فحص كورونا من داخل السيارة" + }, "pharmacy": {"en": "Pharmacy", "ar": "الصيدلية"}, "ereferral": {"en": "E-Referral", "ar": "طلب التحويل"}, "child-vaccine": {"en": "Child Vaccines", "ar": "تطعيمات الأطفال"}, @@ -941,7 +1326,10 @@ const Map localizedValues = { "ready": {"en": "Ready", "ar": "جاهز"}, "completed": {"en": "Completed", "ar": "مكتمل"}, - "request-medical-report": {"en": "Request medical report", "ar": "طلب تقرير طبي"}, + "request-medical-report": { + "en": "Request medical report", + "ar": "طلب تقرير طبي" + }, "insur-cards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, 'labResult': {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"}, 'details': {'en': 'Details', 'ar': 'التفاصيل'}, @@ -951,37 +1339,76 @@ const Map localizedValues = { "card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"}, "Dr": {"en": "Dr. ", "ar": "الدكتور."}, "empty": {"en": "You do not have any records.", "ar": "ليس لديك أي سجلات"}, - "last-visit": {"en": "How was your last visit with doctor?", "ar": "كيف تقيم زيارتك الأخيرة للطبيب؟"}, + "last-visit": { + "en": "How was your last visit with doctor?", + "ar": "كيف تقيم زيارتك الأخيرة للطبيب؟" + }, "tap-title": {"en": "Please rate the doctor", "ar": "يرجى تقييم الطبيب"}, "later": {"en": "Later", "ar": "لاحقاً"}, - "sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"}, + "sendSuc": { + "en": "A copy has been sent to the email", + "ar": "تم إرسال نسخة إلى البريد الإلكتروني" + }, "instructions": { - "en": "You can now talk directly to the appointments department by chat or request a call back", - "ar": "يمكنك الان التحدث مباشرة مع قسم المواعيد عن طريق خدمة المحادثة النصية أو طلب معاودة الاتصال" + "en": + "You can now talk directly to the appointments department by chat or request a call back", + "ar": + "يمكنك الان التحدث مباشرة مع قسم المواعيد عن طريق خدمة المحادثة النصية أو طلب معاودة الاتصال" }, "instructions-pharmacies": { - "en": "You can now talk directly to the pharmacist by chat or request a call back", - "ar": "يمكنك الآن التحدث مباشرة إلى الصيدلي عن طريق الدردشة أو طلب معاودة الاتصال" + "en": + "You can now talk directly to the pharmacist by chat or request a call back", + "ar": + "يمكنك الآن التحدث مباشرة إلى الصيدلي عن طريق الدردشة أو طلب معاودة الاتصال" }, "select-hospital": {"en": "Choose Hospital", "ar": "اختر المستشفى"}, "start": {"en": "Start", "ar": "ابدأ"}, "info-chat": { - "en": "This service allows you to chat with customer service directly without the need to call.", - "ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً." + "en": + "This service allows you to chat with customer service directly without the need to call.", + "ar": + "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً." + }, + "last-appointment": { + "en": "How was your appointment?", + "ar": "كيف كان موعدك الطبي ؟" }, - "last-appointment": {"en": "How was your appointment?", "ar": "كيف كان موعدك الطبي ؟"}, "rate-clinic": {"en": "Please rate the clinic", "ar": "يرجى تقييم العيادة"}, "fetch-data": {"en": "Fetch Data", "ar": "تحديث الان"}, "rate": {"en": "Rate", "ar": "تقييم"}, - "send-email": {"en": "Send a copy of this report to the email", "ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني"}, - "update-email-msg": {"en": "Email updated", "ar": "تم تحديث البريد الالكتروني"}, + "send-email": { + "en": "Send a copy of this report to the email", + "ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني" + }, + "update-email-msg": { + "en": "Email updated", + "ar": "تم تحديث البريد الالكتروني" + }, "update-email": {"en": "Update Email", "ar": "تحديث البريد الالكتروني"}, - "booked-success": {"en": "The appointment has been successfully booked.", "ar": "لقد تم حجز الموعد بنجاح"}, - "appo-reminder-select-option-30": {"en": "Before 30 Mins", "ar": "قبل 30 دقيقة"}, - "appo-reminder-select-option-60": {"en": "Before 1 Hour", "ar": "قبل ساعة واحدة"}, - "appo-reminder-select-option-90": {"en": "Before 1 Hour and 30 mins", "ar": "قبل ساعة و 30 دقيقة"}, - "appo-reminder-select-option-120": {"en": "Before 2 Hours", "ar": "قبل ساعتين"}, - "noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "}, + "booked-success": { + "en": "The appointment has been successfully booked.", + "ar": "لقد تم حجز الموعد بنجاح" + }, + "appo-reminder-select-option-30": { + "en": "Before 30 Mins", + "ar": "قبل 30 دقيقة" + }, + "appo-reminder-select-option-60": { + "en": "Before 1 Hour", + "ar": "قبل ساعة واحدة" + }, + "appo-reminder-select-option-90": { + "en": "Before 1 Hour and 30 mins", + "ar": "قبل ساعة و 30 دقيقة" + }, + "appo-reminder-select-option-120": { + "en": "Before 2 Hours", + "ar": "قبل ساعتين" + }, + "noDataAvailable": { + "en": "No data available", + "ar": " لا يوجد بيانات متاحة " + }, "thename": {"en": "The Name", "ar": "الاسم"}, "noSearchResult": {"en": "No Search Result", "ar": "لا توجد نتيجة بحث"}, "selectFileSouse": {"en": "Select file souse", "ar": "حدد الملف"}, @@ -990,35 +1417,60 @@ const Map localizedValues = { "med-report": {"en": "Medical Reports", "ar": "التقارير الطبية"}, "new-med-report": {"en": "Requests", "ar": "الطلبات"}, "requestReport": {"en": "Request a report", "ar": " طلب تقرير"}, - "confirm-msg-report": {"en": "Request for medical report?", "ar": "طلب تقرير طبي؟"}, - "successSendReport": {"en": "The request has been submitted successfully", "ar": "تم تنفيذ طلبك بنجاح"}, + "confirm-msg-report": { + "en": "Request for medical report?", + "ar": "طلب تقرير طبي؟" + }, + "successSendReport": { + "en": "The request has been submitted successfully", + "ar": "تم تنفيذ طلبك بنجاح" + }, "pulseTitle": {"en": "Heart rate", "ar": "معدل النبض بالدقيقة"}, "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, "policy-holder": {"en": "Policy Holder", "ar": "حامل بطاقة التأمين"}, "policy-no": {"en": "Policy Number", "ar": "رقم سياسات"}, - "agree": {"en": "I agree, this is the correct information", "ar": "موافق، هذه المعلومات صحيحة"}, - "disagree": {"en": "No, this is not the correct information", "ar": "غير موافق، هذه المعلومات غير الصحيحة"}, + "agree": { + "en": "I agree, this is the correct information", + "ar": "موافق، هذه المعلومات صحيحة" + }, + "disagree": { + "en": "No, this is not the correct information", + "ar": "غير موافق، هذه المعلومات غير الصحيحة" + }, "expiry-date": {"en": "Expiry Date", "ar": "تاريخ انتهاء الصلاحية"}, "class": {"en": "Class", "ar": "فئة"}, "approval": {"en": "Approval", "ar": "موافقة"}, "no-data": {"en": "No data found", "ar": "لاتوجد بيانات"}, "insurance-details": {"en": "Insurance Details", "ar": "تفاصيل التأمين"}, "nearest-hospital": {"en": "Nearest Hospital", "ar": "أقرب مستشفى"}, - "request-sent": {"en": "Request sent successfully", "ar": "تم إرسال الطلب بنجاح"}, - "message-sent": {"en": "Message sent successfully", "ar": "تم إرسال الرسالة بنجاح"}, + "request-sent": { + "en": "Request sent successfully", + "ar": "تم إرسال الطلب بنجاح" + }, + "message-sent": { + "en": "Message sent successfully", + "ar": "تم إرسال الرسالة بنجاح" + }, "sent-on": {"en": "Sent on", "ar": "أرسلت في"}, - "attach-insurace-image": {"en": "Attach insurance card image", "ar": "إرفاق صورة بطاقة التأمين"}, + "attach-insurace-image": { + "en": "Attach insurance card image", + "ar": "إرفاق صورة بطاقة التأمين" + }, "upload-without-image": { "en": "You can still submit, if you don't have Insurance Image", "ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين" }, "info-insur-cards": { - "en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", + "en": + "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" }, - "scan-now": {"en": "If you have a card / Document Scan now", "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"}, + "scan-now": { + "en": "If you have a card / Document Scan now", + "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان" + }, "liveCare": {"en": "Live Care", "ar": "لايف كير"}, "topBrands": {"en": "Top Brands", "ar": "اعلى العلامات التجارية"}, @@ -1027,13 +1479,16 @@ const Map localizedValues = { "availability": {"en": "Availability", "ar": "التوفر"}, + "vaccination": {"en": "Vaccination", "ar": "جدول التطعيمات"}, + "welcomeBack": {"en": "Welcome back", "ar": "مرحبا مرة أخرى"}, "quantitySize": {"en": "Quantity", "ar": "كميه"}, "addToCart": {"en": "add to cart", "ar": "إضفة للسلة"}, "buyNow": {"en": "buy now", "ar": "إشتري الان"}, "quantityShortcut": {"en": "QTY", "ar": "كمية"}, "pharmacyServiceTermsCondition": { - "en": "I agree with the terms of service and I adhere to them unconditionally", + "en": + "I agree with the terms of service and I adhere to them unconditionally", "ar": " أوافق على شروط الخدمة وألتزم بها دون قيد أو شرط" }, "Year": {"en": "YEAR", "ar": "السنة"}, @@ -1043,6 +1498,16 @@ const Map localizedValues = { "termOfService": {"en": "Terms of service", "ar": "شروط الخدمة"}, "shoppingCart": {"en": "Shopping Cart", "ar": "عربة التسوق"}, + "add-child": {"en": "Add New Child", "ar": "اضافة طفل"}, + "child-name": {"en": "Child Name", "ar": "اسم الطفل"}, + "childDob": {"en": "Birth Date", "ar": "تاريخ الولادة"}, + "deleted-child-mes": { + "en": + "The request was successful. The children have removed from the vaccination schedule subscription service.", + "ar": "تم حذف الطفل بنجاح" + }, + "deleted-child": {"en": "Delete child", "ar": "إالغاء الطفل"}, + "visit": {"en": "Visit", "ar": "زيارة"}, "referralStatus": {"en": "Referral Status", "ar": "حالة الإحالة"}, "referralDate": {"en": "Referral Date", "ar": "تاريخ الإحالة"}, "patientName": {"en": "Patient Name", "ar": "اسم المريض"}, @@ -1054,32 +1519,90 @@ const Map localizedValues = { "orderLocation": {"en": "Location", "ar": "الموقع"}, "selectService": {"en": "Select Service", "ar": "حدد الخدمة"}, "coveredService": {"en": "Covered Service : ", "ar": " الخدمات المغطاة : "}, - "selectedService": {"en": "Selected Service : ", "ar": " الخدمات المختارة : "}, - "cancelOrderMsg": {"en": "Are you sure!! want to cancel this order", "ar": "هل أنت واثق!! تريد إلغاء هذا الطلب"}, - "processDoneSuccessfully": {"en": "Process Done Successfully", "ar": "تمت العملية بنجاح"}, - "selectHomeHealthCareServices": {"en": "Select Home Health Care Services", "ar": " حدد خدمات الرعاية الصحية المنزلية"}, + "selectedService": { + "en": "Selected Service : ", + "ar": " الخدمات المختارة : " + }, + "cancelOrderMsg": { + "en": "Are you sure!! want to cancel this order", + "ar": "هل أنت واثق!! تريد إلغاء هذا الطلب" + }, + "processDoneSuccessfully": { + "en": "Process Done Successfully", + "ar": "تمت العملية بنجاح" + }, + "selectHomeHealthCareServices": { + "en": "Select Home Health Care Services", + "ar": " حدد خدمات الرعاية الصحية المنزلية" + }, "description-vaccination": {"en": "Description", "ar": "وصف"}, "due-date": {"en": "Due date", "ar": "تاريخ الاستحقاق"}, - "valid-email": {"en": "Please enter valid email", "ar": "الرجاء إدخال عنوان بريد صحيح"}, - "confirm-send": {"en": "Send the child's schedule to the email?", "ar": "ارسال جدول التطعيمات الى بريدك الالكتروني؟"}, - "vaccination": {"en": "Vaccination", "ar": "جدول التطعيمات"}, - "welcomeBack": {"en": "Welcome back", "ar": "مرحبا مرة أخرى"}, + "valid-email": { + "en": "Please enter valid email", + "ar": "الرجاء إدخال عنوان بريد صحيح" + }, + "confirm-send": { + "en": "Send the child's schedule to the email?", + "ar": "ارسال جدول التطعيمات الى بريدك الالكتروني؟" + }, + "email-success": { + "en": + " The request was successful. You will receive the Schedule in moments.", + "ar": "تم ارسال جدول التطعيمات " + }, + "add-instructions": { + "en": + "Add the child's information below to recieve the schedule of vaccinations.", + "ar": "أضف معلومات الطفل لاستلام جدول التطعيمات" + }, + "added-child": { + "en": + "The request was successful. You have added a child to the vaccination schedule subscription service.", + "ar": "تمت الاضافة بنجاح." + }, + "appUpdate": {"en": "UPDATE THE APP", "ar": "تحديث التطبيق"}, + "ereferralSaveSuccess": { + "en": + "The referral request has been submitted successfully, you will be contacted ASAP to complete the process. Referral request no is ", + "ar": + " تم إرسال طلب الإحالة بنجاح ، وسيتم الاتصال بك في أسرع وقت ممكن لإكمال العملية. رقم طلب الإحالة" + }, - "updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"}, + "help": {"en": "Help", "ar": "مساعدة"}, - "view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"}, - "trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"}, + "habibRobotText": { + "en": + "Hi, This is HABIB, your personal assistant. I'm here to assist you by voice commands. How can I help?", + "ar": "مرحباً ، معك حبيب مساعدك الشخصي. أنا هنا لمساعدتك بالأوامر الصوتية." + }, + "updated-email": { + "en": "Updated email successfully", + "ar": "تم تحديث البريد الالكتروني" + }, + + "view-list-children": { + "en": "View List of Children", + "ar": "عرض قائمة الأطفال" + }, "covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"}, "driveThru": {"en": "Drive-Thru", "ar": "من السيارة"}, + "trackDeliveryDriver": { + "en": "Track Delivery Driver", + "ar": "trackDeliveryDriver" + }, + "NearestErDesc": { - "en": "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location", - "ar": "\nتعرض هذه الخدمة أقرب فرع\n من بين جميع فروع مجموعة \nالحبيب الطبية بناءً على موقعك الحالي." + "en": + "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location", + "ar": + "\nتعرض هذه الخدمة أقرب فرع\n من بين جميع فروع مجموعة \nالحبيب الطبية بناءً على موقعك الحالي." }, "NearestEr": {"en": "Nearest ER", "ar": "أقرب ER"}, "infoCMC": { "en": "Through this service, you can request a set of tests that help you and your doctor to understand the current health condition and then identify potential risks.", - "ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة" + "ar": + "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة" }, "instructionAgree": { "en": @@ -1091,22 +1614,35 @@ const Map localizedValues = { "RRT-orders-log": {"en": "Orders Log", "ar": "سجل الطلبات"}, "blood-sugar": {"en": "Blood Sugar", "ar": "سكر الدم"}, - "covid19_driveThrueTest": {"en": "'Covid-19- Drive-Thru Test'", "ar": "Covid-19- الفحص من خلال القيادة"}, + "covid19_driveThrueTest": { + "en": "'Covid-19- Drive-Thru Test'", + "ar": "Covid-19- الفحص من خلال القيادة" + }, "E-Referral": {"en": "'E-Referral'", "ar": "الإحالة الإلكترونية"}, "childName": {"en": "'CHILD NAME'", "ar": "إسم الطفل"}, "recordDeleted": {"en": "'Record Deleted'", "ar": "تم حذف السجل"}, "msg_email_address_up_to_date": { - "en": "Please ensure that the email address is up-to-date and process to view the schedule", - "ar": "يرجى التأكد من أن عنوان البريد الإلكتروني محدث وأن العملية لعرض الجدول الزمني" + "en": + "Please ensure that the email address is up-to-date and process to view the schedule", + "ar": + "يرجى التأكد من أن عنوان البريد الإلكتروني محدث وأن العملية لعرض الجدول الزمني" }, "add-new-child": {"en": "ADD NEW CHILD", "ar": "إضافة طفل جديد"}, - "visit": {"en": "Visit", "ar": "الزيارة"}, - "send-child-email-msg": {"en": "Send the child's schedule to the email", "ar": "أرسل جدول الطفل إلى البريد الإلكتروني"}, + + "send-child-email-msg": { + "en": "Send the child's schedule to the email", + "ar": "أرسل جدول الطفل إلى البريد الإلكتروني" + }, + "vaccination-add-child-msg": { - "en": "Add the child's information below to receive the schedule of vaccinations.", + "en": + "Add the child's information below to receive the schedule of vaccinations.", "ar": "أضف معلومات الطفل أدناه للحصول على جدول التطعيمات." }, - "child_added_successfully": {"en": "Child added successfully", "ar": "تمت إضافة الطفل بنجاح"}, + "child_added_successfully": { + "en": "Child added successfully", + "ar": "تمت إضافة الطفل بنجاح" + }, "bloodSugar": {"en": "Blood", "ar": "السكر في الدم"}, "sugar": {"en": "Sugar", "ar": ""}, "bloodCholesterol": {"en": "Blood", "ar": " الكولسترول في الدم"}, @@ -1119,18 +1655,26 @@ const Map localizedValues = { "calculate": {"en": "calculate", "ar": "حساب"}, "enterReadingValue": {"en": "Enter the reading value", "ar": "ادخل القيمة"}, "result": {"en": "Result", "ar": "النتيجة"}, - "bloodSugarConversion": {"en": "Blood Sugar Conversion", "ar": "السكر في الدم"}, + "sort": {"en": "Sort", "ar": "فرز"}, + "bloodSugarConversion": { + "en": "Blood Sugar Conversion", + "ar": "السكر في الدم" + }, "convertBloodSugarStatement": { - "en": "Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.", - "ar": "تحويل مستوى السكر في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" + "en": + "Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.", + "ar": + "تحويل مستوى السكر في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" }, "convertCholesterolStatement": { "en": "Convert blood cholesterol from\n mmol/l to mg/dlt and vice versa.", - "ar": "تحويل مستوى الكولسترول في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" + "ar": + "تحويل مستوى الكولسترول في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" }, "triglyceridesConvertStatement": { "en": "Convert Triglycerides from mmol/l to mg/dlt and vice versa.", - "ar": "تحويل مستوى الدهون الثلاثية في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" + "ar": + "تحويل مستوى الدهون الثلاثية في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" }, "my-tracker": {"en": "My Tracker", "ar": "قراءاتي"}, "weekly": {"en": "Weekly", "ar": "أسبوعي"}, @@ -1143,7 +1687,8 @@ const Map localizedValues = { "measure-time": {"en": "Measure time", "ar": "وقت القياس"}, "update": {"en": "Update", "ar": "تعديل"}, "bloodD-enter-desc": { - "en": "Enter the required information, In order to register for Blood Donation Service", + "en": + "Enter the required information, In order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم" }, "viewTermsConditions": { @@ -1154,10 +1699,9 @@ const Map localizedValues = { "en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى" }, - "videoAppo": { - "en": "Video Call Appointment", - "ar": "موعد اتصال فيديو" - }, + + "videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"}, + "generalHealth": {"en": "General Health", "ar": "صحة عامة"}, "womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"}, "bmi": {"en": "BMI", "ar": "الكتلة"}, @@ -1185,16 +1729,49 @@ const Map localizedValues = { "overWeight": {"en": "OverWeight", "ar": "وزن زائد"}, "healthy": {"en": "Healthy", "ar": "صحي"}, "underWeight": {"en": "UnderWeight", "ar": "نقص الوزن"}, - "bmiCalcMsgObese": {"en" : "A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم الذي يزيد عن 30 إلى زيادة الوزن بشكل كبير. قد تكون الصحة في خطر إذا لم تفقد الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء."}, - "bmiCalcMsgOverweight": {"en" : 'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get ', "ar": "يشير مؤشر كتلة الجسم من 25 إلى 30 إلى زيادة الوزن قليلاً. قد ينصح بفقدان بعض الوزن لأسباب صحية. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للحصول على"}, - "bmiCalcMsgHealthy": {"en" : "A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم من 18.5 - 25 إلى وزن صحي بالنسبة للطول. بالحفاظ على وزن صحي ، قلل من خطر الإصابة بمشاكل صحية خطيرة. لحجز موعد ، انقر أدناه للبدء."}, - "bmiCalcMsgUnderWeight": {"en" : "A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم الذي يقل عن 18.5 إلى أنك تعاني من نقص الوزن ، لذلك قد تحتاج إلى زيادة الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء."}, - "bariatrics": {"en" : "Bariatrics", "ar": "طب السمنة"}, - "bariatricsHeaderMsg": {"en" : "Choose one of the following symptoms to show the right doctors or choose a consultation to show all", "ar": "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل"}, - "continue": {"en" : "CONTINUE", "ar": "إستمرار"}, - "skip": {"en" : "SKIP", "ar": "تخطى"}, - "calorieCalcDesc": {"en" : "Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity ", "ar": "يحسب السعرات الحرارية اليومية بناءً على عدة عوامل ، مثل الطول والوزن والعمر والجنس والنشاط البدني اليومي"}, - "age11_120_years": {"en" : "The Age ( 11 - 120 ) yrs", "ar": "العمر (11 - 120) سنة"}, + "bmiCalcMsgObese": { + "en": + "A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", + "ar": + "يشير مؤشر كتلة الجسم الذي يزيد عن 30 إلى زيادة الوزن بشكل كبير. قد تكون الصحة في خطر إذا لم تفقد الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء." + }, + "bmiCalcMsgOverweight": { + "en": + 'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get ', + "ar": + "يشير مؤشر كتلة الجسم من 25 إلى 30 إلى زيادة الوزن قليلاً. قد ينصح بفقدان بعض الوزن لأسباب صحية. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للحصول على" + }, + "bmiCalcMsgHealthy": { + "en": + "A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.", + "ar": + "يشير مؤشر كتلة الجسم من 18.5 - 25 إلى وزن صحي بالنسبة للطول. بالحفاظ على وزن صحي ، قلل من خطر الإصابة بمشاكل صحية خطيرة. لحجز موعد ، انقر أدناه للبدء." + }, + "bmiCalcMsgUnderWeight": { + "en": + "A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", + "ar": + "يشير مؤشر كتلة الجسم الذي يقل عن 18.5 إلى أنك تعاني من نقص الوزن ، لذلك قد تحتاج إلى زيادة الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء." + }, + "bariatrics": {"en": "Bariatrics", "ar": "طب السمنة"}, + "bariatricsHeaderMsg": { + "en": + "Choose one of the following symptoms to show the right doctors or choose a consultation to show all", + "ar": + "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل" + }, + "continue": {"en": "CONTINUE", "ar": "إستمرار"}, + "skip": {"en": "SKIP", "ar": "تخطى"}, + "calorieCalcDesc": { + "en": + "Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity ", + "ar": + "يحسب السعرات الحرارية اليومية بناءً على عدة عوامل ، مثل الطول والوزن والعمر والجنس والنشاط البدني اليومي" + }, + "age11_120_years": { + "en": "The Age ( 11 - 120 ) yrs", + "ar": "العمر (11 - 120) سنة" + }, "weight-add": {"en": "Enter Weight Value", "ar": "أدخل الوزن "}, "systolic-add": {"en": "Enter Systolic Value", "ar": "أدخل قيمة الإنقباض "}, "diastolic-add": {"en": "Enter Diastolic Value", "ar": "أدخل قيمة الإنبساط "}, @@ -1202,18 +1779,30 @@ const Map localizedValues = { "today": {"en": "Today", "ar": "اليوم"}, "week": {"en": "Week", "ar": "أسبوع"}, "month": {"en": "Month", "ar": "شهر"}, - "h2o-amount-of-water": {"en": "Enter the amount of water:", "ar": "ادخل كمية الماء:"}, + "h2o-amount-of-water": { + "en": "Enter the amount of water:", + "ar": "ادخل كمية الماء:" + }, "update-user": {"en": "Update Information", "ar": "تحديث بيانات"}, "editname": {"en": "Enter the name here", "ar": "أدخل الاسم هنا"}, "activity-level": {"en": "Activity Level", "ar": "مستوى النشاط"}, "light-active": {"en": "Lightly Active", "ar": " قليل النشاط"}, "mod-active": {"en": "Moderately Active", "ar": "متوسط النشاط"}, - "reminder-label": {"en": "Activate the reminder of drink water?", "ar": "تفعيل خاصية تذكير شرب الماء؟"}, - "reminder-times-label": {"en": "How many times do you want to be reminded?", "ar": "عدد مرات التذكير"}, + "reminder-label": { + "en": "Activate the reminder of drink water?", + "ar": "تفعيل خاصية تذكير شرب الماء؟" + }, + "reminder-times-label": { + "en": "How many times do you want to be reminded?", + "ar": "عدد مرات التذكير" + }, "times": {"en": "Times", "ar": "مرات"}, "WaterCalculate": {"en": "Save", "ar": "حفظ"}, "notif-title": {"en": "Water Reminder", "ar": "تذكير"}, - "notif-text": {"en": " Don't forget to drink water.", "ar": "لا تنسى شرب الماء"}, + "notif-text": { + "en": " Don't forget to drink water.", + "ar": "لا تنسى شرب الماء" + }, "custom": {"en": "Custom", "ar": "خاص"}, "undo": {"en": "Undo", "ar": "تراجع"}, "drinking": {"en": "Drinkning", "ar": "الشرب"}, @@ -1222,28 +1811,50 @@ const Map localizedValues = { "ml": {"en": "ml", "ar": "مل"}, "l": {"en": "L", "ar": "لتر"}, "custom-label": {"en": "Enter amount", "ar": "أدخل كمية الماء"}, - "custom-label-in-litres": {"en": "Enter amount in liters", "ar": "أدخل الكمية باللتر"}, - "custom-label-in-mililitres": {"en": "Enter amount in millilitres", "ar": "أدخل الكمية بالملليتر"}, + "custom-label-in-litres": { + "en": "Enter amount in liters", + "ar": "أدخل الكمية باللتر" + }, + "custom-label-in-mililitres": { + "en": "Enter amount in millilitres", + "ar": "أدخل الكمية بالملليتر" + }, "amount": {"en": "Amount", "ar": "الكمية"}, - "target-reach": {"en": "You have reached the target for the day!", "ar": "لقد حققت هدفك اليومي! مبروك"}, - "week-header": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"}, - "month-header": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"}, - "notif-permission-title": {"en": "Could not set the water reminders", "ar": "لا يمكن ضبط اشعار شرب الماء"}, + "target-reach": { + "en": "You have reached the target for the day!", + "ar": "لقد حققت هدفك اليومي! مبروك" + }, + "week-header": { + "en": "Water consumed in a week", + "ar": "معدل شرب الماء خلال الاسبوع" + }, + "month-header": { + "en": "Water consumed in a month", + "ar": "معدل شرب الماء خلال الشهر" + }, + "notif-permission-title": { + "en": "Could not set the water reminders", + "ar": "لا يمكن ضبط اشعار شرب الماء" + }, "notif-permission-msg": { - "en": "To recieve water reminders, please turn on notifications in the system settings", + "en": + "To recieve water reminders, please turn on notifications in the system settings", "ar": "الرجاء تفعيل الاشعارات في الاعدادات" }, - "select-location": { - "en": "Select Location", - "ar": "اختر موقعا" + "verification_message_code": { + "en": "Please enter verification code", + "ar": "الرجاء إدخال رمز التحقق" }, + "select-location": {"en": "Select Location", "ar": "اختر موقعا"}, "result-header": { "en": "Get The Result During 8 Hours", "ar": "احصل على النتيجة خلال 8 ساعة" }, "covid-info": { - "en": "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR​", - "ar": "يتوفر لدينا أحدث جهاز خاص بفحص مرض الكورونا (COVID-19) طريقة الفحص تؤخذ مسحة من البلعوم الأنفي ( عن طريف الأنف) ويتم الفحص بواسطة جهاز ELITE In Genius التابع لشركة ELITECH GROUP MOLECULAR DIAGNOSTICS علما بأن الجهاز تابع لشركة إيطالية ومصنع في اليابان بتقينة RC-PCR" + "en": + "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR​", + "ar": + "يتوفر لدينا أحدث جهاز خاص بفحص مرض الكورونا (COVID-19) طريقة الفحص تؤخذ مسحة من البلعوم الأنفي ( عن طريف الأنف) ويتم الفحص بواسطة جهاز ELITE In Genius التابع لشركة ELITECH GROUP MOLECULAR DIAGNOSTICS علما بأن الجهاز تابع لشركة إيطالية ومصنع في اليابان بتقينة RC-PCR" }, "select-appo": { "en": "Kindly select one of the available appointments from below:", @@ -1254,48 +1865,32 @@ const Map localizedValues = { "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد" }, "covid-alert-info": { - "en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically​", - "ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة​" - }, - "covid-alert-mins": { - "en": "Pay With-in 15 mins", - "ar": "ادفع خلال 15 دقيقة" - }, - "back": { - "en": "Back", - "ar": "رجوع" - }, - "get-directions": { - "en": "Get Directions", - "ar": "احصل على الاتجاهات" - }, - "selected-location": { - "en": "Selected Location:", - "ar": "الموقع المحدد:" - }, - "test-fee": { - "en": "Test Fee", - "ar": "رسوم الاختبار" + "en": + "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically​", + "ar": + "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة​" }, + "covid-alert-mins": {"en": "Pay With-in 15 mins", "ar": "ادفع خلال 15 دقيقة"}, + "back": {"en": "Back", "ar": "رجوع"}, + "get-directions": {"en": "Get Directions", "ar": "احصل على الاتجاهات"}, + "selected-location": {"en": "Selected Location:", "ar": "الموقع المحدد:"}, + "test-fee": {"en": "Test Fee", "ar": "رسوم الاختبار"}, "pay-options": { "en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:" }, - "livecare-service": { - "en": "LiveCare Service", - "ar": "خدمة لايف كير" - }, + "livecare-service": {"en": "LiveCare Service", "ar": "خدمة لايف كير"}, "livecare-service-desc": { - "en": "is to obtain medical advice with a specialist doctor Via a video call", + "en": + "is to obtain medical advice with a specialist doctor Via a video call", "ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو" }, - "why-livecare": { - "en": "WHY LIVECARE", - "ar": "لماذا خدمة اللايف كير" - }, + "why-livecare": {"en": "WHY LIVECARE", "ar": "لماذا خدمة اللايف كير"}, "livecare-point-1": { - "en": "No need to wait you will get Medical consultation immediately via Video call", - "ar": "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو" + "en": + "No need to wait you will get Medical consultation immediately via Video call", + "ar": + "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو" }, "doc-virtual-appo-ins4": { "en": "The doctor will see your medical file", @@ -1306,36 +1901,98 @@ const Map localizedValues = { "ar": "خدمة توصيل الادوية مجانا" }, "livecare-summary": { - "en": "** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness", - "ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية" + "en": + "** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness", + "ar": + "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية" }, "livecare-option-1": { "en": "Get Medical consultation immediately", "ar": "الحصول على الاستشارة فورا" }, - "livecare-option-2": { - "en": "Instant video call", - "ar": "اتصال فيديو فوري" - }, - "livecare-option-3": { - "en": "Book Appointment", - "ar": "حجز موعد" - }, - "livecare-option-4": { - "en": "Schedule video call", - "ar": "اتصال فيديو مجدول" - }, - "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, + "livecare-option-2": {"en": "Instant video call", "ar": "اتصال فيديو فوري"}, + "livecare-option-3": {"en": "Book Appointment", "ar": "حجز موعد"}, + "livecare-option-4": {"en": "Schedule video call", "ar": "اتصال فيديو مجدول"}, "sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"}, - "code_failure": {"en": "Didn’t received the code", "ar": "لم أستلم رمز التحقق"}, + "code_failure": { + "en": "Didn’t received the code", + "ar": "لم أستلم رمز التحقق" + }, "resend": {"en": "Resend", "ar": "إعادة إرسال"}, "submitncontinue": {"en": "Submit and continue", "ar": "إرسال ومتابعة"}, - "areyousure": {"en": "Are you sure you want to Add", "ar": "هل أنت متأكد أنك تريد إضافة"}, - "preferredunit": {"en": "Select the preferred unit", "ar": "اختر الوحدة المفضلة"}, + "areyousure": { + "en": "Are you sure you want to Add", + "ar": "هل أنت متأكد أنك تريد إضافة" + }, + "preferredunit": { + "en": "Select the preferred unit", + "ar": "اختر الوحدة المفضلة" + }, "select-unit": {"en": "Select unit", "ar": "اختر وحدة القياس"}, - "app-update": { - "en": "UPDATE THE APP", - "ar": "تحديث التطبيق" + "try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'}, + + "app-update": {"en": "UPDATE THE APP", "ar": "تحديث التطبيق"}, + "covid-alert": {"en": "Alert", "ar": "تنبيه"}, + "enterIdentificationNumber": { + "en": "Enter Identification Number", + "ar": "أدخل رقم التعريف" + }, + "accountActivationDesc": { + "en": + "This service allows you to activate your LAKUM account after registering through the Vida system.", + "ar": + "تتيح لك هذه الخدمة تفعيل حساب LAKUM الخاص بك بعد التسجيل من خلال نظام Vida." }, - // "visit": {"en" : "Visit", "ar": "الزيارة"}, + "pointsToTransfer": { + "en": "Point's to Transfer :", + "ar": "النقاط المراد تحويلها:" + }, + "enterBeneficiaryAccountNo": { + "en": "Enter Beneficiary Account No.", + "ar": "أدخل رقم حساب المستفيد" + }, + "confirm-prescription": { + "en": "Are you sure !! you want to send this request", + "ar": "تاكيد ارسال الطلب؟" + }, + "you-already-have-order": { + "en": "You already have this order! do you want to view it?", + "ar": "لديك هذا الطلب بالفعل! هل تريد مشاهدته؟" + }, + "order-overview": {"en": "Order Overview", "ar": "ملخص الطلب"}, + "shipping-address": {"en": "Delivery Address", "ar": "عنوان التوصيل"}, + "pharmacy-relogin": { + "en": "Your session has timed out, Please try again", + "ar": "انتهت مهلة جلسة الخاص بها. يرجى المحاولة مرة أخرى" + }, + "ancillary-orders": {"en": "Ancillary Orders", "ar": "الأوامر التبعية"}, + + "onlineCheckInAgreement": { + "en": + "The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are:signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries​", + "ar": + "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" + }, + "MRN": {"en": "MRN", "ar": "ایم آر این"}, + "appointment-date": {"en": "Appointment Date", "ar": "تقرری کی تاریخ"}, + "appointment-no": {"en": "Appointment No", "ar": "تقرری نمبر"}, + "insurance-id": {"en": "Insurance ID", "ar": "انشورنس ID"}, + "chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"}, + "errorChiefComplaints": { + "en": "Please Chief Complaints", + "ar": "يرجى ادخال الشكوى الرئيسة" + }, + "errorExpectedArrivalTimes": { + "en": "Please Expected arrival time", + "ar": "يرجى ادخال الوقت المتوقع للوصول" + }, + "expectedArrivalTime": { + "en": "Expected arrival time", + "ar": "الوقت المتوقع للوصول" + }, + "add-address": {"en": "Add new address", "ar": "اضف عنوان جديد"}, + "enter-file": { + "en": "Please enter the mobile number and the medical file number", + "ar": "الرجاء إدخال رقم الجوال ورقم الملف الطبي" + } }; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 0e56e30b..caada21f 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -20,8 +20,10 @@ const IS_VIBRATION = 'is_vibration'; const THEME_VALUE = 'is_vibration'; const MAIN_USER = 'main-user'; const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited'; -const HMG_GEOFENCES = 'hmg-geo-fences'; const PHARMACY_CUSTOMER_ID = 'costumer-id'; +const IS_ROBOT_VISIBLE = 'robot-visible'; +const IS_ROBOT_INIT = 'robot-init'; +const HMG_GEOFENCES = 'hmg-geo-fences'; const WEATHER = 'weather'; const BLOOD_TYPE = 'blood-type'; const NOTIFICATION_COUNT = 'notification-count'; diff --git a/lib/core/model/er/ErPatientShareModel.dart b/lib/core/model/er/ErPatientShareModel.dart new file mode 100644 index 00000000..4c6a4165 --- /dev/null +++ b/lib/core/model/er/ErPatientShareModel.dart @@ -0,0 +1,92 @@ +class ErPatientShareModel { + int cashPrice; + int cashPriceTax; + int cashPriceWithTax; + int companyId; + String companyName; + int companyShareWithTax; + dynamic errCode; + int groupID; + dynamic insurancePolicyNo; + String message; + dynamic patientCardID; + double patientShare; + double patientShareWithTax; + double patientTaxAmount; + int policyId; + String policyName; + String procedureName; + dynamic setupID; + int statusCode; + dynamic subPolicyNo; + + ErPatientShareModel( + {this.cashPrice, + this.cashPriceTax, + this.cashPriceWithTax, + this.companyId, + this.companyName, + this.companyShareWithTax, + this.errCode, + this.groupID, + this.insurancePolicyNo, + this.message, + this.patientCardID, + this.patientShare, + this.patientShareWithTax, + this.patientTaxAmount, + this.policyId, + this.policyName, + this.procedureName, + this.setupID, + this.statusCode, + this.subPolicyNo}); + + ErPatientShareModel.fromJson(Map json) { + cashPrice = json['CashPrice']; + cashPriceTax = json['CashPriceTax']; + cashPriceWithTax = json['CashPriceWithTax']; + companyId = json['CompanyId']; + companyName = json['CompanyName']; + companyShareWithTax = json['CompanyShareWithTax']; + errCode = json['ErrCode']; + groupID = json['GroupID']; + insurancePolicyNo = json['InsurancePolicyNo']; + message = json['Message']; + patientCardID = json['PatientCardID']; + patientShare = json['PatientShare']; + patientShareWithTax = json['PatientShareWithTax']; + patientTaxAmount = json['PatientTaxAmount']; + policyId = json['PolicyId']; + policyName = json['PolicyName']; + procedureName = json['ProcedureName']; + setupID = json['SetupID']; + statusCode = json['StatusCode']; + subPolicyNo = json['SubPolicyNo']; + } + + Map toJson() { + final Map data = new Map(); + data['CashPrice'] = this.cashPrice; + data['CashPriceTax'] = this.cashPriceTax; + data['CashPriceWithTax'] = this.cashPriceWithTax; + data['CompanyId'] = this.companyId; + data['CompanyName'] = this.companyName; + data['CompanyShareWithTax'] = this.companyShareWithTax; + data['ErrCode'] = this.errCode; + data['GroupID'] = this.groupID; + data['InsurancePolicyNo'] = this.insurancePolicyNo; + data['Message'] = this.message; + data['PatientCardID'] = this.patientCardID; + data['PatientShare'] = this.patientShare; + data['PatientShareWithTax'] = this.patientShareWithTax; + data['PatientTaxAmount'] = this.patientTaxAmount; + data['PolicyId'] = this.policyId; + data['PolicyName'] = this.policyName; + data['ProcedureName'] = this.procedureName; + data['SetupID'] = this.setupID; + data['StatusCode'] = this.statusCode; + data['SubPolicyNo'] = this.subPolicyNo; + return data; + } +} diff --git a/lib/core/model/er/TriageInformationRequest.dart b/lib/core/model/er/TriageInformationRequest.dart new file mode 100644 index 00000000..a9717d3d --- /dev/null +++ b/lib/core/model/er/TriageInformationRequest.dart @@ -0,0 +1,147 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; + +class TriageInformationRequest { + double versionID; + int channel; + int languageID; + String iPAdress; + String sessionID; + int patientID; + String tokenID; + String generalid; + int patientOutSA; + int patientTypeID; + int patientType; + int projectID; + ERTriageInformation eRTriageInformation; + HospitalsModel selectedHospital; + TriageInformationRequest( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.sessionID, + this.patientID, + this.tokenID, + this.generalid, + this.patientOutSA, + this.patientTypeID, + this.patientType, + this.projectID, + this.eRTriageInformation,this.selectedHospital}); + + TriageInformationRequest.fromJson(Map json) { + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + sessionID = json['SessionID']; + patientID = json['PatientID']; + tokenID = json['TokenID']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + patientTypeID = json['PatientTypeID']; + patientType = json['PatientType']; + projectID = json['ProjectID']; + eRTriageInformation = json['ERTriageInformation'] != null + ? new ERTriageInformation.fromJson(json['ERTriageInformation']) + : null; + } + + Map toJson() { + final Map data = new Map(); + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['SessionID'] = this.sessionID; + data['PatientID'] = this.patientID; + data['TokenID'] = this.tokenID; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['ProjectID'] = this.projectID; + if (this.eRTriageInformation != null) { + data['ERTriageInformation'] = this.eRTriageInformation.toJson(); + } + return data; + } +} + +class ERTriageInformation { + String notes; + String chiefComplaint; + int patientId; + int projectId; + int riskScore; + List checklist; + + ERTriageInformation( + {this.notes, + this.chiefComplaint, + this.patientId, + this.projectId, + this.riskScore, + this.checklist}); + + ERTriageInformation.fromJson(Map json) { + notes = json['Notes']; + chiefComplaint = json['ChiefComplaint']; + patientId = json['PatientId']; + projectId = json['ProjectId']; + riskScore = json['RiskScore']; + if (json['checklist'] != null) { + checklist = new List(); + json['checklist'].forEach((v) { + checklist.add(new Checklist.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['Notes'] = this.notes; + data['ChiefComplaint'] = this.chiefComplaint; + data['PatientId'] = this.patientId; + data['ProjectId'] = this.projectId; + data['RiskScore'] = this.riskScore; + if (this.checklist != null) { + data['checklist'] = this.checklist.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class Checklist { + int isSelected; + int parameterCode; + int parameterGroup; + int parameterType; + int score; + + Checklist( + {this.isSelected, + this.parameterCode, + this.parameterGroup, + this.parameterType, + this.score}); + + Checklist.fromJson(Map json) { + isSelected = json['IsSelected']; + parameterCode = json['ParameterCode']; + parameterGroup = json['ParameterGroup']; + parameterType = json['ParameterType']; + score = json['Score']; + } + + Map toJson() { + final Map data = new Map(); + data['IsSelected'] = this.isSelected; + data['ParameterCode'] = this.parameterCode; + data['ParameterGroup'] = this.parameterGroup; + data['ParameterType'] = this.parameterType; + data['Score'] = this.score; + return data; + } +} diff --git a/lib/core/model/er/TriageQuestionsModel.dart b/lib/core/model/er/TriageQuestionsModel.dart new file mode 100644 index 00000000..8960973e --- /dev/null +++ b/lib/core/model/er/TriageQuestionsModel.dart @@ -0,0 +1,52 @@ +class TriageQuestionsModel { + String adultPoints; + String headerSequence; + int parameterCode; + int parameterGroup; + int parameterType; + String pediaPoints; + String question; + String questionN; + String scoreGroup; + String titles; + + TriageQuestionsModel( + {this.adultPoints, + this.headerSequence, + this.parameterCode, + this.parameterGroup, + this.parameterType, + this.pediaPoints, + this.question, + this.questionN, + this.scoreGroup, + this.titles}); + + TriageQuestionsModel.fromJson(Map json) { + adultPoints = json['AdultPoints']; + headerSequence = json['HeaderSequence']; + parameterCode = json['ParameterCode']; + parameterGroup = json['ParameterGroup']; + parameterType = json['ParameterType']; + pediaPoints = json['PediaPoints']; + question = json['Question']; + questionN = json['QuestionN']; + scoreGroup = json['ScoreGroup']; + titles = json['Titles']; + } + + Map toJson() { + final Map data = new Map(); + data['AdultPoints'] = this.adultPoints; + data['HeaderSequence'] = this.headerSequence; + data['ParameterCode'] = this.parameterCode; + data['ParameterGroup'] = this.parameterGroup; + data['ParameterType'] = this.parameterType; + data['PediaPoints'] = this.pediaPoints; + data['Question'] = this.question; + data['QuestionN'] = this.questionN; + data['ScoreGroup'] = this.scoreGroup; + data['Titles'] = this.titles; + return data; + } +} diff --git a/lib/core/model/hospitals/hospitals_model.dart b/lib/core/model/hospitals/hospitals_model.dart index 264528c7..246de0b1 100644 --- a/lib/core/model/hospitals/hospitals_model.dart +++ b/lib/core/model/hospitals/hospitals_model.dart @@ -1,11 +1,11 @@ class HospitalsModel { String desciption; - Null desciptionN; + dynamic desciptionN; dynamic iD; String legalName; String legalNameN; String name; - Null nameN; + dynamic nameN; String phoneNumber; String setupID; dynamic distanceInKilometers; @@ -13,7 +13,7 @@ class HospitalsModel { String latitude; String longitude; dynamic mainProjectID; - Null projectOutSA; + dynamic projectOutSA; bool usingInDoctorApp; HospitalsModel( diff --git a/lib/core/model/pharmacies/BillingAddress.dart b/lib/core/model/pharmacies/BillingAddress.dart index 765ac54d..418b28a7 100644 --- a/lib/core/model/pharmacies/BillingAddress.dart +++ b/lib/core/model/pharmacies/BillingAddress.dart @@ -1,3 +1,5 @@ +import 'package:google_maps_flutter/google_maps_flutter.dart'; + class BillingAddress { String id; String firstName; @@ -81,4 +83,19 @@ class BillingAddress { data['lat_long'] = this.latLong; return data; } + + LatLng getLocation(){ + if(latLong.contains(',')){ + var parts = latLong.trim().split(','); + if(parts.length == 2){ + var lat = double.tryParse(parts.first); + var lng = double.tryParse(parts.last); + if(lat != null || lng != null) { + var location = LatLng(lat, lng); + return location; + } + } + } + return null; + } } diff --git a/lib/core/model/pharmacies/Customer.dart b/lib/core/model/pharmacies/Customer.dart index e3defbbe..9042930e 100644 --- a/lib/core/model/pharmacies/Customer.dart +++ b/lib/core/model/pharmacies/Customer.dart @@ -32,6 +32,7 @@ class Customer { String lastLoginDateUtc; String lastActivityDateUtc; int registeredInStoreId; + List roleIds; Customer( {this.billingAddress, @@ -63,7 +64,8 @@ class Customer { this.createdOnUtc, this.lastLoginDateUtc, this.lastActivityDateUtc, - this.registeredInStoreId}); + this.registeredInStoreId, + this.roleIds}); Customer.fromJson(Map json) { billingAddress = json['billing_address'] != null @@ -105,6 +107,12 @@ class Customer { lastLoginDateUtc = json['last_login_date_utc']; lastActivityDateUtc = json['last_activity_date_utc']; registeredInStoreId = json['registered_in_store_id']; + if (json['role_ids'] != null) { + roleIds = new List(); + json['role_ids'].forEach((v) { + roleIds.add(v); + }); + } } Map toJson() { @@ -145,6 +153,7 @@ class Customer { data['last_login_date_utc'] = this.lastLoginDateUtc; data['last_activity_date_utc'] = this.lastActivityDateUtc; data['registered_in_store_id'] = this.registeredInStoreId; + data['role_ids'] = this.roleIds; return data; } } diff --git a/lib/core/model/pharmacies/PharmacyProduct.dart b/lib/core/model/pharmacies/PharmacyProduct.dart index c472cb4c..f69d035b 100644 --- a/lib/core/model/pharmacies/PharmacyProduct.dart +++ b/lib/core/model/pharmacies/PharmacyProduct.dart @@ -4,29 +4,29 @@ import 'PharmacyImageObject.dart'; import 'Reviews.dart'; class PharmacyProduct { - String id; + dynamic id; bool visibleIndividually; - String name; - String namen; - String shortDescription; - String shortDescriptionn; - String fullDescription; - String fullDescriptionn; + dynamic name; + dynamic namen; + dynamic shortDescription; + dynamic shortDescriptionn; + dynamic fullDescription; + dynamic fullDescriptionn; bool markasNew; bool showOnHomePage; - String metaKeywords; - String metaDescription; - String metaTitle; + dynamic metaKeywords; + dynamic metaDescription; + dynamic metaTitle; bool allowCustomerReviews; int approvedRatingSum; int notApprovedRatingSum; int approvedTotalReviews; int notApprovedTotalReviews; - String sku; + dynamic sku; bool isRx; bool prescriptionRequired; - String rxMessage; - String rxMessagen; + dynamic rxMessage; + dynamic rxMessagen; String manufacturerPartNumber; String gtin; bool isGiftCard; @@ -115,118 +115,117 @@ class PharmacyProduct { int vendorId; String seName; - PharmacyProduct( {this.id, - this.visibleIndividually, - this.name, - this.namen, - this.shortDescription, - this.shortDescriptionn, - this.fullDescription, - this.fullDescriptionn, - this.markasNew, - this.showOnHomePage, - this.metaKeywords, - this.metaDescription, - this.metaTitle, - this.allowCustomerReviews, - this.approvedRatingSum, - this.notApprovedRatingSum, - this.approvedTotalReviews, - this.notApprovedTotalReviews, - this.sku, - this.isRx, - this.prescriptionRequired, - this.rxMessage, - this.rxMessagen, - this.manufacturerPartNumber, - this.gtin, - this.isGiftCard, - this.requireOtherProducts, - this.automaticallyAddRequiredProducts, - this.isDownload, - this.unlimitedDownloads, - this.maxNumberOfDownloads, - this.downloadExpirationDays, - this.hasSampleDownload, - this.hasUserAgreement, - this.isRecurring, - this.recurringCycleLength, - this.recurringTotalCycles, - this.isRental, - this.rentalPriceLength, - this.isShipEnabled, - this.isFreeShipping, - this.shipSeparately, - this.additionalShippingCharge, - this.isTaxExempt, - this.isTelecommunicationsOrBroadcastingOrElectronicServices, - this.useMultipleWarehouses, - this.manageInventoryMethodId, - this.stockQuantity, - this.stockAvailability, - this.stockAvailabilityn, - this.displayStockAvailability, - this.displayStockQuantity, - this.minStockQuantity, - this.notifyAdminForQuantityBelow, - this.allowBackInStockSubscriptions, - this.orderMinimumQuantity, - this.orderMaximumQuantity, - this.allowedQuantities, - this.allowAddingOnlyExistingAttributeCombinations, - this.disableBuyButton, - this.disableWishlistButton, - this.availableForPreOrder, - this.preOrderAvailabilityStartDateTimeUtc, - this.callForPrice, - this.price, - this.oldPrice, - this.productCost, - this.specialPrice, - this.specialPriceStartDateTimeUtc, - this.specialPriceEndDateTimeUtc, - this.customerEntersPrice, - this.minimumCustomerEnteredPrice, - this.maximumCustomerEnteredPrice, - this.basepriceEnabled, - this.basepriceAmount, - this.basepriceBaseAmount, - this.hasTierPrices, - this.hasDiscountsApplied, - this.discountName, - this.discountNamen, - this.discountDescription, - this.discountDescriptionn, - this.discountPercentage, - this.currency, - this.currencyn, - this.weight, - this.length, - this.width, - this.height, - this.availableStartDateTimeUtc, - this.availableEndDateTimeUtc, - this.displayOrder, - this.published, - this.deleted, - this.createdOnUtc, - this.updatedOnUtc, - this.productType, - this.parentGroupedProductId, - this.roleIds, - this.discountIds, - this.storeIds, - this.manufacturerIds, - this.reviews, - this.images, - this.attributes, - this.specifications, - this.associatedProductIds, - this.tags, - this.vendorId, - this.seName}); + this.visibleIndividually, + this.name, + this.namen, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName}); PharmacyProduct.fromJson(Map json) { id = json['id']; @@ -257,7 +256,7 @@ class PharmacyProduct { isGiftCard = json['is_gift_card']; requireOtherProducts = json['require_other_products']; automaticallyAddRequiredProducts = - json['automatically_add_required_products']; + json['automatically_add_required_products']; isDownload = json['is_download']; unlimitedDownloads = json['unlimited_downloads']; maxNumberOfDownloads = json['max_number_of_downloads']; @@ -275,7 +274,7 @@ class PharmacyProduct { additionalShippingCharge = json['additional_shipping_charge']; isTaxExempt = json['is_tax_exempt']; isTelecommunicationsOrBroadcastingOrElectronicServices = - json['is_telecommunications_or_broadcasting_or_electronic_services']; + json['is_telecommunications_or_broadcasting_or_electronic_services']; useMultipleWarehouses = json['use_multiple_warehouses']; manageInventoryMethodId = json['manage_inventory_method_id']; stockQuantity = json['stock_quantity']; @@ -290,12 +289,12 @@ class PharmacyProduct { orderMaximumQuantity = json['order_maximum_quantity']; allowedQuantities = json['allowed_quantities']; allowAddingOnlyExistingAttributeCombinations = - json['allow_adding_only_existing_attribute_combinations']; + json['allow_adding_only_existing_attribute_combinations']; disableBuyButton = json['disable_buy_button']; disableWishlistButton = json['disable_wishlist_button']; availableForPreOrder = json['available_for_pre_order']; preOrderAvailabilityStartDateTimeUtc = - json['pre_order_availability_start_date_time_utc']; + json['pre_order_availability_start_date_time_utc']; callForPrice = json['call_for_price']; price = json['price']; oldPrice = json['old_price']; diff --git a/lib/core/model/pharmacies/Reviews.dart b/lib/core/model/pharmacies/Reviews.dart index f924dce3..2c767cdd 100644 --- a/lib/core/model/pharmacies/Reviews.dart +++ b/lib/core/model/pharmacies/Reviews.dart @@ -10,13 +10,13 @@ class Reviews { bool isApproved; String title; String reviewText; - Null replyText; + String replyText; int rating; int helpfulYesTotal; int helpfulNoTotal; String createdOnUtc; Customer customer; - Null product; + //Null product; Reviews( {this.id, @@ -34,7 +34,8 @@ class Reviews { this.helpfulNoTotal, this.createdOnUtc, this.customer, - this.product}); + // this.product + }); Reviews.fromJson(Map json) { id = json['id']; @@ -54,7 +55,7 @@ class Reviews { customer = json['customer'] != null ? new Customer.fromJson(json['customer']) : null; - product = json['product']; + // product = json['product']; } Map toJson() { @@ -76,7 +77,7 @@ class Reviews { if (this.customer != null) { data['customer'] = this.customer.toJson(); } - data['product'] = this.product; + // data['product'] = this.product; return data; } } \ No newline at end of file diff --git a/lib/core/model/pharmacies/ShoppingCart.dart b/lib/core/model/pharmacies/ShoppingCart.dart index f965203a..4bd460aa 100644 --- a/lib/core/model/pharmacies/ShoppingCart.dart +++ b/lib/core/model/pharmacies/ShoppingCart.dart @@ -7,22 +7,33 @@ class ShoppingCart { // List productAttributes; double customerEnteredPrice; int quantity; - String discountAmountInclTax; - String subtotal; - String subtotalWithVat; - String subtotalVatAmount; - String subtotalVatRate; - String currency; - String currencyn; - String rentalStartDateUtc; - String rentalEndDateUtc; - String createdOnUtc; - String updatedOnUtc; - String shoppingCartType; + dynamic discountAmountInclTax; + dynamic subtotal; + dynamic subtotalWithVat; + dynamic subtotalVatAmount; + dynamic subtotalVatRate; + dynamic currency; + dynamic currencyn; + dynamic rentalStartDateUtc; + dynamic rentalEndDateUtc; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic shoppingCartType; int productId; PharmacyProduct product; int customerId; Customer customer; + double unitPriceInclTax; + double unitPriceExclTax; + double priceInclTax; + double priceExclTax; + dynamic discountAmountExclTax; + double originalProductCost; + String attributeDescription; + int downloadCount; + bool isDownloadActivated; + int licenseDownloadId; + double itemWeight; ShoppingCart( {this.languageId, @@ -45,7 +56,19 @@ class ShoppingCart { this.productId, this.product, this.customerId, - this.customer}); + this.customer, + this.unitPriceInclTax, + this.unitPriceExclTax, + this.priceInclTax, + this.priceExclTax, + this.discountAmountExclTax, + this.originalProductCost, + this.attributeDescription, + this.downloadCount, + this.isDownloadActivated, + this.licenseDownloadId, + this.itemWeight, + }); ShoppingCart.fromJson(Map json) { languageId = json['language_id']; @@ -78,6 +101,18 @@ class ShoppingCart { customer = json['customer'] != null ? new Customer.fromJson(json['customer']) : null; + + unitPriceInclTax = json['unit_price_incl_tax']; + unitPriceExclTax = json['unit_price_excl_tax']; + priceInclTax = json['price_incl_tax']; + priceExclTax = json['price_excl_tax']; + discountAmountExclTax = json['discount_amount_excl_tax']; + originalProductCost = json['original_product_cost']; + attributeDescription = json['attribute_description']; + downloadCount = json['download_count']; + isDownloadActivated = json['isDownload_activated']; + licenseDownloadId = json['license_download_id']; + itemWeight = json['item_weight']; } Map toJson() { @@ -110,6 +145,18 @@ class ShoppingCart { if (this.customer != null) { data['customer'] = this.customer.toJson(); } + data['unit_price_incl_tax'] = this.unitPriceInclTax; + data['unit_price_excl_tax'] = this.unitPriceExclTax; + data['price_incl_tax'] = this.priceInclTax; + data['price_excl_tax'] = this.priceExclTax; + data['discount_amount_excl_tax'] = this.discountAmountExclTax; + data['original_product_cost'] = this.originalProductCost; + data['attribute_description'] = this.attributeDescription; + data['download_count'] = this.downloadCount; + data['isDownload_activated'] = this.isDownloadActivated; + data['license_download_id'] = this.licenseDownloadId; + data['item_weight'] = this.itemWeight; + return data; } } diff --git a/lib/core/model/pharmacies/order_detail.dart b/lib/core/model/pharmacies/order_detail.dart new file mode 100644 index 00000000..74e89295 --- /dev/null +++ b/lib/core/model/pharmacies/order_detail.dart @@ -0,0 +1,305 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/BillingAddress.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Customer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; + +class OrderDetailModel { + String id; + int storeId; + String orderGuid; + bool pickUpInStore; + String paymentMethodSystemName; + String paymentName; + String paymentNamen; + String customerCurrencyCode; + dynamic currencyRate; + dynamic customerTaxDisplayTypeId; + dynamic vatNumber; + double orderSubtotalInclTax; + double orderSubtotalExclTax; + dynamic orderSubTotalDiscountInclTax; + dynamic orderSubTotalDiscountExclTax; + double orderShippingInclTax; + dynamic orderShippingExclTax; + dynamic paymentMethodAdditionalFeeInclTax; + dynamic paymentMethodAdditionalFeeExclTax; + String taxRates; + double orderTax; + dynamic orderDiscount; + dynamic productCount; + dynamic orderTotal; + dynamic refundedAmount; + dynamic rewardPointsWereAdded; + dynamic rxAttachments; + String checkoutAttributeDescription; + int customerLanguageId; + int affiliateId; + String customerIp; + dynamic authorizationTransactionId; + dynamic authorizationTransactionCode; + dynamic authorizationTransactionResult; + dynamic captureTransactionId; + dynamic captureTransactionResult; + dynamic subscriptionTransactionId; + dynamic paidDateUtc; + String shippingMethod; + String shippingRateComputationMethodSystemName; + String customValuesXml; + bool deleted; + String createdOnUtc; + Customer customer; + int customerId; + BillingAddress billingAddress; + BillingAddress shippingAddress; + List orderItems; + int orderStatusId; + String orderStatus; + String orderStatusn; + int paymentStatusId; + String paymentStatus; + String paymentStatusn; + String shippingStatus; + String shippingStatusn; + String customerTaxDisplayType; + bool canCancel; + bool canRefund; + dynamic lakumAmount; + String preferDeliveryDate; + String preferDeliveryTime; + String preferDeliveryTimen; + String driverOTP; + String driverID; + + OrderDetailModel( + {this.id, + this.storeId, + this.orderGuid, + this.pickUpInStore, + this.paymentMethodSystemName, + this.paymentName, + this.paymentNamen, + this.customerCurrencyCode, + this.currencyRate, + this.customerTaxDisplayTypeId, + this.vatNumber, + this.orderSubtotalInclTax, + this.orderSubtotalExclTax, + this.orderSubTotalDiscountInclTax, + this.orderSubTotalDiscountExclTax, + this.orderShippingInclTax, + this.orderShippingExclTax, + this.paymentMethodAdditionalFeeInclTax, + this.paymentMethodAdditionalFeeExclTax, + this.taxRates, + this.orderTax, + this.orderDiscount, + this.productCount, + this.orderTotal, + this.refundedAmount, + this.rewardPointsWereAdded, + this.rxAttachments, + this.checkoutAttributeDescription, + this.customerLanguageId, + this.affiliateId, + this.customerIp, + this.authorizationTransactionId, + this.authorizationTransactionCode, + this.authorizationTransactionResult, + this.captureTransactionId, + this.captureTransactionResult, + this.subscriptionTransactionId, + this.paidDateUtc, + this.shippingMethod, + this.shippingRateComputationMethodSystemName, + this.customValuesXml, + this.deleted, + this.createdOnUtc, + this.customer, + this.customerId, + this.billingAddress, + this.shippingAddress, + this.orderItems, + this.orderStatusId, + this.orderStatus, + this.orderStatusn, + this.paymentStatusId, + this.paymentStatus, + this.paymentStatusn, + this.shippingStatus, + this.shippingStatusn, + this.customerTaxDisplayType, + this.canCancel, + this.canRefund, + this.lakumAmount, + this.preferDeliveryDate, + this.preferDeliveryTime, + this.preferDeliveryTimen, + this.driverID, + this.driverOTP,}); + + OrderDetailModel.fromJson(Map json) { + id = json['id']; + storeId = json['store_id']; + orderGuid = json['order_guid']; + pickUpInStore = json['pick_up_in_store']; + paymentMethodSystemName = json['payment_method_system_name']; + paymentName = json['payment_name']; + paymentNamen = json['payment_namen']; + customerCurrencyCode = json['customer_currency_code']; + currencyRate = json['currency_rate']; + customerTaxDisplayTypeId = json['customer_tax_display_type_id']; + vatNumber = json['vat_number']; + orderSubtotalInclTax = json['order_subtotal_incl_tax']; + orderSubtotalExclTax = json['order_subtotal_excl_tax']; + orderSubTotalDiscountInclTax = json['order_sub_total_discount_incl_tax']; + orderSubTotalDiscountExclTax = json['order_sub_total_discount_excl_tax']; + orderShippingInclTax = json['order_shipping_incl_tax']; + orderShippingExclTax = json['order_shipping_excl_tax']; + paymentMethodAdditionalFeeInclTax = + json['payment_method_additional_fee_incl_tax']; + paymentMethodAdditionalFeeExclTax = + json['payment_method_additional_fee_excl_tax']; + taxRates = json['tax_rates']; + orderTax = json['order_tax']; + orderDiscount = json['order_discount']; + productCount = json['product_count']; + orderTotal = json['order_total']; + refundedAmount = json['refunded_amount']; + rewardPointsWereAdded = json['reward_points_were_added']; + rxAttachments = json['rx_attachments']; + checkoutAttributeDescription = json['checkout_attribute_description']; + customerLanguageId = json['customer_language_id']; + affiliateId = json['affiliate_id']; + customerIp = json['customer_ip']; + authorizationTransactionId = json['authorization_transaction_id']; + authorizationTransactionCode = json['authorization_transaction_code']; + authorizationTransactionResult = json['authorization_transaction_result']; + captureTransactionId = json['capture_transaction_id']; + captureTransactionResult = json['capture_transaction_result']; + subscriptionTransactionId = json['subscription_transaction_id']; + paidDateUtc = json['paid_date_utc']; + shippingMethod = json['shipping_method']; + shippingRateComputationMethodSystemName = + json['shipping_rate_computation_method_system_name']; + customValuesXml = json['custom_values_xml']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + customer = json['customer'] != null + ? new Customer.fromJson(json['customer']) + : null; + customerId = json['customer_id']; + billingAddress = json['billing_address'] != null + ? new BillingAddress.fromJson(json['billing_address']) + : null; + shippingAddress = json['shipping_address'] != null + ? new BillingAddress.fromJson(json['shipping_address']) + : null; + if (json['order_items'] != null) { + orderItems = new List(); + json['order_items'].forEach((v) { + orderItems.add(new ShoppingCart.fromJson(v)); + }); + } + orderStatusId = json['order_status_id']; + orderStatus = json['order_status']; + orderStatusn = json['order_statusn']; + paymentStatusId = json['payment_status_id']; + paymentStatus = json['payment_status']; + paymentStatusn = json['payment_statusn']; + shippingStatus = json['shipping_status']; + shippingStatusn = json['shipping_statusn']; + customerTaxDisplayType = json['customer_tax_display_type']; + canCancel = json['can_cancel']; + canRefund = json['can_refund']; + lakumAmount = json['lakum_amount']; + preferDeliveryDate = json['prefer_delivery_date']; + preferDeliveryTime = json['prefer_delivery_time']; + preferDeliveryTimen = json['prefer_delivery_timen']; + + // Driver Detail + driverID: json["DriverID"]; + driverOTP: json["DriverOTP"]; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['store_id'] = this.storeId; + data['order_guid'] = this.orderGuid; + data['pick_up_in_store'] = this.pickUpInStore; + data['payment_method_system_name'] = this.paymentMethodSystemName; + data['payment_name'] = this.paymentName; + data['payment_namen'] = this.paymentNamen; + data['customer_currency_code'] = this.customerCurrencyCode; + data['currency_rate'] = this.currencyRate; + data['customer_tax_display_type_id'] = this.customerTaxDisplayTypeId; + data['vat_number'] = this.vatNumber; + data['order_subtotal_incl_tax'] = this.orderSubtotalInclTax; + data['order_subtotal_excl_tax'] = this.orderSubtotalExclTax; + data['order_sub_total_discount_incl_tax'] = + this.orderSubTotalDiscountInclTax; + data['order_sub_total_discount_excl_tax'] = + this.orderSubTotalDiscountExclTax; + data['order_shipping_incl_tax'] = this.orderShippingInclTax; + data['order_shipping_excl_tax'] = this.orderShippingExclTax; + data['payment_method_additional_fee_incl_tax'] = + this.paymentMethodAdditionalFeeInclTax; + data['payment_method_additional_fee_excl_tax'] = + this.paymentMethodAdditionalFeeExclTax; + data['tax_rates'] = this.taxRates; + data['order_tax'] = this.orderTax; + data['order_discount'] = this.orderDiscount; + data['product_count'] = this.productCount; + data['order_total'] = this.orderTotal; + data['refunded_amount'] = this.refundedAmount; + data['reward_points_were_added'] = this.rewardPointsWereAdded; + data['rx_attachments'] = this.rxAttachments; + data['checkout_attribute_description'] = this.checkoutAttributeDescription; + data['customer_language_id'] = this.customerLanguageId; + data['affiliate_id'] = this.affiliateId; + data['customer_ip'] = this.customerIp; + data['authorization_transaction_id'] = this.authorizationTransactionId; + data['authorization_transaction_code'] = this.authorizationTransactionCode; + data['authorization_transaction_result'] = + this.authorizationTransactionResult; + data['capture_transaction_id'] = this.captureTransactionId; + data['capture_transaction_result'] = this.captureTransactionResult; + data['subscription_transaction_id'] = this.subscriptionTransactionId; + data['paid_date_utc'] = this.paidDateUtc; + data['shipping_method'] = this.shippingMethod; + data['shipping_rate_computation_method_system_name'] = + this.shippingRateComputationMethodSystemName; + data['custom_values_xml'] = this.customValuesXml; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + if (this.customer != null) { + data['customer'] = this.customer.toJson(); + } + data['customer_id'] = this.customerId; + if (this.billingAddress != null) { + data['billing_address'] = this.billingAddress.toJson(); + } + if (this.shippingAddress != null) { + data['shipping_address'] = this.shippingAddress.toJson(); + } + if (this.orderItems != null) { + data['order_items'] = this.orderItems.map((v) => v.toJson()).toList(); + } + data['order_status_id'] = this.orderStatusId; + data['order_status'] = this.orderStatus; + data['order_statusn'] = this.orderStatusn; + data['payment_status_id'] = this.paymentStatusId; + data['payment_status'] = this.paymentStatus; + data['payment_statusn'] = this.paymentStatusn; + data['shipping_status'] = this.shippingStatus; + data['shipping_statusn'] = this.shippingStatusn; + data['customer_tax_display_type'] = this.customerTaxDisplayType; + data['can_cancel'] = this.canCancel; + data['can_refund'] = this.canRefund; + data['lakum_amount'] = this.lakumAmount; + data['prefer_delivery_date'] = this.preferDeliveryDate; + data['prefer_delivery_time'] = this.preferDeliveryTime; + data['prefer_delivery_timen'] = this.preferDeliveryTimen; + return data; + } + +} \ No newline at end of file diff --git a/lib/core/model/pharmacies/order_model.dart b/lib/core/model/pharmacies/order_model.dart index 776c21ec..d025faa6 100644 --- a/lib/core/model/pharmacies/order_model.dart +++ b/lib/core/model/pharmacies/order_model.dart @@ -9,6 +9,73 @@ List orderModelFromJson(String str) => List.from(json.de String orderModelToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); class OrderModel { + + String id; + dynamic storeId; + String orderGuid; + bool pickUpInStore; + PaymentMethodSystemName paymentMethodSystemName; + PaymentName paymentName; + PaymentName paymentNamen; + CustomerCurrencyCode customerCurrencyCode; + dynamic currencyRate; + dynamic customerTaxDisplayTypeId; + dynamic vatNumber; + double orderSubtotalInclTax; + double orderSubtotalExclTax; + dynamic orderSubTotalDiscountInclTax; + dynamic orderSubTotalDiscountExclTax; + double orderShippingInclTax; + dynamic orderShippingExclTax; + dynamic paymentMethodAdditionalFeeInclTax; + dynamic paymentMethodAdditionalFeeExclTax; + String taxRates; + double orderTax; + dynamic orderDiscount; + dynamic productCount; + double orderTotal; + dynamic refundedAmount; + dynamic rewardPointsWereAdded; + String rxAttachments; + CheckoutAttributeDescription checkoutAttributeDescription; + dynamic customerLanguageId; + dynamic affiliateId; + CustomerIp customerIp; + String authorizationTransactionId; + dynamic authorizationTransactionCode; + dynamic authorizationTransactionResult; + dynamic captureTransactionId; + dynamic captureTransactionResult; + dynamic subscriptionTransactionId; + DateTime paidDateUtc; + ShippingMethod shippingMethod; + ShippingRateComputationMethodSystemName shippingRateComputationMethodSystemName; + String customValuesXml; + bool deleted; + DateTime createdOnUtc; + OrderModelCustomer customer; + dynamic customerId; + IngAddress billingAddress; + IngAddress shippingAddress; + List orderItems; + dynamic orderStatusId; + OrderStatus orderStatus; + OrderStatusn orderStatusn; + dynamic paymentStatusId; + PaymentStatus paymentStatus; + PaymentStatusn paymentStatusn; + ShippingStatus shippingStatus; + ShippingStatusn shippingStatusn; + CustomerTaxDisplayType customerTaxDisplayType; + bool canCancel; + bool canRefund; + dynamic lakumAmount; + DateTime preferDeliveryDate; + PreferDeliveryTime preferDeliveryTime; + PreferDeliveryTimen preferDeliveryTimen; + String driverOTP; + String driverID; + OrderModel({ this.id, this.storeId, @@ -77,72 +144,6 @@ class OrderModel { this.driverOTP, }); - String id; - dynamic storeId; - String orderGuid; - bool pickUpInStore; - PaymentMethodSystemName paymentMethodSystemName; - PaymentName paymentName; - PaymentName paymentNamen; - CustomerCurrencyCode customerCurrencyCode; - dynamic currencyRate; - dynamic customerTaxDisplayTypeId; - dynamic vatNumber; - double orderSubtotalInclTax; - double orderSubtotalExclTax; - dynamic orderSubTotalDiscountInclTax; - dynamic orderSubTotalDiscountExclTax; - double orderShippingInclTax; - dynamic orderShippingExclTax; - dynamic paymentMethodAdditionalFeeInclTax; - dynamic paymentMethodAdditionalFeeExclTax; - String taxRates; - double orderTax; - dynamic orderDiscount; - dynamic productCount; - double orderTotal; - dynamic refundedAmount; - dynamic rewardPointsWereAdded; - String rxAttachments; - CheckoutAttributeDescription checkoutAttributeDescription; - dynamic customerLanguageId; - dynamic affiliateId; - CustomerIp customerIp; - String authorizationTransactionId; - dynamic authorizationTransactionCode; - dynamic authorizationTransactionResult; - dynamic captureTransactionId; - dynamic captureTransactionResult; - dynamic subscriptionTransactionId; - DateTime paidDateUtc; - ShippingMethod shippingMethod; - ShippingRateComputationMethodSystemName shippingRateComputationMethodSystemName; - String customValuesXml; - bool deleted; - DateTime createdOnUtc; - OrderModelCustomer customer; - dynamic customerId; - IngAddress billingAddress; - IngAddress shippingAddress; - List orderItems; - dynamic orderStatusId; - OrderStatus orderStatus; - OrderStatusn orderStatusn; - dynamic paymentStatusId; - PaymentStatus paymentStatus; - PaymentStatusn paymentStatusn; - ShippingStatus shippingStatus; - ShippingStatusn shippingStatusn; - CustomerTaxDisplayType customerTaxDisplayType; - bool canCancel; - bool canRefund; - dynamic lakumAmount; - DateTime preferDeliveryDate; - PreferDeliveryTime preferDeliveryTime; - PreferDeliveryTimen preferDeliveryTimen; - String driverOTP; - String driverID; - factory OrderModel.fromJson(Map json) => OrderModel( id: json["id"], storeId: json["store_id"], @@ -320,7 +321,7 @@ class IngAddress { DateTime createdOnUtc; dynamic province; String latLong; - + LatLng getLocation(){ if(latLong.contains(',')){ var parts = latLong.trim().split(','); @@ -485,10 +486,10 @@ class OrderModelCustomer { }); String id; - Username username; - BillingAddressEmail email; - FirstName firstName; - LastName lastName; + dynamic username; + dynamic email; + dynamic firstName; + dynamic lastName; String languageId; dynamic adminComment; bool isTaxExempt; @@ -497,10 +498,10 @@ class OrderModelCustomer { bool deleted; bool isSystemAccount; dynamic systemName; - LastIpAddress lastIpAddress; - DateTime createdOnUtc; - DateTime lastLoginDateUtc; - DateTime lastActivityDateUtc; + dynamic lastIpAddress; + dynamic createdOnUtc; + dynamic lastLoginDateUtc; + dynamic lastActivityDateUtc; dynamic registeredInStoreId; List roleIds; @@ -586,6 +587,7 @@ final customerTaxDisplayTypeValues = EnumValues({ "ExcludingTax": CustomerTaxDisplayType.EXCLUDING_TAX }); + class OrderItem { OrderItem({ this.quantity, @@ -876,9 +878,9 @@ class Product { dynamic displayOrder; bool published; bool deleted; - DateTime createdOnUtc; - DateTime updatedOnUtc; - ProductType productType; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic productType; dynamic parentGroupedProductId; dynamic roleIds; dynamic discountIds; @@ -1155,14 +1157,14 @@ class Review { dynamic productId; dynamic storeId; bool isApproved; - Title title; - ReviewText reviewText; + dynamic title; + dynamic reviewText; dynamic replyText; dynamic rating; dynamic helpfulYesTotal; dynamic helpfulNoTotal; - DateTime createdOnUtc; - ReviewCustomer customer; + dynamic createdOnUtc; + dynamic customer; dynamic product; factory Review.fromJson(Map json) => Review( @@ -1244,7 +1246,7 @@ class ReviewCustomer { dynamic isOutSa; dynamic patientType; dynamic gender; - DateTime birthDate; + dynamic birthDate; dynamic phone; dynamic countryCode; dynamic yahalaAccountno; @@ -1253,7 +1255,7 @@ class ReviewCustomer { List addresses; String id; String username; - PurpleEmail email; + dynamic email; dynamic firstName; dynamic lastName; dynamic languageId; @@ -1480,7 +1482,4 @@ class EnumValues { } return reverseMap; } -} - - - +} \ No newline at end of file diff --git a/lib/core/model/pharmacies/orders_model.dart b/lib/core/model/pharmacies/orders_model.dart index a97bda98..0ad94767 100644 --- a/lib/core/model/pharmacies/orders_model.dart +++ b/lib/core/model/pharmacies/orders_model.dart @@ -32,6 +32,10 @@ class Orders { bool canCancel; bool canRefund; dynamic customerId; + double orderSubtotalExclTax; + dynamic orderShippingExclTax; + double orderTax; + Orders( {this.id, @@ -43,7 +47,10 @@ class Orders { this.orderStatusn, this.canCancel, this.canRefund, - this.customerId,}); + this.customerId, + this.orderShippingExclTax, + this.orderSubtotalExclTax, + this.orderTax,}); Orders.fromJson(Map json) { try { @@ -57,6 +64,9 @@ class Orders { canCancel = json['can_cancel']; canRefund = json['can_refund']; customerId = json['customer_id']; + orderSubtotalExclTax= json["order_subtotal_excl_tax"].toDouble(); + orderShippingExclTax= json["order_shipping_excl_tax"]; + orderTax= json["order_tax"].toDouble(); }catch(e){ print(e); } @@ -72,6 +82,9 @@ class Orders { data['order_status_id'] = this.orderStatusId; data['order_status'] = this.orderStatus; data['order_statusn'] = this.orderStatusn; + data ["order_subtotal_excl_tax"] = this.orderSubtotalExclTax; + data ["order_shipping_excl_tax"]= this.orderShippingExclTax; + data ["order_tax"]= this.orderTax; return data; } } diff --git a/lib/core/model/pharmacies/recommendedProduct_model.dart b/lib/core/model/pharmacies/recommendedProduct_model.dart new file mode 100644 index 00000000..e1e88cd8 --- /dev/null +++ b/lib/core/model/pharmacies/recommendedProduct_model.dart @@ -0,0 +1,486 @@ +class RecommendedProductModel { + List products; + + RecommendedProductModel({this.products}); + + RecommendedProductModel.fromJson(Map json) { + if (json['products'] != null) { + products = new List(); + json['products'].forEach((v) { + products.add(new Products.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.products != null) { + data['products'] = this.products.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class Products { + String id; + bool visibleIndividually; + String name; + String namen; + String shortDescription; + String shortDescriptionn; + String fullDescription; + String fullDescriptionn; + bool markasNew; + bool showOnHomePage; + dynamic metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + bool allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + String sku; + bool isRx; + bool prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool isGiftCard; + bool requireOtherProducts; + bool automaticallyAddRequiredProducts; + bool isDownload; + bool unlimitedDownloads; + dynamic maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool hasSampleDownload; + bool hasUserAgreement; + bool isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool isRental; + dynamic rentalPriceLength; + bool isShipEnabled; + bool isFreeShipping; + bool shipSeparately; + dynamic additionalShippingCharge; + bool isTaxExempt; + bool isTelecommunicationsOrBroadcastingOrElectronicServices; + bool useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + String stockAvailability; + String stockAvailabilityn; + bool displayStockAvailability; + bool displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic allowedQuantities; + bool allowAddingOnlyExistingAttributeCombinations; + bool disableBuyButton; + bool disableWishlistButton; + bool availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool callForPrice; + dynamic price; + dynamic oldPrice; + dynamic productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool hasTierPrices; + bool hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + String currency; + String currencyn; + double weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool published; + bool deleted; + String createdOnUtc; + String updatedOnUtc; + String productType; + dynamic parentGroupedProductId; + dynamic vendorId; + String seName; + List images; + + Products({ + this.id, + this.visibleIndividually, + this.name, + this.namen, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.vendorId, + this.seName, + this.images, + }); + + Products.fromJson(Map json) { + id = json['id']; + visibleIndividually = json['visible_individually']; + name = json['name']; + namen = json['namen']; + shortDescription = json['short_description']; + shortDescriptionn = json['short_descriptionn']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + markasNew = json['markas_new']; + showOnHomePage = json['show_on_home_page']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + allowCustomerReviews = json['allow_customer_reviews']; + approvedRatingSum = json['approved_rating_sum']; + notApprovedRatingSum = json['not_approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + notApprovedTotalReviews = json['not_approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + prescriptionRequired = json['prescription_required']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + manufacturerPartNumber = json['manufacturer_part_number']; + gtin = json['gtin']; + isGiftCard = json['is_gift_card']; + requireOtherProducts = json['require_other_products']; + automaticallyAddRequiredProducts = + json['automatically_add_required_products']; + isDownload = json['is_download']; + unlimitedDownloads = json['unlimited_downloads']; + maxNumberOfDownloads = json['max_number_of_downloads']; + downloadExpirationDays = json['download_expiration_days']; + hasSampleDownload = json['has_sample_download']; + hasUserAgreement = json['has_user_agreement']; + isRecurring = json['is_recurring']; + recurringCycleLength = json['recurring_cycle_length']; + recurringTotalCycles = json['recurring_total_cycles']; + isRental = json['is_rental']; + rentalPriceLength = json['rental_price_length']; + isShipEnabled = json['is_ship_enabled']; + isFreeShipping = json['is_free_shipping']; + shipSeparately = json['ship_separately']; + additionalShippingCharge = json['additional_shipping_charge']; + isTaxExempt = json['is_tax_exempt']; + isTelecommunicationsOrBroadcastingOrElectronicServices = + json['is_telecommunications_or_broadcasting_or_electronic_services']; + useMultipleWarehouses = json['use_multiple_warehouses']; + manageInventoryMethodId = json['manage_inventory_method_id']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + displayStockAvailability = json['display_stock_availability']; + displayStockQuantity = json['display_stock_quantity']; + minStockQuantity = json['min_stock_quantity']; + notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + allowedQuantities = json['allowed_quantities']; + allowAddingOnlyExistingAttributeCombinations = + json['allow_adding_only_existing_attribute_combinations']; + disableBuyButton = json['disable_buy_button']; + disableWishlistButton = json['disable_wishlist_button']; + availableForPreOrder = json['available_for_pre_order']; + preOrderAvailabilityStartDateTimeUtc = + json['pre_order_availability_start_date_time_utc']; + callForPrice = json['call_for_price']; + price = json['price']; + oldPrice = json['old_price']; + productCost = json['product_cost']; + specialPrice = json['special_price']; + specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; + specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + customerEntersPrice = json['customer_enters_price']; + minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; + maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; + basepriceEnabled = json['baseprice_enabled']; + basepriceAmount = json['baseprice_amount']; + basepriceBaseAmount = json['baseprice_base_amount']; + hasTierPrices = json['has_tier_prices']; + hasDiscountsApplied = json['has_discounts_applied']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountDescription = json['discount_description']; + discountDescriptionn = json['discount_Descriptionn']; + discountPercentage = json['discount_percentage']; + currency = json['currency']; + currencyn = json['currencyn']; + weight = json['weight']; + length = json['length']; + width = json['width']; + height = json['height']; + availableStartDateTimeUtc = json['available_start_date_time_utc']; + availableEndDateTimeUtc = json['available_end_date_time_utc']; + displayOrder = json['display_order']; + published = json['published']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + productType = json['product_type']; + parentGroupedProductId = json['parent_grouped_product_id']; + vendorId = json['vendor_id']; + seName = json['se_name']; + if (json['images'] != null) { + images = new List(); + json['images'].forEach((v) { + images.add(new Images.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['visible_individually'] = this.visibleIndividually; + data['name'] = this.name; + data['namen'] = this.namen; + data['short_description'] = this.shortDescription; + data['short_descriptionn'] = this.shortDescriptionn; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['markas_new'] = this.markasNew; + data['show_on_home_page'] = this.showOnHomePage; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['allow_customer_reviews'] = this.allowCustomerReviews; + data['approved_rating_sum'] = this.approvedRatingSum; + data['not_approved_rating_sum'] = this.notApprovedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['not_approved_total_reviews'] = this.notApprovedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['prescription_required'] = this.prescriptionRequired; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['manufacturer_part_number'] = this.manufacturerPartNumber; + data['gtin'] = this.gtin; + data['is_gift_card'] = this.isGiftCard; + data['require_other_products'] = this.requireOtherProducts; + data['automatically_add_required_products'] = + this.automaticallyAddRequiredProducts; + data['is_download'] = this.isDownload; + data['unlimited_downloads'] = this.unlimitedDownloads; + data['max_number_of_downloads'] = this.maxNumberOfDownloads; + data['download_expiration_days'] = this.downloadExpirationDays; + data['has_sample_download'] = this.hasSampleDownload; + data['has_user_agreement'] = this.hasUserAgreement; + data['is_recurring'] = this.isRecurring; + data['recurring_cycle_length'] = this.recurringCycleLength; + data['recurring_total_cycles'] = this.recurringTotalCycles; + data['is_rental'] = this.isRental; + data['rental_price_length'] = this.rentalPriceLength; + data['is_ship_enabled'] = this.isShipEnabled; + data['is_free_shipping'] = this.isFreeShipping; + data['ship_separately'] = this.shipSeparately; + data['additional_shipping_charge'] = this.additionalShippingCharge; + data['is_tax_exempt'] = this.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = + this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = this.useMultipleWarehouses; + data['manage_inventory_method_id'] = this.manageInventoryMethodId; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['display_stock_availability'] = this.displayStockAvailability; + data['display_stock_quantity'] = this.displayStockQuantity; + data['min_stock_quantity'] = this.minStockQuantity; + data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = + this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['allowed_quantities'] = this.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = + this.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = this.disableBuyButton; + data['disable_wishlist_button'] = this.disableWishlistButton; + data['available_for_pre_order'] = this.availableForPreOrder; + data['pre_order_availability_start_date_time_utc'] = + this.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = this.callForPrice; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['product_cost'] = this.productCost; + data['special_price'] = this.specialPrice; + data['special_price_start_date_time_utc'] = + this.specialPriceStartDateTimeUtc; + data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = this.customerEntersPrice; + data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = this.basepriceEnabled; + data['baseprice_amount'] = this.basepriceAmount; + data['baseprice_base_amount'] = this.basepriceBaseAmount; + data['has_tier_prices'] = this.hasTierPrices; + data['has_discounts_applied'] = this.hasDiscountsApplied; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_description'] = this.discountDescription; + data['discount_Descriptionn'] = this.discountDescriptionn; + data['discount_percentage'] = this.discountPercentage; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['weight'] = this.weight; + data['length'] = this.length; + data['width'] = this.width; + data['height'] = this.height; + data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; + data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; + data['display_order'] = this.displayOrder; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['product_type'] = this.productType; + data['parent_grouped_product_id'] = this.parentGroupedProductId; + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + if (this.images != null) { + data['images'] = this.images.map((v) => v.toJson()).toList(); + } + + return data; + } +} + +class Images { + int id; + int position; + String src; + String thumb; + String attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} diff --git a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart index 12d7eab3..34fa4bbb 100644 --- a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart +++ b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart @@ -25,7 +25,7 @@ class CustomerAddressesService extends BaseService { var date = f.format(DateTime.now().toUtc()) + " GMT"; addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date; hasError = false; - await baseAppClient.post(ADD_ADDRESS_INFO, + await baseAppClient.post(BASE_PHARMACY_URL+ADD_ADDRESS_INFO, onSuccess: (dynamic response, int statusCode) { addressesList.clear(); response["customers"][0]["addresses"].forEach((data) { @@ -43,7 +43,7 @@ class CustomerAddressesService extends BaseService { 'fields':'addresses' }; hasError = false; - await baseAppClient.getPharmacy("$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}", + await baseAppClient.getPharmacy("$BASE_PHARMACY_URL$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}", onSuccess: (dynamic response, int statusCode) { addressesList.clear(); response["customers"][0]["addresses"].forEach((data) { @@ -63,7 +63,7 @@ class CustomerAddressesService extends BaseService { }; hasError = false; - await baseAppClient.getPharmacy(GET_CUSTOMER_INFO, + await baseAppClient.getPharmacy(BASE_PHARMACY_URL+GET_CUSTOMER_INFO, onSuccess: (dynamic response, int statusCode) { customerInfo= CustomerInfo.fromJson(response); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/PrescriptionDeliveryService.dart b/lib/core/service/PrescriptionDeliveryService.dart new file mode 100644 index 00000000..c36efe89 --- /dev/null +++ b/lib/core/service/PrescriptionDeliveryService.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class PrescriptionDeliveryService extends BaseService { + Future insertDeliveryOrder( + {int lineItemNo, + double latitude, + double longitude, + int appointmentNo, + int createdBy, + int dischargeID}) async { + hasError = false; + Map body = Map(); + body['LineItemNo'] = lineItemNo; + body['Latitude'] = latitude; + body['Longitude'] = longitude; + body['AppointmentNo'] = appointmentNo; + body['CreatedBy'] = createdBy; + body['DischargeID'] = dischargeID; + await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, + onSuccess: (dynamic response, int statusCode) { + var asd=""; + }, + onFailure: (String error, int statusCode) { + hasError = true; + print(error); + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart new file mode 100644 index 00000000..b9d14a06 --- /dev/null +++ b/lib/core/service/ancillary_orders_service.dart @@ -0,0 +1,204 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; + +class AncillaryOrdersService extends BaseService { + List _ancillaryLists = List(); + List get ancillaryLists => _ancillaryLists; + List _ancillaryProcLists = List(); + List get ancillaryProcLists => + _ancillaryProcLists; + + Future getOrders() async { + Map body = Map(); + + hasError = false; + + await baseAppClient.post(GET_ANCILLARY_ORDERS, + onSuccess: (dynamic response, int statusCode) { + _ancillaryLists = []; + response['AncillaryOrderList'].forEach((item) { + ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getOrdersDetails(appointmentNo, orderNo) async { + Map body = Map(); + + hasError = false; + + await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, + onSuccess: (dynamic response, int statusCode) { + _ancillaryProcLists = []; + response['AncillaryOrderProcList'] = [ + { + "AncillaryOrderProcList": [ + { + "ApprovalLineItemNo": 0, + "ApprovalNo": 0, + "ApprovalStatus": "", + "ApprovalStatusID": 0, + "CompanyShare": 501.3, + "CompanyShareWithTax": 576.5, + "CompanyTaxAmount": 75.19, + "DiscountAmount": 55.7, + "DiscountCategory": 1, + "DiscountType": "P", + "DiscountTypeValue": 10, + "IsApprovalCreated": false, + "IsApprovalRequired": false, + "IsCovered": false, + "OrderDate": "/Date(1601758800000+0300)/", + "OrderLineItemNo": 1, + "OrderNo": 2020000001, + "PartnerID": 0, + "PartnerShare": 0, + "PartnerShareType": "P", + "PatientShare": 0, + "PatientShareWithTax": 0, + "PatientTaxAmount": 0, + "ProcPrice": 557, + "ProcedureCategoryID": 2, + "ProcedureCategoryName": "LABORATORY", + "ProcedureID": "02013001", + "ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O", + "TaxAmount": 75.19, + "TaxPct": 15 + }, + { + "ApprovalLineItemNo": 0, + "ApprovalNo": 0, + "ApprovalStatus": "", + "ApprovalStatusID": 0, + "CompanyShare": 90, + "CompanyShareWithTax": 103.5, + "CompanyTaxAmount": 13.5, + "DiscountAmount": 10, + "DiscountCategory": 1, + "DiscountType": "P", + "DiscountTypeValue": 10, + "IsApprovalCreated": false, + "IsApprovalRequired": true, + "IsCovered": false, + "OrderDate": "/Date(1601758800000+0300)/", + "OrderLineItemNo": 4, + "OrderNo": 2020000001, + "PartnerID": 0, + "PartnerShare": 0, + "PartnerShareType": "P", + "PatientShare": 0, + "PatientShareWithTax": 0, + "PatientTaxAmount": 0, + "ProcPrice": 100, + "ProcedureCategoryID": 2, + "ProcedureCategoryName": "LABORATORY", + "ProcedureID": "02014011", + "ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)", + "TaxAmount": 13.5, + "TaxPct": 15 + }, + { + "ApprovalLineItemNo": 0, + "ApprovalNo": 0, + "ApprovalStatus": "", + "ApprovalStatusID": 0, + "CompanyShare": 347.76, + "CompanyShareWithTax": 399.92, + "CompanyTaxAmount": 52.16, + "DiscountAmount": 38.64, + "DiscountCategory": 1, + "DiscountType": "P", + "DiscountTypeValue": 10, + "IsApprovalCreated": false, + "IsApprovalRequired": false, + "IsCovered": false, + "OrderDate": "/Date(1601758800000+0300)/", + "OrderLineItemNo": 3, + "OrderNo": 2020000001, + "PartnerID": 0, + "PartnerShare": 0, + "PartnerShareType": "P", + "PatientShare": 0, + "PatientShareWithTax": 0, + "PatientTaxAmount": 0, + "ProcPrice": 386.4, + "ProcedureCategoryID": 2, + "ProcedureCategoryName": "LABORATORY", + "ProcedureID": "02019302", + "ProcedureName": "21-HYDROXYLASE ABS - S.O", + "TaxAmount": 52.16, + "TaxPct": 15 + }, + { + "ApprovalLineItemNo": 0, + "ApprovalNo": 0, + "ApprovalStatus": "", + "ApprovalStatusID": 0, + "CompanyShare": 1323, + "CompanyShareWithTax": 1521.45, + "CompanyTaxAmount": 198.45, + "DiscountAmount": 147, + "DiscountCategory": 1, + "DiscountType": "P", + "DiscountTypeValue": 10, + "IsApprovalCreated": false, + "IsApprovalRequired": true, + "IsCovered": false, + "OrderDate": "/Date(1601758800000+0300)/", + "OrderLineItemNo": 5, + "OrderNo": 2020000001, + "PartnerID": 0, + "PartnerShare": 0, + "PartnerShareType": "P", + "PatientShare": 0, + "PatientShareWithTax": 0, + "PatientTaxAmount": 0, + "ProcPrice": 1470, + "ProcedureCategoryID": 3, + "ProcedureCategoryName": "RADIOLOGY", + "ProcedureID": "03033065", + "ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)", + "TaxAmount": 198.45, + "TaxPct": 15 + } + ], + "AppointmentDate": "/Date(1601499600000+0300)/", + "AppointmentNo": 2016053756, + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "CompanyID": 0, + "CompanyName": "Blood Donation Investigation", + "DoctorID": 1485, + "DoctorName": "ANAS ABDULLAH", + "ErrCode": null, + "GroupID": 2, + "InsurancePolicyNo": "45976500", + "Message": "Success", + "PatientCardID": "232332323", + "PatientID": 3072055, + "PatientName": "MAYA KHALED SADDIQ", + "PatientType": 1, + "PolicyID": 2, + "PolicyName": "Test", + "ProjectID": 15, + "SetupID": "010266", + "StatusCode": 1, + "SubCategoryID": 2, + "SubPolicyNo": "234234" + } + ]; + + response['AncillaryOrderProcList'].forEach((item) { + ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/blood/blood_donation_service.dart b/lib/core/service/blood/blood_donation_service.dart index 326407a3..9fc11c04 100644 --- a/lib/core/service/blood/blood_donation_service.dart +++ b/lib/core/service/blood/blood_donation_service.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import '../base_service.dart'; @@ -25,4 +26,52 @@ class BloodDonationService extends BaseService { super.error = error; }, body: body); } + Future bloodDonationSave(request) async { + var localRes; + try { + await baseAppClient.post(SAVE_BLOOD_REQUEST, + onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future getAgreement() async { + var localRes; + try { + await baseAppClient.post(GET_BLOOD_AGREEMENT, + onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: {}); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + + Future saveAgreement(request) async { + var localRes; + try { + await baseAppClient.post(SAVE_BLOOD_AGREEMENT, + onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } } diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 24fd202f..ca12a1e6 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -5,9 +5,12 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; -import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; @@ -46,7 +49,7 @@ class BaseAppClient { //Map profile = await sharedPref.getObj(DOCTOR_PROFILE); var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var user = await sharedPref.getObject(USER_PROFILE); - Map headers = { + Map headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' }; @@ -125,14 +128,14 @@ class BaseAppClient { if (await Utils.checkConnection()) { final response = await http.post(url.trim(), - body: json.encode(body), - headers: headers); + body: json.encode(body), headers: headers); final int statusCode = response.statusCode; print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); } else { - var parsed = json.decode(response.body.toString()); + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); if (parsed['Response_Message'] != null) { onSuccess(parsed, statusCode); } else { @@ -164,21 +167,214 @@ class BaseAppClient { onSuccess(parsed, statusCode); } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { - if (parsed['message'] == null && - parsed['ErrorEndUserMessage'] == null) { - if(parsed['ErrorSearchMsg'] == null ){ - onFailure("Server Error found with no available message", + if (parsed['SameClinicApptList'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['message'] == null && + parsed['ErrorEndUserMessage'] == null) { + if (parsed['ErrorSearchMsg'] == null) { + onFailure("Server Error found with no available message", + statusCode); + } else { + onFailure(parsed['ErrorSearchMsg'], statusCode); + } + } else { + onFailure( + parsed['message'] ?? + parsed['ErrorEndUserMessage'] ?? + parsed['ErrorMessage'], statusCode); - }else { - onFailure(parsed['ErrorSearchMsg'], + } + } + } else if (!parsed['IsAuthenticated']) { + await logout(); + + //helpers.showErrorToast('Your session expired Please login agian'); + } else { + if (parsed['SameClinicApptList'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['message'] != null) { + onFailure(parsed['message'] ?? parsed['message'], statusCode); + } else { + onFailure( + parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } + } + } + } + } + } else { + onFailure('Please Check The Internet Connection', -1); + } + } catch (e) { + print(e); + onFailure(e.toString(), -1); + } + } + + postPharmacy(String endPoint, + {Map body, + Function(dynamic response, int statusCode) onSuccess, + Function(String error, int statusCode) onFailure, + bool isAllowAny = false, + bool isExternal = false}) async { + + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); + String url; + if (isExternal) { + url = endPoint; + } else { + url = PHARMACY_BASE_URL + endPoint; + } + try { + //Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); + Map headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': token ?? '', + 'Mobilenumber': user != null + ? getPhoneNumberWithoutZero(user['MobileNumber'].toString()) + : "", + 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + 'Username': user != null ? user['PatientID'].toString() : "", + }; + if (!isExternal) { + String token = await sharedPref.getString(TOKEN); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + if (body.containsKey('SetupID')) { + body['SetupID'] = body.containsKey('SetupID') + ? body['SetupID'] != null + ? body['SetupID'] + : SETUP_ID + : SETUP_ID; + } + + body['VersionID'] = VERSION_ID; + body['Channel'] = CHANNEL; + body['LanguageID'] = languageID == 'ar' ? 1 : 2; + + body['IPAdress'] = IP_ADDRESS; + body['generalid'] = GENERAL_ID; + body['PatientOutSA'] = body.containsKey('PatientOutSA') + ? body['PatientOutSA'] != null + ? body['PatientOutSA'] + : PATIENT_OUT_SA + : PATIENT_OUT_SA; + + if (body.containsKey('isDentalAllowedBackend')) { + body['isDentalAllowedBackend'] = + body.containsKey('isDentalAllowedBackend') + ? body['isDentalAllowedBackend'] != null + ? body['isDentalAllowedBackend'] + : IS_DENTAL_ALLOWED_BACKEND + : IS_DENTAL_ALLOWED_BACKEND; + } + + body['DeviceTypeID'] = DeviceTypeID; + + if (!body.containsKey('IsPublicRequest')) { + body['PatientType'] = body.containsKey('PatientType') + ? body['PatientType'] != null + ? body['PatientType'] + : user['PatientType'] != null + ? user['PatientType'] + : PATIENT_TYPE + : PATIENT_TYPE; + + body['PatientTypeID'] = body.containsKey('PatientTypeID') + ? body['PatientTypeID'] != null + ? body['PatientTypeID'] + : user['PatientType'] != null + ? user['PatientType'] + : PATIENT_TYPE_ID + : PATIENT_TYPE_ID; + if (user != null) { + body['TokenID'] = token; + body['PatientID'] = body['PatientID'] != null + ? body['PatientID'] + : user['PatientID']; + body['PatientOutSA'] = user['OutSA']; + body['SessionID'] = SESSION_ID; //getSe + headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': pharmacyToken, + 'Mobilenumber': user['MobileNumber'].toString(), + 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + 'Username': user['PatientID'].toString(), + }; + } + } + } + + print("URL : $url"); + print("Body : ${json.encode(body)}"); + + if (await Utils.checkConnection()) { + final response = await http.post(url.trim(), + body: json.encode(body), headers: headers); + final int statusCode = response.statusCode; + print("statusCode :$statusCode"); + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure('Error While Fetching data', statusCode); + } else { + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); + if (parsed['Response_Message'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['ErrorType'] == 4) { + navigateToAppUpdate( + AppGlobal.context, parsed['ErrorEndUserMessage']); + } + if (isAllowAny) { + onSuccess(parsed, statusCode); + } else if (parsed['IsAuthenticated'] == null) { + if (parsed['isSMSSent'] == true) { + onSuccess(parsed, statusCode); + } else if (parsed['MessageStatus'] == 1) { + onSuccess(parsed, statusCode); + } else if (parsed['Result'] == 'OK') { + onSuccess(parsed, statusCode); } else { - onFailure( - parsed['message'] ?? - parsed['ErrorEndUserMessage'] ?? - parsed['ErrorMessage'], - statusCode); + if (parsed != null) { + onSuccess(parsed, statusCode); + } else { + onFailure( + parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], + statusCode); + logout(); + } + } + } else if (parsed['MessageStatus'] == 1 || + parsed['SMSLoginRequired'] == true) { + onSuccess(parsed, statusCode); + } else if (parsed['MessageStatus'] == 2 && + parsed['IsAuthenticated']) { + if (parsed['SameClinicApptList'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['message'] == null && + parsed['ErrorEndUserMessage'] == null) { + if (parsed['ErrorSearchMsg'] == null) { + onFailure("Server Error found with no available message", + statusCode); + } else { + onFailure(parsed['ErrorSearchMsg'], statusCode); + } + } else { + onFailure( + parsed['message'] ?? + parsed['ErrorEndUserMessage'] ?? + parsed['ErrorMessage'], + statusCode); + } } } else if (!parsed['IsAuthenticated']) { await logout(); @@ -210,9 +406,7 @@ class BaseAppClient { Future navigateToAppUpdate(context, String text) async { Navigator.pushReplacement( - context, - MaterialPageRoute( - builder: (context) => AppUpdatePage(appUpdateText: text))); + context, FadePage(page: AppUpdatePage(appUpdateText: text))); } get(String endPoint, @@ -247,7 +441,8 @@ class BaseAppClient { if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); } else { - var parsed = json.decode(response.body.toString()); + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); onSuccess(parsed, statusCode); } } else { @@ -260,7 +455,9 @@ class BaseAppClient { Function(String error, int statusCode) onFailure, bool isAllowAny = false, bool isExternal = false, - Map queryParams}) async { + Map queryParams}) async { + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); String url; if (isExternal) { @@ -274,26 +471,33 @@ class BaseAppClient { } print("URL : $url"); - var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); - var user = await sharedPref.getObject(USER_PROFILE); if (await Utils.checkConnection()) { final response = await http.get(url.trim(), headers: { - 'Content-Type': 'application/json', + 'Content-Type': 'text/html; charset=utf-8', 'Accept': 'application/json', - 'Authorization': token, - 'Mobilenumber': user['MobileNumber'].toString(), + 'Authorization': token ?? '', + 'Mobilenumber': user != null + ? getPhoneNumberWithoutZero(user['MobileNumber'].toString()) + : "", 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', - 'Username': user['PatientID'].toString(), + 'Username': user != null ? user['PatientID'].toString() : "", }); final int statusCode = response.statusCode; print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + if (statusCode == 401) { + AppToast.showErrorToast( + message: TranslationBase.of(AppGlobal.context).pharmacyRelogin); + Navigator.of(AppGlobal.context).pushNamed(HOME); + } else { + onFailure('Error While Fetching data', statusCode); + } } else { - var parsed = json.decode(response.body.toString()); - onSuccess(parsed, statusCode); + // var parsed = json.decode(response.body.toString()); + var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); + onSuccess(bodyUtf, statusCode); } } else { onFailure('Please Check The Internet Connection', -1); @@ -304,7 +508,6 @@ class BaseAppClient { { Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure,}) async { - String url = fullUrl; print("URL Query String: $url"); @@ -477,4 +680,192 @@ class BaseAppClient { return params; } + + + pharmacyPost(String endPoint, + {Map body, + Function(dynamic response, int statusCode) onSuccess, + Function(String error, int statusCode) onFailure, + bool isAllowAny = false, + bool isExternal = false}) async { + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); + String url; + if (isExternal) { + url = endPoint; + } else { + url = BASE_PHARMACY_URL + endPoint; + } + try { + if (isExternal) { + String token = await sharedPref.getString(TOKEN); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + var user = await sharedPref.getObject(USER_PROFILE); + if (body.containsKey('SetupID')) { + body['SetupID'] = body.containsKey('SetupID') + ? body['SetupID'] != null + ? body['SetupID'] + : SETUP_ID + : SETUP_ID; + } + + body['VersionID'] = VERSION_ID; + body['Channel'] = CHANNEL; + body['LanguageID'] = languageID == 'ar' ? 1 : 2; + + body['IPAdress'] = IP_ADDRESS; + body['generalid'] = GENERAL_ID; + body['PatientOutSA'] = body.containsKey('PatientOutSA') + ? body['PatientOutSA'] != null + ? body['PatientOutSA'] + : PATIENT_OUT_SA + : PATIENT_OUT_SA; + + if (body.containsKey('isDentalAllowedBackend')) { + body['isDentalAllowedBackend'] = + body.containsKey('isDentalAllowedBackend') + ? body['isDentalAllowedBackend'] != null + ? body['isDentalAllowedBackend'] + : IS_DENTAL_ALLOWED_BACKEND + : IS_DENTAL_ALLOWED_BACKEND; + } + + body['DeviceTypeID'] = DeviceTypeID; + + if (!body.containsKey('IsPublicRequest')) { + body['PatientType'] = body.containsKey('PatientType') + ? body['PatientType'] != null + ? body['PatientType'] + : user['PatientType'] != null + ? user['PatientType'] + : PATIENT_TYPE + : PATIENT_TYPE; + + body['PatientTypeID'] = body.containsKey('PatientTypeID') + ? body['PatientTypeID'] != null + ? body['PatientTypeID'] + : user['PatientType'] != null + ? user['PatientType'] + : PATIENT_TYPE_ID + : PATIENT_TYPE_ID; + if (user != null) { + body['TokenID'] = token; + body['PatientID'] = body['PatientID'] != null + ? body['PatientID'] + : user['PatientID']; + body['PatientOutSA'] = user['OutSA']; + body['SessionID'] = SESSION_ID; //getSessionId(token); + } + } + } + + print("URL : $url"); + print("Body : ${json.encode(body)}"); + var ss = json.encode(body); + + if (await Utils.checkConnection()) { + final response = + await http.post(url.trim(), body: json.encode(body), headers: { + // 'Content-Type': 'application/json', + // 'Accept': 'application/json', + // 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': token ?? '', + 'Mobilenumber': user != null + ? getPhoneNumberWithoutZero(user['MobileNumber'].toString()) + : "", + 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + 'Username': user != null ? user['PatientID'].toString() : "", + }); + final int statusCode = response.statusCode; + print("statusCode :$statusCode"); + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure('Error While Fetching data', statusCode); + } else { + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); + if (parsed['Response_Message'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['ErrorType'] == 4) { + navigateToAppUpdate( + AppGlobal.context, parsed['ErrorEndUserMessage']); + } + if (isAllowAny) { + onSuccess(parsed, statusCode); + } else if (parsed['IsAuthenticated'] == null) { + if (parsed['isSMSSent'] == true) { + onSuccess(parsed, statusCode); + } else if (parsed['MessageStatus'] == 1) { + onSuccess(parsed, statusCode); + } else if (parsed['Result'] == 'OK') { + onSuccess(parsed, statusCode); + } else { + if (parsed != null) { + onSuccess(parsed, statusCode); + } else { + onFailure( + parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], + statusCode); + logout(); + } + } + } else if (parsed['MessageStatus'] == 1 || + parsed['SMSLoginRequired'] == true) { + onSuccess(parsed, statusCode); + } else if (parsed['MessageStatus'] == 2 && + parsed['IsAuthenticated']) { + if (parsed['message'] == null && + parsed['ErrorEndUserMessage'] == null) { + if (parsed['ErrorSearchMsg'] == null) { + onFailure("Server Error found with no available message", + statusCode); + } else { + onFailure(parsed['ErrorSearchMsg'], statusCode); + } + } else { + onFailure( + parsed['message'] ?? + parsed['ErrorEndUserMessage'] ?? + parsed['ErrorMessage'], + statusCode); + } + } else if (!parsed['IsAuthenticated']) { + await logout(); + + //helpers.showErrorToast('Your session expired Please login agian'); + } else { + if (parsed['SameClinicApptList'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['message'] != null) { + onFailure(parsed['message'] ?? parsed['message'], statusCode); + } else { + onFailure( + parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], + statusCode); + } + } + } + } + } + } else { + onFailure('Please Check The Internet Connection', -1); + } + } catch (e) { + print(e); + onFailure(e.toString(), -1); + } + } +} + + +getPhoneNumberWithoutZero(String number) { + String newNumber = number; + if (number.startsWith('0')) { + newNumber = number.substring(1); + } + return newNumber; } diff --git a/lib/core/service/er/EdOnlineServices.dart b/lib/core/service/er/EdOnlineServices.dart new file mode 100644 index 00000000..2df92d8a --- /dev/null +++ b/lib/core/service/er/EdOnlineServices.dart @@ -0,0 +1,96 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/er/ErPatientShareModel.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class EdOnlineServices extends BaseService { + List triageQuestionsModelList = List(); + ErPatientShareModel erPatientShareModel; + + Future getQuestions() async { + hasError =false; + triageQuestionsModelList.clear(); + Map body = Map(); + body['ProjectID'] = 15; + await baseAppClient.post(ER_GET_VISUAL_TRIAGE_QUESTIONS, + onSuccess: (dynamic response, int statusCode) { + triageQuestionsModelList.clear(); + response['ER_TriageQuestionsList'].forEach((questions) { + triageQuestionsModelList.add(TriageQuestionsModel.fromJson(questions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + + Future getPatientPaymentInformation({var id}) async { + hasError =false; + await baseAppClient.post(ER_GetPatientPaymentInformationForERClinic, + onSuccess: (dynamic response, int statusCode) { + erPatientShareModel = + ErPatientShareModel.fromJson(response['ER_PatientShare']); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map.from({"ProjectID":15,"ClinicID":10})); + } + + Future saveQuestionsInformation( + {String notes, + String chiefComplaint, + int projectId, + DateTime selectedTime, + List selectedQuestions}) async { + hasError =false; + Map body = Map(); + List checklist = List(); + + body['ProjectID'] = 15; + body['ProjectId'] = projectId; + int riskScore = 0; + + if (user.age > 14) { + selectedQuestions.forEach((element) { + int score = int.parse(element.adultPoints); + riskScore += score; + checklist.add(Map.from({ + "IsSelected": 1, + "ParameterCode": element.parameterCode, + "ParameterGroup": element.parameterGroup, + "ParameterType": element.parameterType, + "Score": score + })); + }); + } else { + selectedQuestions.forEach((element) { + int score = int.parse(element.pediaPoints); + riskScore += score; + checklist.add(Map.from({ + "IsSelected": 1, + "ParameterCode": element.parameterCode, + "ParameterGroup": element.parameterGroup, + "ParameterType": element.parameterType, + "Score": score + })); + }); + } + + body['ERTriageInformation'] = { + "Notes": notes, + "ChiefComplaint": chiefComplaint, + "PatientId": user.patientID, + "ProjectId": 15, + "RiskScore": riskScore, + "checklist": checklist.map((e) => e).toList() + }; + + await baseAppClient.post(ER_SAVE_TRIAGE_INFORMATION, + onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/health-weather/health_weather_indicator.dart b/lib/core/service/health-weather/health_weather_indicator.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/core/service/parmacyModule/order-preview-service.dart b/lib/core/service/parmacyModule/order-preview-service.dart index 8bfda569..0ada84e7 100644 --- a/lib/core/service/parmacyModule/order-preview-service.dart +++ b/lib/core/service/parmacyModule/order-preview-service.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; @@ -17,6 +18,7 @@ class OrderPreviewService extends BaseService { List addresses = List(); LacumAccountInformation lacumInformation; LacumAccountInformation lacumGroupInformation; + List orderList = List(); Future getAddresses() async { var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); @@ -44,13 +46,14 @@ class OrderPreviewService extends BaseService { dynamic localRes; hasError = false; try { - await baseAppClient.getPharmacy("$GET_SHIPPING_OPTIONS$customerId/${selectedAddress.id}", - onSuccess: (dynamic response, int statusCode) { - localRes = response['shipping_option'][0]; - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, queryParams: queryParams); + await baseAppClient + .getPharmacy("$GET_SHIPPING_OPTIONS$customerId/${selectedAddress.id}", + onSuccess: (dynamic response, int statusCode) { + localRes = response['shipping_option'][0]; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); } catch (error) { throw error; } @@ -91,7 +94,7 @@ class OrderPreviewService extends BaseService { Map body = Map(); body["shopping_cart_item"] = choppingCartObject; - await baseAppClient.post("$GET_SHOPPING_CART$productId", + await baseAppClient.pharmacyPost("$GET_SHOPPING_CART$productId", isExternal: false, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { @@ -109,7 +112,7 @@ class OrderPreviewService extends BaseService { Map body = Map(); - await baseAppClient.post("$DELETE_SHOPPING_CART$productId", + await baseAppClient.pharmacyPost("$DELETE_SHOPPING_CART$productId", isExternal: false, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { @@ -127,8 +130,9 @@ class OrderPreviewService extends BaseService { super.error = ""; dynamic localRes; - await baseAppClient.getPharmacy("$DELETE_SHOPPING_CART_ALL$customerId/ShoppingCart", - onSuccess: (response, statusCode) async { + await baseAppClient + .getPharmacy("$DELETE_SHOPPING_CART_ALL$customerId/ShoppingCart", + onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { hasError = true; @@ -169,23 +173,24 @@ class OrderPreviewService extends BaseService { try { await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, onSuccess: (response, statusCode) async { - lacumGroupInformation = LacumAccountInformation.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + lacumGroupInformation = LacumAccountInformation.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } catch (error) { throw error; } } - Future makeOrder(PaymentCheckoutData paymentCheckoutData, List shoppingCarts) async { + Future makeOrder(PaymentCheckoutData paymentCheckoutData, + List shoppingCarts) async { paymentCheckoutData.address.isChecked = true; hasError = false; super.error = ""; var languageID = - await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); Map orderBody = Map(); @@ -194,10 +199,15 @@ class OrderPreviewService extends BaseService { orderBody['billing_address'] = paymentCheckoutData.address; orderBody['pick_up_in_store'] = false; orderBody['payment_method_system_name'] = "Payments.PayFort"; - orderBody['shipping_method'] = languageID == 'ar' ? paymentCheckoutData.shippingOption.namen : paymentCheckoutData.shippingOption.name ; - orderBody['shipping_rate_computation_method_system_name'] = paymentCheckoutData.shippingOption.shippingRateComputationMethodSystemName; - orderBody['customer_id'] = customerId; - orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}"; + orderBody['shipping_method'] = languageID == 'ar' + ? paymentCheckoutData.shippingOption.namen + : paymentCheckoutData.shippingOption.name; + orderBody['shipping_rate_computation_method_system_name'] = + paymentCheckoutData + .shippingOption.shippingRateComputationMethodSystemName; + orderBody['customer_id'] = int.parse(customerId); + orderBody['custom_values_xml'] = + "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}"; orderBody['shippingOption'] = paymentCheckoutData.shippingOption; orderBody['shipping_address'] = paymentCheckoutData.address; orderBody['lakum_amount'] = paymentCheckoutData.usedLakumPoints; @@ -215,12 +225,17 @@ class OrderPreviewService extends BaseService { body['order'] = orderBody; try { - await baseAppClient.post(ORDER_SHOPPING_CART, + await baseAppClient.pharmacyPost(ORDER_SHOPPING_CART, isExternal: false, isAllowAny: true, onSuccess: (response, statusCode) async { - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + orderList.clear(); + response['orders'].forEach((item) { + orderList.add(OrderDetailModel.fromJson(item)); + print(response); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } catch (error) { throw error; } diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 3be9fe1a..7fa095ca 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.d import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; class PharmacyModuleService extends BaseService { final AppSharedPreferences sharedPref = AppSharedPreferences(); @@ -19,15 +20,19 @@ class PharmacyModuleService extends BaseService { List lastVisitedProducts = List(); Future makeVerifyCustomer(dynamic data) async { - Map queryParams = {'FileNumber': data['PatientID'].toString()}; + Map queryParams = { + 'FileNumber': data['PatientID'].toString() + }; hasError = false; try { - await baseAppClient.getPharmacy(PHARMACY_VERIFY_CUSTOMER, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.getPharmacy(PHARMACY_VERIFY_CUSTOMER, + onSuccess: (dynamic response, int statusCode) async { if (response['UserName'] != null) { - sharedPref.setString(PHARMACY_CUSTOMER_ID, response['CustomerId'].toString()); + sharedPref.setString( + PHARMACY_CUSTOMER_ID, response['CustomerId'].toString()); print(response); } else { - createUser(); + await createUser(); } }, onFailure: (String error, int statusCode) { hasError = true; @@ -54,7 +59,8 @@ class PharmacyModuleService extends BaseService { }; hasError = false; try { - await baseAppClient.get(PHARMACY_CREATE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async{ + await baseAppClient.get(PHARMACY_CREATE_CUSTOMER, + onSuccess: (dynamic response, int statusCode) async { if (!response['IsRegistered']) {} await generatePharmacyToken(); }, onFailure: (String error, int statusCode) { @@ -67,16 +73,18 @@ class PharmacyModuleService extends BaseService { } Future generatePharmacyToken() async { - await getUser(); + await getUser(); Map queryParams = { - 'Filenumber':user.patientID.toString(), - 'MobileNumber':user.mobileNumber, + 'Filenumber': user.patientID.toString(), + 'MobileNumber': Utils.getPhoneNumberWithoutZero(user.mobileNumber), }; hasError = false; try { - await baseAppClient.get(PHARMACY_AUTORZIE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async{ + await baseAppClient.getPharmacy(PHARMACY_AUTORZIE_CUSTOMER, + onSuccess: (dynamic response, int statusCode) async { if (response['Status'] == 200) { - await sharedPref.setString(PHARMACY_AUTORZIE_TOKEN, response['token'].toString()); + await sharedPref.setString( + PHARMACY_AUTORZIE_TOKEN, response['token'].toString()); } }, onFailure: (String error, int statusCode) { hasError = true; @@ -90,7 +98,8 @@ class PharmacyModuleService extends BaseService { Future getBannerListList() async { hasError = false; try { - await baseAppClient.getPharmacy(GET_PHARMACY_BANNER, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.getPharmacy(GET_PHARMACY_BANNER, + onSuccess: (dynamic response, int statusCode) { bannerItems.clear(); response['images'].forEach((item) { bannerItems.add(PharmacyImageObject.fromJson(item)); @@ -107,7 +116,8 @@ class PharmacyModuleService extends BaseService { Future getTopManufacturerList() async { Map queryParams = {'page': '1', 'limit': '8'}; try { - await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER, + onSuccess: (dynamic response, int statusCode) { manufacturerList.clear(); response['manufacturer'].forEach((item) { Manufacturer manufacturer = Manufacturer.fromJson(item); @@ -130,7 +140,8 @@ class PharmacyModuleService extends BaseService { 'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews', }; try { - await baseAppClient.getPharmacy(GET_PHARMACY_BEST_SELLER_PRODUCT, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.getPharmacy(GET_PHARMACY_BEST_SELLER_PRODUCT, + onSuccess: (dynamic response, int statusCode) { bestSellerProducts.clear(); response['products'].forEach((item) { bestSellerProducts.add(PharmacyProduct.fromJson(item)); @@ -146,10 +157,14 @@ class PharmacyModuleService extends BaseService { Future getLastVisitedProducts() async { String lastVisited = ""; - if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != null) { - lastVisited = await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); + if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != + null) { + lastVisited = + await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); try { - await baseAppClient.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", onSuccess: (dynamic response, int statusCode) { + await baseAppClient + .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", + onSuccess: (dynamic response, int statusCode) { lastVisitedProducts.clear(); response['products'].forEach((item) { lastVisitedProducts.add(PharmacyProduct.fromJson(item)); diff --git a/lib/core/service/parmacyModule/prescription_service.dart b/lib/core/service/parmacyModule/prescription_service.dart index 33c2cfd7..c2312890 100644 --- a/lib/core/service/parmacyModule/prescription_service.dart +++ b/lib/core/service/parmacyModule/prescription_service.dart @@ -1,11 +1,9 @@ - import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart'; - class PrescriptionService extends BaseService { final AppSharedPreferences sharedPref = AppSharedPreferences(); bool isFinished = true; @@ -16,38 +14,42 @@ class PrescriptionService extends BaseService { List _prescriptionsList = List(); List get prescriptionsList => _prescriptionsList; - - Future getPrescription() async { - hasError = false; - url = PRESCRIPTION; - print("Print PRESCRIPTION url" + url); - await baseAppClient.post(url, - onSuccess: (dynamic response, int statusCode) { - _prescriptionsList.clear(); - response['PatientPrescriptionList'].forEach((item) { - _prescriptionsList.add(Prescriptions.fromJson(item)); - }); - print(_prescriptionsList.length); - print(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }); - } // Future getPrescription() async { // hasError = false; -// Map body = Map(); -// body['isDentalAllowedBackend'] = false; -// await baseAppClient.post(PRESCRIPTION, +// url = PRESCRIPTION; +// print("Print PRESCRIPTION url" + url); +// await baseAppClient.get(url, // onSuccess: (dynamic response, int statusCode) { -// prescriptionsList.clear(); -// response['PatientPrescriptionList'].forEach((prescriptions) { -// prescriptionsList.add(Prescriptions.fromJson(prescriptions)); +// _prescriptionsList.clear(); +// response['PatientPrescriptionList'].forEach((item) { +// _prescriptionsList.add(Prescriptions.fromJson(item)); // }); +// print(_prescriptionsList.length); +// print(response); // }, onFailure: (String error, int statusCode) { // hasError = true; // super.error = error; -// }, body: body); +// }); // } - -} \ No newline at end of file + Future getPrescription() async { + url = PRESCRIPTION; + print("Print PRESCRIPTION url" + url); + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + print("Print PRESCRIPTION url" + url); + await baseAppClient.post(url, + onSuccess: (dynamic response, int statusCode) { + _prescriptionsList.clear(); + response['PatientPrescriptionList'].forEach((prescriptions) { + _prescriptionsList.add(Prescriptions.fromJson(prescriptions)); + }); + print(_prescriptionsList.length); + print("response is -------------"+response); + print(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/pharmacy_categorise_service.dart b/lib/core/service/pharmacy_categorise_service.dart index 0082cc49..5ef3c1d1 100644 --- a/lib/core/service/pharmacy_categorise_service.dart +++ b/lib/core/service/pharmacy_categorise_service.dart @@ -1,4 +1,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/brands_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/final_products_model.dart'; @@ -21,34 +23,36 @@ class PharmacyCategoriseService extends BaseService { List get parentCategoriseList => _parentCategoriseList; //service three - List _parentProductsList = List(); - List get parentProductsList => _parentProductsList; + List _parentProductsList = List(); + List get parentProductsList => _parentProductsList; //service four - List _subCategoriseList = List(); - List get subCategoriseList => _subCategoriseList; + List _subCategoriseList = List(); + List get subCategoriseList => _subCategoriseList; //service five - List _subProductsList = List(); - List get subProductsList => _subProductsList; + List _subProductsList = List(); + List get subProductsList => _subProductsList; //service six - List _finalProducts = List(); - List get finalProducts => _finalProducts; + List _finalProducts = List(); + List get finalProducts => _finalProducts; //service 7 - List _brandsList = List(); - List get brandsList => _brandsList; + List _brandsList = List(); + List get brandsList => _brandsList; // service 8 - List _searchList = List(); - List get searchList => _searchList; + List _searchList = List(); + List get searchList => _searchList; List _scanList = List(); List get scanList => _scanList; + List manufacturerProducts = List(); + clearSearchList() { _searchList.clear(); } @@ -98,7 +102,7 @@ class PharmacyCategoriseService extends BaseService { endPoint, onSuccess: (dynamic response, int statusCode) { response['products'].forEach((item) { - _searchList.add(SearchProductsModel.fromJson(item)); + _searchList.add(PharmacyProduct.fromJson(item)); }); }, onFailure: (String error, int statusCode) { @@ -108,14 +112,14 @@ class PharmacyCategoriseService extends BaseService { ); } - Future getBrands() async { + Future getBrands({String id}) async { hasError = false; _brandsList.clear(); await baseAppClient.getPharmacy( - GET_BRANDS_LIST, + GET_BRANDS_LIST + "$id" + "&fields=id,name,image,namen", onSuccess: (dynamic response, int statusCode) { response['manufacturer'].forEach((item) { - _brandsList.add(BrandsModel.fromJson(item)); + _brandsList.add(CategoriseParentModel.fromJson(item)); }); }, onFailure: (String error, int statusCode) { @@ -154,7 +158,7 @@ class PharmacyCategoriseService extends BaseService { endPoint, onSuccess: (dynamic response, int statusCode) { response['products'].forEach((item) { - _parentProductsList.add(ParentProductsModel.fromJson(item)); + _parentProductsList.add(PharmacyProduct.fromJson(item)); }); }, onFailure: (String error, int statusCode) { @@ -174,7 +178,7 @@ class PharmacyCategoriseService extends BaseService { endPoint, onSuccess: (dynamic response, int statusCode) { response['categories'].forEach((item) { - _subCategoriseList.add(SubCategoriesModel.fromJson(item)); + _subCategoriseList.add(CategoriseParentModel.fromJson(item)); }); }, onFailure: (String error, int statusCode) { @@ -194,7 +198,7 @@ class PharmacyCategoriseService extends BaseService { endPoint, onSuccess: (dynamic response, int statusCode) { response['products'].forEach((item) { - _subProductsList.add(SubProductsModel.fromJson(item)); + _subProductsList.add(PharmacyProduct.fromJson(item)); }); }, onFailure: (String error, int statusCode) { @@ -213,7 +217,97 @@ class PharmacyCategoriseService extends BaseService { endPoint, onSuccess: (dynamic response, int statusCode) { response['products'].forEach((item) { - _finalProducts.add(FinalProductsModel.fromJson(item)); + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getManufacturerProducts(String id) async { + hasError = false; + Map queryParams = {'ManufacturerId': id}; + + _finalProducts.clear(); + await baseAppClient.getPharmacy( + GET_BRAND_ITEMS, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + queryParams: queryParams, + ); + } + + Future getLastVisitedProducts() async { + String lastVisited = ""; + if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != + null) { + lastVisited = + await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); + try { + await baseAppClient + .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", + onSuccess: (dynamic response, int statusCode) { + _finalProducts.clear(); + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } catch (error) { + throw error; + } + } + } + + Future getBestSellerProducts() async { + Map queryParams = { + 'fields': + 'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews', + }; + try { + await baseAppClient.getPharmacy(GET_PHARMACY_BEST_SELLER_PRODUCT, + onSuccess: (dynamic response, int statusCode) { + _finalProducts.clear(); + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future getFilteredProducts( + {String categoryId, String brandId, String min, String max}) async { + hasError = false; + String endPoint; + + _parentProductsList.clear(); + endPoint = FILTERED_PRODUCTS + + "$categoryId" + + "&manufacturerids=$brandId" + + "&price_min=$min" + + "&price_max=$max&page=1&limit=50"; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _parentProductsList.add(PharmacyProduct.fromJson(item)); }); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart index f2c81956..65fffe33 100644 --- a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/cmc_service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import '../../../locator.dart'; @@ -34,6 +35,8 @@ class CMCViewModel extends BaseViewModel { List get checkupItems => _cMCService.checkupItemsList; + PharmacyModuleService _pharmacyModuleService = locator(); + bool get isOrderUpdated => _cMCService.isOrderUpdated; Future getCMCAllServices() async { @@ -115,8 +118,7 @@ class CMCViewModel extends BaseViewModel { Future getCustomerAddresses() async { setState(ViewState.Busy); - await _customerAddressesService.getCustomerAddresses( - ); + await _customerAddressesService.getCustomerAddresses(); if (_customerAddressesService.hasError) { error = _customerAddressesService.error; setState(ViewState.ErrorLocal); @@ -127,8 +129,9 @@ class CMCViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); - await _customerAddressesService.getCustomerInfo( - ); + await _pharmacyModuleService.generatePharmacyToken().then((value) async{ + await _customerAddressesService.getCustomerInfo(); + }); if (_customerAddressesService.hasError) { error = _customerAddressesService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart index 9348c116..5853cc8f 100644 --- a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart +++ b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index 20a19b23..5bab0df5 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:intl/intl.dart'; @@ -36,6 +37,9 @@ class HomeHealthCareViewModel extends BaseViewModel { List get hhcAllOrderDetail => _homeHealthCareService.hhcAllOrderDetail; + PharmacyModuleService _pharmacyModuleService = locator(); + + bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated; GetHHCAllPresOrdersResponseModel pendingOrder; @@ -117,8 +121,9 @@ class HomeHealthCareViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); - await _customerAddressesService.getCustomerInfo( - ); + await _pharmacyModuleService.generatePharmacyToken().then((value) async{ + await _customerAddressesService.getCustomerInfo(); + }); if (_customerAddressesService.hasError) { error = _customerAddressesService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModels/PrescriptionDeliveryViewModel.dart b/lib/core/viewModels/PrescriptionDeliveryViewModel.dart deleted file mode 100644 index e9731bae..00000000 --- a/lib/core/viewModels/PrescriptionDeliveryViewModel.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; -import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; - -import '../../locator.dart'; - -class PrescriptionDeliveryViewModel extends BaseViewModel{ - - CustomerAddressesService _customerAddressesService = locator(); - - List get addressesList => _customerAddressesService.addressesList; - - Future getCustomerAddresses() async { - setState(ViewState.Busy); - await _customerAddressesService.getCustomerAddresses( - ); - if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Idle); - } - } - - -} \ No newline at end of file diff --git a/lib/core/viewModels/ancillary_orders_view_model.dart b/lib/core/viewModels/ancillary_orders_view_model.dart new file mode 100644 index 00000000..77eb4237 --- /dev/null +++ b/lib/core/viewModels/ancillary_orders_view_model.dart @@ -0,0 +1,38 @@ +import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; + +import 'base_view_model.dart'; +import '../../locator.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; + +class AnciallryOrdersViewModel extends BaseViewModel { + bool hasError = false; + + AncillaryOrdersService _ancillaryService = locator(); + List get ancillaryLists => + _ancillaryService.ancillaryLists; + List get ancillaryListsDetails => + _ancillaryService.ancillaryProcLists; + Future getOrders() async { + hasError = false; + setState(ViewState.Busy); + await _ancillaryService.getOrders(); + if (_ancillaryService.hasError) { + error = _ancillaryService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getOrdersDetails(appointmentNo, orderNo) async { + hasError = false; + setState(ViewState.Busy); + await _ancillaryService.getOrdersDetails(appointmentNo, orderNo); + if (_ancillaryService.hasError) { + error = _ancillaryService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/er/EdOnlineViewModel.dart b/lib/core/viewModels/er/EdOnlineViewModel.dart new file mode 100644 index 00000000..1970a965 --- /dev/null +++ b/lib/core/viewModels/er/EdOnlineViewModel.dart @@ -0,0 +1,76 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/ErPatientShareModel.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/service/er/EdOnlineServices.dart'; +import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class EdOnlineViewModel extends BaseViewModel { + HospitalService _hospitalService = locator(); + + EdOnlineServices _edOnlineServices = locator(); + + List get hospitals => _hospitalService.hospitals; + + List get triageQuestionsModelList => + _edOnlineServices.triageQuestionsModelList; + + ErPatientShareModel get erPatientShareModel => _edOnlineServices.erPatientShareModel; + + Future getHospitals() async { + if(_hospitalService.hospitals.isEmpty){ + setState(ViewState.Busy); + await _hospitalService.getHospitals(); + if (_hospitalService.hasError) { + error = _hospitalService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + Future getQuestions() async { + if(_edOnlineServices.triageQuestionsModelList.isEmpty){ + setState(ViewState.Busy); + await _edOnlineServices.getQuestions(); + if (_edOnlineServices.hasError) { + error = _edOnlineServices.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + Future getPatientPaymentInformation({var id}) async { + setState(ViewState.Busy); + await _edOnlineServices.getPatientPaymentInformation(); + if (_edOnlineServices.hasError) { + error = _edOnlineServices.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future saveQuestionsInformation( + {String notes, + String chiefComplaint, + int projectId, + DateTime selectedTime, + List selectedQuestions}) async { + setState(ViewState.BusyLocal); + await _edOnlineServices.saveQuestionsInformation( + notes: notes, + projectId: projectId, + chiefComplaint: chiefComplaint, + selectedTime: selectedTime, + selectedQuestions: selectedQuestions); + if (_edOnlineServices.hasError) { + error = _edOnlineServices.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart new file mode 100644 index 00000000..455b5934 --- /dev/null +++ b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart @@ -0,0 +1,68 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/PrescriptionDeliveryService.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class PrescriptionDeliveryViewModel extends BaseViewModel { + CustomerAddressesService _customerAddressesService = + locator(); + PharmacyModuleService _pharmacyModuleService = + locator(); + PrescriptionDeliveryService _prescriptionDeliveryService = + locator(); + + List get addressesList => + _customerAddressesService.addressesList; + + Future getCustomerInfo() async { + setState(ViewState.Busy); + await _pharmacyModuleService.generatePharmacyToken().then((value) async { + await _customerAddressesService.getCustomerInfo(); + }); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; + setState(ViewState.ErrorLocal); + } else { + await getCustomerAddresses(); + } + } + + Future insertDeliveryOrder( + {int lineItemNo, + double latitude, + double longitude, + int appointmentNo, + int createdBy, + int dischargeID}) async { + + setState(ViewState.BusyLocal); + await _prescriptionDeliveryService.insertDeliveryOrder( + lineItemNo: lineItemNo, + latitude: latitude, + longitude: longitude, + appointmentNo: appointmentNo, + createdBy: createdBy, + dischargeID: dischargeID + ); + if (_prescriptionDeliveryService.hasError) { + error = _prescriptionDeliveryService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getCustomerAddresses() async { + setState(ViewState.Busy); + await _customerAddressesService.getCustomerAddresses(); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart index acbbee07..e33bc86c 100644 --- a/lib/core/viewModels/medical/my_balance_view_model.dart +++ b/lib/core/viewModels/medical/my_balance_view_model.dart @@ -97,7 +97,6 @@ class MyBalanceViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getPatientInfoByPatientID({String id}) async { setState(ViewState.Busy); await _myBalanceService.getPatientInfoByPatientID(id: id); @@ -110,7 +109,8 @@ class MyBalanceViewModel extends BaseViewModel { } } - Future getPatientInfoByPatientIDAndMobileNumber(AdvanceModel advanceModel) async { + Future getPatientInfoByPatientIDAndMobileNumber( + AdvanceModel advanceModel) async { setState(ViewState.Busy); await _myBalanceService .getPatientInfoByPatientIDAndMobileNumber(advanceModel); @@ -172,6 +172,5 @@ class MyBalanceViewModel extends BaseViewModel { await _myBalanceService.addUserAgreementForBloodDonation(); setState(ViewState.Idle); } - } } diff --git a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart index 06295188..1fa34ee2 100644 --- a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart @@ -5,8 +5,10 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformati import 'package:diplomaticquarterapp/core/model/pharmacies/ShippingOption.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCartResponse.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import '../../../locator.dart'; import '../base_view_model.dart'; @@ -17,6 +19,11 @@ class OrderPreviewViewModel extends BaseViewModel { List get addresses => _orderService.addresses; LacumAccountInformation get lacumInformation => _orderService.lacumInformation; + List get orderListModel => _orderService.orderList; + + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); + ShoppingCartResponse cartResponse = ShoppingCartResponse(); PaymentCheckoutData paymentCheckoutData = PaymentCheckoutData(); double totalAdditionalShippingCharge = 0; @@ -32,7 +39,7 @@ class OrderPreviewViewModel extends BaseViewModel { } } - getShoppingCart() async { + Future getShoppingCart() async { setState(ViewState.Busy); await _orderService.getShoppingCart().then((res) { _handleGetShoppingCartResponse(res); @@ -48,20 +55,20 @@ class OrderPreviewViewModel extends BaseViewModel { } } - changeProductQuantity(ShoppingCart product) async { + Future changeProductQuantity(ShoppingCart product) async { setState(ViewState.Busy); await _orderService.changeProductQuantity(product.id, product).then((res) { _handleGetShoppingCartResponse(res); }); if (_orderService.hasError) { error = _orderService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } } - deleteProduct(ShoppingCart product) async { + Future deleteProduct(ShoppingCart product) async { setState(ViewState.Busy); await _orderService.deleteProduct(product.id).then((res) { _handleGetShoppingCartResponse(res); @@ -74,7 +81,7 @@ class OrderPreviewViewModel extends BaseViewModel { } } - deleteShoppingCart() async { + Future deleteShoppingCart() async { setState(ViewState.Busy); await _orderService.deleteShoppingCart().then((res) { _handleGetShoppingCartResponse(res); @@ -182,10 +189,12 @@ class OrderPreviewViewModel extends BaseViewModel { Future makeOrder() async { setState(ViewState.Busy); + await pharmacyModuleViewModel.generatePharmacyToken(); + await _orderService.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts); if (_orderService.hasError) { error = _orderService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } diff --git a/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart index f8f5ea05..f2ed5913 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart @@ -19,11 +19,13 @@ class LacumRegistrationViewModel extends LacumViewModel { error = _lacumService.error; setState(ViewState.Error); } else { - if(_lacumService.lacumInformation.yahalaAccountNo != 0){ - error = "The account has already been activated"; - setState(ViewState.Error); - } else { - setState(ViewState.Idle); + if(_lacumService.lacumInformation != null){ + if(_lacumService.lacumInformation.yahalaAccountNo == 0){ + error = _lacumService.lacumInformation.errorEndUserMessage; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } } } } diff --git a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart index ba8d70d9..1ee1a41c 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart @@ -19,6 +19,9 @@ class LacumViewModel extends BaseViewModel { LacumAccountInformation get lacumGroupInformation => _lacumService.lacumGroupInformation; + String get successMsg => + _lacumService.successMsg; + Future getLacumData() async { await getLacumAccountData(); getLacumGroupData(); @@ -70,16 +73,14 @@ class LacumViewModel extends BaseViewModel { } } - Future createLakumAccount(String name, String phone) async { - setState(ViewState.Busy); + Future createLakumAccount(String name, String phone) async { + setState(ViewState.BusyLocal); await _lacumService.createLakumAccount(name, phone, lacumInformation.yahalaAccountNo, lacumInformation.identificationNo, null); if (_lacumService.hasError) { error = _lacumService.error; - setState(ViewState.Error); - return 404; + setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); - return 200; } } diff --git a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart index 90881d7e..5b1c67f2 100644 --- a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart @@ -1,18 +1,17 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCartResponse.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; -import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; -import 'package:diplomaticquarterapp/pages/pharmacy/order/OrderDetails.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/cancelOrder_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/orderDetails_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; -import 'package:flutter/material.dart'; import '../../../locator.dart'; import '../base_view_model.dart'; @@ -21,10 +20,10 @@ class OrderModelViewModel extends BaseViewModel { List get orders => _orderService.orderList; OrderDetailsService _orderDetailsService = locator(); - List get orderListModel => _orderDetailsService.orderList; + List get orderListModel => _orderDetailsService.orderList; CancelOrderService _cancelOrderService = locator(); - List get cancelOrder => _cancelOrderService.cancelOrderList; + List get cancelOrder => _cancelOrderService.cancelOrderList; OrderPreviewService _orderServices = locator(); @@ -50,7 +49,7 @@ class OrderModelViewModel extends BaseViewModel { } } - Future getOrderDetails(OrderId) async { + Future getOrderDetails(OrderId) async { setState(ViewState.Busy); await _orderDetailsService.getOrderDetails(OrderId); if (_orderDetailsService.hasError) { @@ -99,7 +98,7 @@ class OrderModelViewModel extends BaseViewModel { return res; } - Future makeReview(Product product, double rating, String reviewText) async { + Future makeReview(PharmacyProduct product, double rating, String reviewText) async { setState(ViewState.Busy); await _orderDetailsService.makeReview(product, rating, reviewText); if (_orderDetailsService.hasError) { @@ -112,15 +111,16 @@ class OrderModelViewModel extends BaseViewModel { message: "Your review has been Submitted successfully"); } } + Future makeOrder() async { - setState(ViewState.Busy); + /* setState(ViewState.Busy); await _orderServices.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts); if (_orderServices.hasError) { error = _orderServices.error; setState(ViewState.Error); } else { setState(ViewState.Idle); - } + }*/ } } diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart index 303dab9e..833735bb 100644 --- a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -4,11 +4,14 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; +import 'package:diplomaticquarterapp/core/service/medical/prescriptions_service.dart'; //import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart'; -//import 'package:diplomaticquarterapp/core/service/medical/prescriptions_service.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/recommendedProduct_service.dart'; + import '../../../locator.dart'; @@ -17,6 +20,9 @@ class PharmacyModuleViewModel extends BaseViewModel { PrescriptionService _prescriptionService = locator(); + + RecommendedProductService _recommendedProductService = locator(); + List get bannerList => _pharmacyService.bannerItems; List get manufacturerList => _pharmacyService.manufacturerList; @@ -27,19 +33,26 @@ class PharmacyModuleViewModel extends BaseViewModel { List get lastVisitedProducts => _pharmacyService.lastVisitedProducts; + + List get recommendedProductList => + _recommendedProductService.recommendedList; + List get prescriptionsList => _prescriptionService.prescriptionsList; + bool hasError = false; // List get pharmacyPrescriptionsList => PharmacyProduct.pharmacyPrescriptionsList ; Future getPharmacyHomeData() async { - setState(ViewState.Busy); + if(authenticatedUserObject.isLogin) + await generatePharmacyToken(); + var data = await sharedPref.getObject(USER_PROFILE); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + setState(ViewState.Busy); if (authenticatedUserObject.isLogin && data != null && customerId == null) { await _pharmacyService.makeVerifyCustomer(data); - // here must call getShoppingCard() if (_pharmacyService.hasError) { error = _pharmacyService.error; setState(ViewState.Error); @@ -125,15 +138,17 @@ class PharmacyModuleViewModel extends BaseViewModel { } /////////////RecommendedProducts -// _getRecommendedProducts() async { -// await _pharmacyService.getRecommendedProducts(); -// if (_pharmacyService.hasError) { -// error = _pharmacyService.error; -// setState(ViewState.Error); -// } else { -// setState(ViewState.Idle); -// } -// } + getRecommendedProducts(productId) async { + hasError = false; + setState(ViewState.Busy); + await _recommendedProductService.getRecommendedProducts(productId); + if (_recommendedProductService.hasError) { + error = _recommendedProductService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } Future checkUserIsActivated() async { if (authenticatedUserObject.isLogin) { @@ -161,4 +176,19 @@ class PharmacyModuleViewModel extends BaseViewModel { } } + + ///////////////////////or +// getPrescriptions() async { +// setState(ViewState.Busy); +// await _prescriptionsService.getPrescriptions(); +// if (_prescriptionsService.hasError) { +// error = _prescriptionsService.error; +// setState(ViewState.Error); +// } else { +// _filterList(); +// await _getPrescriptionsOrders(); +// setState(ViewState.Idle); +// } +// } + } diff --git a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart index e3a6255e..c7ac0a04 100644 --- a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart @@ -11,23 +11,19 @@ import '../../../locator.dart'; class ProductDetailViewModel extends BaseViewModel{ ProductDetailService _productDetailService = locator(); - ProductDetailService _productLocationService = locator(); - ProductDetailService _productWishlistService = locator(); - ProductDetailService _productSpecification = locator(); List get productDetailService => _productDetailService.productDetailList; - List get productLocationService => _productLocationService.productLocationList; + List get productLocationService => _productDetailService.productLocationList; - List get wishListItems => _productWishlistService.wishListProducts; + List get wishListItems => _productDetailService.wishListProducts; - List get productSpecification => _productSpecification.productSpecification; + List get productSpecification => _productDetailService.productSpecification; bool hasError = false; Future getProductReviewsData(productID) async { - print('ENAD REview'); hasError = false; setState(ViewState.Busy); await _productDetailService.getProductReviews(productID); @@ -39,12 +35,11 @@ class ProductDetailViewModel extends BaseViewModel{ } Future getProductLocationData() async { - print('ENAD in model view'); hasError = false; setState(ViewState.Busy); - await _productLocationService.getProductAvailabiltyDetail(); - if (_productLocationService.hasError) { - error = _productLocationService.error; + await _productDetailService.getProductAvailabiltyDetail(); + if (_productDetailService.hasError) { + error = _productDetailService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -53,9 +48,9 @@ class ProductDetailViewModel extends BaseViewModel{ Future notifyMe(customerId, itemID) async { hasError = false; setState(ViewState.Busy); - await _productLocationService.notifyMe(customerId, itemID); - if (_productLocationService.hasError) { - error = _productLocationService.error; + await _productDetailService.notifyMe(customerId, itemID); + if (_productDetailService.hasError) { + error = _productDetailService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -64,9 +59,9 @@ class ProductDetailViewModel extends BaseViewModel{ Future addToCartData(quantity, itemID) async { hasError = false; setState(ViewState.Busy); - await _productLocationService.addToCart(quantity, itemID); - if (_productLocationService.hasError) { - error = _productLocationService.error; + await _productDetailService.addToCart(quantity, itemID); + if (_productDetailService.hasError) { + error = _productDetailService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -75,9 +70,9 @@ class ProductDetailViewModel extends BaseViewModel{ Future addToWishlistData(itemID) async { hasError = false; setState(ViewState.Busy); - await _productLocationService.addToWishlist(itemID); - if (_productLocationService.hasError) { - error = _productLocationService.error; + await _productDetailService.addToWishlist(itemID); + if (_productDetailService.hasError) { + error = _productDetailService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -86,9 +81,9 @@ class ProductDetailViewModel extends BaseViewModel{ Future checkWishlistData() async { hasError = false; setState(ViewState.Busy); - await _productWishlistService.getWishlistItems(); - if (_productWishlistService.hasError) { - error = _productWishlistService.error; + await _productDetailService.getWishlistItems(); + if (_productDetailService.hasError) { + error = _productDetailService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -98,9 +93,9 @@ class ProductDetailViewModel extends BaseViewModel{ Future deletWishlistData(itemID) async { hasError = false; setState(ViewState.Busy); - await _productWishlistService.delteItemFromWishlist(itemID); - if (_productWishlistService.hasError) { - error = _productWishlistService.error; + await _productDetailService.delteItemFromWishlist(itemID); + if (_productDetailService.hasError) { + error = _productDetailService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -110,9 +105,9 @@ class ProductDetailViewModel extends BaseViewModel{ Future productSpecificationData(itemID) async { hasError = false; setState(ViewState.Busy); - await _productWishlistService.productSpecificationData(itemID); - if (_productWishlistService.hasError) { - error = _productWishlistService.error; + await _productDetailService.productSpecificationData(itemID); + if (_productDetailService.hasError) { + error = _productDetailService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacy_categorise_view_model.dart b/lib/core/viewModels/pharmacy_categorise_view_model.dart index d26d860d..47f64688 100644 --- a/lib/core/viewModels/pharmacy_categorise_view_model.dart +++ b/lib/core/viewModels/pharmacy_categorise_view_model.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/brands_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/final_products_model.dart'; @@ -16,22 +17,30 @@ import 'base_view_model.dart'; class PharmacyCategoriseViewModel extends BaseViewModel { bool hasError = false; - PharmacyCategoriseService _pharmacyCategoriseService = locator(); + PharmacyCategoriseService _pharmacyCategoriseService = + locator(); - List get categorise => _pharmacyCategoriseService.categoriseList; + List get categorise => + _pharmacyCategoriseService.categoriseList; - List get categoriseParent => _pharmacyCategoriseService.parentCategoriseList; + List get categoriseParent => + _pharmacyCategoriseService.parentCategoriseList; - List get parentProducts => _pharmacyCategoriseService.parentProductsList; + List get parentProducts => + _pharmacyCategoriseService.parentProductsList; - List get subCategorise => _pharmacyCategoriseService.subCategoriseList; + List get subCategorise => + _pharmacyCategoriseService.subCategoriseList; - List get subProducts => _pharmacyCategoriseService.subProductsList; + List get subProducts => + _pharmacyCategoriseService.subProductsList; - List get finalProducts => _pharmacyCategoriseService.finalProducts; - List get brandsList => _pharmacyCategoriseService.brandsList; + List get finalProducts => + _pharmacyCategoriseService.finalProducts; + List get brandsList => + _pharmacyCategoriseService.brandsList; - List get searchList => _pharmacyCategoriseService.searchList; + List get searchList => _pharmacyCategoriseService.searchList; List get scanList => _pharmacyCategoriseService.scanList; @@ -47,11 +56,11 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getBrands() async { + Future getBrands({String id}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); - await _pharmacyCategoriseService.getBrands(); + await _pharmacyCategoriseService.getBrands(id: id); if (_pharmacyCategoriseService.hasError) { error = _pharmacyCategoriseService.error; setState(ViewState.ErrorLocal); @@ -97,7 +106,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.ErrorLocal); } else await getParentProducts(i: i); - await getBrands(); + await getBrands(id: i); } Future getParentProducts({String i}) async { @@ -147,4 +156,51 @@ class PharmacyCategoriseViewModel extends BaseViewModel { } else setState(ViewState.Idle); } + + Future getFilteredProducts( + {String categoryId, String brandId, String min, String max}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getFilteredProducts( + categoryId: categoryId, brandId: brandId, max: max, min: min); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getManufacturerProducts(String id) async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getManufacturerProducts(id); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getLastVisitedProducts() async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getLastVisitedProducts(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getBestSellerProducts() async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getBestSellerProducts(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } } diff --git a/lib/d_q_icons_icons.dart b/lib/d_q_icons_icons.dart index c3b64559..5d1ff3c6 100644 --- a/lib/d_q_icons_icons.dart +++ b/lib/d_q_icons_icons.dart @@ -39,4 +39,5 @@ class DQIcons { static const IconData my_medical_file = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData family = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData calendar__2_ = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData roboticon = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/locator.dart b/lib/locator.dart index bf97537d..1acaf1af 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -1,10 +1,17 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; +import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart'; import 'package:diplomaticquarterapp/core/service/qr_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/recommendedProduct_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +// import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/review_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/wishList_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; @@ -21,6 +28,7 @@ import 'core/service/AlHabibMedicalService/e_referral_service.dart'; import 'core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; import 'core/service/AlHabibMedicalService/home_health_care_service.dart'; import 'core/service/AuthenticatedUserObject.dart'; +import 'core/service/PrescriptionDeliveryService.dart'; import 'core/service/appointment_rate_service.dart'; import 'core/service/blood/blood_details_servies.dart'; import 'core/service/blood/blood_donation_service.dart'; @@ -32,6 +40,7 @@ import 'core/service/childvaccines/vaccination_table_service.dart'; import 'core/service/contactus/finadus_service.dart'; import 'core/service/contactus/livechat_service.dart'; import 'core/service/dashboard_service.dart'; +import 'core/service/er/EdOnlineServices.dart'; import 'core/service/er/am_service.dart'; import 'core/service/er/er_service.dart'; import 'core/service/feedback/feedback_service.dart'; @@ -69,7 +78,8 @@ import 'core/service/parmacyModule/parmacy_module_service.dart'; import 'core/service/offers_service.dart'; import 'core/service/pharmacy_categorise_service.dart'; import 'core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; -import 'core/viewModels/PrescriptionDeliveryViewModel.dart'; +import 'core/viewModels/er/EdOnlineViewModel.dart'; +import 'core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; import 'core/viewModels/TermsConditionsViewModel.dart'; import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; @@ -186,8 +196,12 @@ void setupLocator() { locator.registerLazySingleton(() => DeleteBabyService()); locator.registerLazySingleton(() => VaccinationTableService()); + locator.registerLazySingleton(() => AncillaryOrdersService()); + locator.registerLazySingleton(() => EdOnlineServices()); //pharmacy + // locator.registerLazySingleton(() => PharmacyCategoriseService()); + // locator.registerLazySingleton(() => OffersCategoriseService()); locator.registerLazySingleton(() => PharmacyCategoriseService()); locator.registerLazySingleton(() => OffersCategoriseService()); @@ -206,14 +220,17 @@ void setupLocator() { locator.registerLazySingleton(() => PharmacyAddressService()); locator.registerLazySingleton(() => OrderDetailsService()); locator.registerLazySingleton(() => CustomerAddressesService()); + // locator.registerLazySingleton(() => TermsConditionService()); locator.registerLazySingleton(() => TermsConditionService()); locator.registerLazySingleton(() => CancelOrderService()); locator.registerLazySingleton(() => PrescriptionService()); + locator.registerLazySingleton(() => RecommendedProductService()); locator.registerLazySingleton(() => PrivilegeService()); locator.registerLazySingleton(() => WeatherService()); locator.registerLazySingleton(() => TermsConditionsService()); locator.registerLazySingleton(() => BariatricsService()); + locator.registerLazySingleton(() => PrescriptionDeliveryService()); /// View Model locator.registerFactory(() => HospitalViewModel()); @@ -274,6 +291,7 @@ void setupLocator() { locator.registerFactory(() => LacumViewModel()); locator.registerFactory(() => LacumTranferViewModel()); locator.registerFactory(() => LacumRegistrationViewModel()); + locator.registerFactory(() => EdOnlineViewModel()); //pharmacy locator.registerFactory(() => PharmacyCategoriseViewModel()); @@ -286,9 +304,13 @@ void setupLocator() { locator.registerFactory(() => OfferCategoriesViewModel()); // Categories View Model locator.registerFactory(() => PackagesViewModel()); // Products View Model + //pharmacy + // locator.registerFactory(() => PharmacyCategoriseViewModel()); + // locator.registerFactory(() => OffersCategoriseViewModel()); // Geofencing // --------------------- locator.registerLazySingleton( () => GeofencingServices()); // Geofencing Services locator.registerFactory(() => TermsConditionsViewModel()); + locator.registerFactory(() => AnciallryOrdersViewModel()); } diff --git a/lib/main.dart b/lib/main.dart index aaffe3c3..2412e4d1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -7,13 +7,16 @@ import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/uitl/HMG_Geofence.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'Constants.dart'; +import 'config/shared_pref_kay.dart'; import 'config/size_config.dart'; import 'core/model/geofencing/requests/GeoZonesRequestModel.dart'; import 'core/service/geofencing/GeofencingServices.dart'; @@ -23,18 +26,33 @@ import 'pages/pharmacies/compare-list.dart'; void main() async { setupLocator(); - runApp(ChangeNotifierProvider(create: (context) => ThemeNotifier(defaultTheme), child: MyApp())); + runApp(MyApp()); } -class MyApp extends StatelessWidget { +class MyApp extends StatefulWidget { + @override + _MyApp createState() => new _MyApp(); +} + +class _MyApp extends State { + @override + void initState(){ + // ProjectViewModel projectProvider; + // projectProvider = Provider.of(context); + // var font = projectProvider.isArabic ? 'Cairo' : 'WorkSans'; + ThemeNotifier(defaultTheme()); + super.initState(); + } + @override Widget build(BuildContext context) { PlatformBridge.init(context); - LocalNotification.init(onNotificationClick: (payload){ - LocalNotification.getInstance().showNow(title: "Payload", subtitle: payload, payload: payload); + LocalNotification.init(onNotificationClick: (payload) { + LocalNotification.getInstance() + .showNow(title: "Payload", subtitle: payload, payload: payload); }); - final themeNotifier = Provider.of(context); + // final themeNotifier = Provider.of(context); precacheImage(AssetImage('assets/images/powerd-by.jpg'), context); return LayoutBuilder( builder: (context, constraints) { @@ -46,11 +64,18 @@ class MyApp extends StatelessWidget { ChangeNotifierProvider( create: (context) => ProjectViewModel(), ), - ChangeNotifierProvider(create: (context) => ToDoCountProviderModel()), - ChangeNotifierProvider(create: (context) => SearchProvider()), + ChangeNotifierProvider( + create: (context) => ToDoCountProviderModel()), + ChangeNotifierProvider( + create: (context) => SearchProvider()), ChangeNotifierProvider.value( value: SearchProvider(), ), + ChangeNotifierProvider( + create: (context) => ThemeNotifier( + defaultTheme() + ) + ), StreamProvider.value( value: RobotProvider().intStream(), initialData: RobotProvider().setValue({}), @@ -73,48 +98,50 @@ class MyApp extends StatelessWidget { const Locale('ar', ''), // Arabic const Locale('en', ''), // English ], - theme: ThemeData( - fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', - primarySwatch: Colors.blue, - visualDensity: VisualDensity.adaptivePlatformDensity, - brightness: Brightness.light, - pageTransitionsTheme: const PageTransitionsTheme( - builders: { - TargetPlatform.android: ZoomPageTransitionsBuilder(), - TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), - }, - ), - hintColor: Colors.grey[400], - textTheme: TextTheme( - headline1: TextStyle( - color: Color(0xffB8382C), - ), - ), - floatingActionButtonTheme: FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), - disabledColor: Colors.grey[300], - errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100], - textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), - textSelectionHandleColor: Colors.grey, - canvasColor: Colors.white, - backgroundColor: Color.fromRGBO(255, 255, 255, 1), - highlightColor: Colors.grey[100].withOpacity(0.4), - splashColor: Colors.transparent, - primaryColor: Color(0xff515A5D), - toggleableActiveColor: secondaryColor, - indicatorColor: secondaryColor, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), - cursorColor: Colors.grey, - iconTheme: IconThemeData(), - appBarTheme: AppBarTheme( - color: Color(0xff515A5D), - brightness: Brightness.light, - elevation: 0.0, - actionsIconTheme: IconThemeData( - color: Colors.grey[800], - ), - ), - ), + theme: Provider.of(context).getTheme(), + // theme: ThemeData( + // fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', + // primarySwatch: Colors.blue, + // visualDensity: VisualDensity.adaptivePlatformDensity, + // brightness: Brightness.light, + // pageTransitionsTheme: const PageTransitionsTheme( + // builders: { + // TargetPlatform.android: ZoomPageTransitionsBuilder(), + // TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + // }, + // ), + // hintColor: Colors.grey[400], + // textTheme: TextTheme( + // headline1: TextStyle( + // color: Color(0xffB8382C), + // ), + // ), + // disabledColor: Colors.grey[300], + // errorColor: Color.fromRGBO(235, 80, 60, 1.0), + // scaffoldBackgroundColor: + // Color(0xffE9E9E9), // Colors.grey[100], + // textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), + // textSelectionHandleColor: Colors.grey, + // canvasColor: Colors.white, + // backgroundColor: Color.fromRGBO(255, 255, 255, 1), + // highlightColor: Colors.grey[100].withOpacity(0.4), + // splashColor: Colors.transparent, + // primaryColor: Color(0xff515A5D), + // toggleableActiveColor: secondaryColor, + // indicatorColor: secondaryColor, + // bottomSheetTheme: BottomSheetThemeData( + // backgroundColor: HexColor('#E0E0E0')), + // cursorColor: Colors.grey, + // iconTheme: IconThemeData(), + // appBarTheme: AppBarTheme( + // color: Color(0xff515A5D), + // brightness: Brightness.light, + // elevation: 0.0, + // actionsIconTheme: IconThemeData( + // color: Colors.grey[800], + // ), + // ), + // ), initialRoute: SPLASH, // initialRoute: PACKAGES_OFFERS, // initialRoute: PACKAGES_ORDER_COMPLETED, diff --git a/lib/models/Authentication/send_activation_request.dart b/lib/models/Authentication/send_activation_request.dart index b53e19b8..f9b386c6 100644 --- a/lib/models/Authentication/send_activation_request.dart +++ b/lib/models/Authentication/send_activation_request.dart @@ -21,7 +21,7 @@ class SendActivationRequest { Null sessionID; bool isDentalAllowedBackend; int deviceTypeID; - + String sMSSignature; SendActivationRequest( {this.patientMobileNumber, this.mobileNo, @@ -44,7 +44,8 @@ class SendActivationRequest { this.patientOutSA, this.sessionID, this.isDentalAllowedBackend, - this.deviceTypeID}); + this.deviceTypeID, + this.sMSSignature}); SendActivationRequest.fromJson(Map json) { patientMobileNumber = json['PatientMobileNumber']; @@ -69,6 +70,7 @@ class SendActivationRequest { sessionID = json['SessionID']; isDentalAllowedBackend = json['isDentalAllowedBackend']; deviceTypeID = json['DeviceTypeID']; + sMSSignature = json['SMSSignature']; } Map toJson() { @@ -95,6 +97,7 @@ class SendActivationRequest { data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; + data['SMSSignature'] = sMSSignature; return data; } } diff --git a/lib/models/anicllary-orders/ancillary_order_list_model.dart b/lib/models/anicllary-orders/ancillary_order_list_model.dart new file mode 100644 index 00000000..76ef3a7d --- /dev/null +++ b/lib/models/anicllary-orders/ancillary_order_list_model.dart @@ -0,0 +1,105 @@ +class AncillaryOrdersListModel { + List ancillaryOrderList; + Null errCode; + String message; + int patientID; + String patientName; + int patientType; + int projectID; + String projectName; + String setupID; + int statusCode; + + AncillaryOrdersListModel( + {this.ancillaryOrderList, + this.errCode, + this.message, + this.patientID, + this.patientName, + this.patientType, + this.projectID, + this.projectName, + this.setupID, + this.statusCode}); + + AncillaryOrdersListModel.fromJson(Map json) { + if (json['AncillaryOrderList'] != null) { + ancillaryOrderList = new List(); + json['AncillaryOrderList'].forEach((v) { + ancillaryOrderList.add(new AncillaryOrderList.fromJson(v)); + }); + } + errCode = json['ErrCode']; + message = json['Message']; + patientID = json['PatientID']; + patientName = json['PatientName']; + patientType = json['PatientType']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + setupID = json['SetupID']; + statusCode = json['StatusCode']; + } + + Map toJson() { + final Map data = new Map(); + if (this.ancillaryOrderList != null) { + data['AncillaryOrderList'] = + this.ancillaryOrderList.map((v) => v.toJson()).toList(); + } + data['ErrCode'] = this.errCode; + data['Message'] = this.message; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PatientType'] = this.patientType; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['SetupID'] = this.setupID; + data['StatusCode'] = this.statusCode; + return data; + } +} + +class AncillaryOrderList { + String appointmentDate; + int appointmentNo; + int clinicID; + String clinicName; + int doctorID; + String doctorName; + String orderDate; + int orderNo; + + AncillaryOrderList( + {this.appointmentDate, + this.appointmentNo, + this.clinicID, + this.clinicName, + this.doctorID, + this.doctorName, + this.orderDate, + this.orderNo}); + + AncillaryOrderList.fromJson(Map json) { + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + clinicID = json['ClinicID']; + clinicName = json['ClinicName']; + doctorID = json['DoctorID']; + doctorName = json['DoctorName']; + orderDate = json['OrderDate']; + orderNo = json['OrderNo']; + } + + Map toJson() { + final Map data = new Map(); + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['ClinicID'] = this.clinicID; + data['ClinicName'] = this.clinicName; + data['DoctorID'] = this.doctorID; + data['DoctorName'] = this.doctorName; + data['OrderDate'] = this.orderDate; + data['OrderNo'] = this.orderNo; + return data; + } +} diff --git a/lib/models/anicllary-orders/ancillary_order_proc_model.dart b/lib/models/anicllary-orders/ancillary_order_proc_model.dart new file mode 100644 index 00000000..7322d11a --- /dev/null +++ b/lib/models/anicllary-orders/ancillary_order_proc_model.dart @@ -0,0 +1,249 @@ +class AncillaryOrdersListProcListModel { + List ancillaryOrderProcList; + String appointmentDate; + dynamic appointmentNo; + dynamic clinicID; + String clinicName; + dynamic companyID; + String companyName; + dynamic doctorID; + String doctorName; + Null errCode; + dynamic groupID; + String insurancePolicyNo; + String message; + String patientCardID; + dynamic patientID; + String patientName; + dynamic patientType; + dynamic policyID; + String policyName; + dynamic projectID; + String setupID; + dynamic statusCode; + dynamic subCategoryID; + String subPolicyNo; + + AncillaryOrdersListProcListModel( + {this.ancillaryOrderProcList, + this.appointmentDate, + this.appointmentNo, + this.clinicID, + this.clinicName, + this.companyID, + this.companyName, + this.doctorID, + this.doctorName, + this.errCode, + this.groupID, + this.insurancePolicyNo, + this.message, + this.patientCardID, + this.patientID, + this.patientName, + this.patientType, + this.policyID, + this.policyName, + this.projectID, + this.setupID, + this.statusCode, + this.subCategoryID, + this.subPolicyNo}); + + AncillaryOrdersListProcListModel.fromJson(Map json) { + if (json['AncillaryOrderProcList'] != null) { + ancillaryOrderProcList = new List(); + json['AncillaryOrderProcList'].forEach((v) { + ancillaryOrderProcList.add(new AncillaryOrderProcList.fromJson(v)); + }); + } + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + clinicID = json['ClinicID']; + clinicName = json['ClinicName']; + companyID = json['CompanyID']; + companyName = json['CompanyName']; + doctorID = json['DoctorID']; + doctorName = json['DoctorName']; + errCode = json['ErrCode']; + groupID = json['GroupID']; + insurancePolicyNo = json['InsurancePolicyNo']; + message = json['Message']; + patientCardID = json['PatientCardID']; + patientID = json['PatientID']; + patientName = json['PatientName']; + patientType = json['PatientType']; + policyID = json['PolicyID']; + policyName = json['PolicyName']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + statusCode = json['StatusCode']; + subCategoryID = json['SubCategoryID']; + subPolicyNo = json['SubPolicyNo']; + } + + Map toJson() { + final Map data = new Map(); + if (this.ancillaryOrderProcList != null) { + data['AncillaryOrderProcList'] = + this.ancillaryOrderProcList.map((v) => v.toJson()).toList(); + } + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['ClinicID'] = this.clinicID; + data['ClinicName'] = this.clinicName; + data['CompanyID'] = this.companyID; + data['CompanyName'] = this.companyName; + data['DoctorID'] = this.doctorID; + data['DoctorName'] = this.doctorName; + data['ErrCode'] = this.errCode; + data['GroupID'] = this.groupID; + data['InsurancePolicyNo'] = this.insurancePolicyNo; + data['Message'] = this.message; + data['PatientCardID'] = this.patientCardID; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PatientType'] = this.patientType; + data['PolicyID'] = this.policyID; + data['PolicyName'] = this.policyName; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['StatusCode'] = this.statusCode; + data['SubCategoryID'] = this.subCategoryID; + data['SubPolicyNo'] = this.subPolicyNo; + return data; + } +} + +class AncillaryOrderProcList { + dynamic approvalLineItemNo; + dynamic approvalNo; + String approvalStatus; + dynamic approvalStatusID; + dynamic companyShare; + dynamic companyShareWithTax; + dynamic companyTaxAmount; + dynamic discountAmount; + dynamic discountCategory; + String discountType; + dynamic discountTypeValue; + bool isApprovalCreated; + bool isApprovalRequired; + bool isCovered; + String orderDate; + dynamic orderLineItemNo; + dynamic orderNo; + dynamic partnerID; + dynamic partnerShare; + String partnerShareType; + dynamic patientShare; + dynamic patientShareWithTax; + dynamic patientTaxAmount; + dynamic procPrice; + dynamic procedureCategoryID; + String procedureCategoryName; + String procedureID; + String procedureName; + dynamic taxAmount; + dynamic taxPct; + + AncillaryOrderProcList( + {this.approvalLineItemNo, + this.approvalNo, + this.approvalStatus, + this.approvalStatusID, + this.companyShare, + this.companyShareWithTax, + this.companyTaxAmount, + this.discountAmount, + this.discountCategory, + this.discountType, + this.discountTypeValue, + this.isApprovalCreated, + this.isApprovalRequired, + this.isCovered, + this.orderDate, + this.orderLineItemNo, + this.orderNo, + this.partnerID, + this.partnerShare, + this.partnerShareType, + this.patientShare, + this.patientShareWithTax, + this.patientTaxAmount, + this.procPrice, + this.procedureCategoryID, + this.procedureCategoryName, + this.procedureID, + this.procedureName, + this.taxAmount, + this.taxPct}); + + AncillaryOrderProcList.fromJson(Map json) { + approvalLineItemNo = json['ApprovalLineItemNo']; + approvalNo = json['ApprovalNo']; + approvalStatus = json['ApprovalStatus']; + approvalStatusID = json['ApprovalStatusID']; + companyShare = json['CompanyShare']; + companyShareWithTax = json['CompanyShareWithTax']; + companyTaxAmount = json['CompanyTaxAmount']; + discountAmount = json['DiscountAmount']; + discountCategory = json['DiscountCategory']; + discountType = json['DiscountType']; + discountTypeValue = json['DiscountTypeValue']; + isApprovalCreated = json['IsApprovalCreated']; + isApprovalRequired = json['IsApprovalRequired']; + isCovered = json['IsCovered']; + orderDate = json['OrderDate']; + orderLineItemNo = json['OrderLineItemNo']; + orderNo = json['OrderNo']; + partnerID = json['PartnerID']; + partnerShare = json['PartnerShare']; + partnerShareType = json['PartnerShareType']; + patientShare = json['PatientShare']; + patientShareWithTax = json['PatientShareWithTax']; + patientTaxAmount = json['PatientTaxAmount']; + procPrice = json['ProcPrice']; + procedureCategoryID = json['ProcedureCategoryID']; + procedureCategoryName = json['ProcedureCategoryName']; + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + taxAmount = json['TaxAmount']; + taxPct = json['TaxPct']; + } + + Map toJson() { + final Map data = new Map(); + data['ApprovalLineItemNo'] = this.approvalLineItemNo; + data['ApprovalNo'] = this.approvalNo; + data['ApprovalStatus'] = this.approvalStatus; + data['ApprovalStatusID'] = this.approvalStatusID; + data['CompanyShare'] = this.companyShare; + data['CompanyShareWithTax'] = this.companyShareWithTax; + data['CompanyTaxAmount'] = this.companyTaxAmount; + data['DiscountAmount'] = this.discountAmount; + data['DiscountCategory'] = this.discountCategory; + data['DiscountType'] = this.discountType; + data['DiscountTypeValue'] = this.discountTypeValue; + data['IsApprovalCreated'] = this.isApprovalCreated; + data['IsApprovalRequired'] = this.isApprovalRequired; + data['IsCovered'] = this.isCovered; + data['OrderDate'] = this.orderDate; + data['OrderLineItemNo'] = this.orderLineItemNo; + data['OrderNo'] = this.orderNo; + data['PartnerID'] = this.partnerID; + data['PartnerShare'] = this.partnerShare; + data['PartnerShareType'] = this.partnerShareType; + data['PatientShare'] = this.patientShare; + data['PatientShareWithTax'] = this.patientShareWithTax; + data['PatientTaxAmount'] = this.patientTaxAmount; + data['ProcPrice'] = this.procPrice; + data['ProcedureCategoryID'] = this.procedureCategoryID; + data['ProcedureCategoryName'] = this.procedureCategoryName; + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + data['TaxAmount'] = this.taxAmount; + data['TaxPct'] = this.taxPct; + return data; + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart index 4e396427..72aa40dc 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart @@ -22,127 +22,135 @@ class CMCLocationPage extends StatefulWidget { final double longitude; final dynamic model; - const CMCLocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model}) + const CMCLocationPage( + {Key key, this.onPick, this.latitude, this.longitude, this.model}) : super(key: key); @override - _CMCLocationPageState createState() => - _CMCLocationPageState(); + _CMCLocationPageState createState() => _CMCLocationPageState(); } -class _CMCLocationPageState - extends State { +class _CMCLocationPageState extends State { double latitude = 0; double longitude = 0; @override void initState() { - latitude = widget.latitude; longitude = widget.longitude; super.initState(); } - @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) {}, builder: (_, model, widget) => AppScaffold( - isShowDecPage: false, - isShowAppBar: true, - baseViewModel: model, - body: PlacePicker( - apiKey: GOOGLE_API_KEY, - enableMyLocationButton: true, - automaticallyImplyAppBarLeading: false, - autocompleteOnTrailingWhitespace: true, - selectInitialPosition: true, - autocompleteLanguage: projectViewModel.currentLanguage, - enableMapTypeButton: true, - searchForInitialValue: false, - onPlacePicked: (PickResult result) { - print(result.adrAddress); - - }, - selectedPlaceWidgetBuilder: - (_, selectedPlace, state, isSearchBarFocused) { - print("state: $state, isSearchBarFocused: $isSearchBarFocused"); - return isSearchBarFocused - ? Container() - : FloatingCard( - bottomPosition: 0.0, - leftPosition: 0.0, - rightPosition: 0.0, - width: 500, - borderRadius: BorderRadius.circular(12.0), - child: state == SearchingState.Searching - ? Center(child: CircularProgressIndicator()) - : Container( - margin: EdgeInsets.all(12), - child: Column( - children: [ - SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: () async { - print(selectedPlace); - AddNewAddressRequestModel - addNewAddressRequestModel = - new AddNewAddressRequestModel( - customer: Customer(addresses: [ - Addresses( - address1: - selectedPlace.formattedAddress, - address2: selectedPlace - .formattedAddress, - customerAttributes: "", - city: "", - createdOnUtc: "", - id: 0, - latLong: "$latitude,$longitude", - email: "") - ]), - ); + isShowDecPage: false, + isShowAppBar: true, + baseViewModel: model, + body: PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + onPlacePicked: (PickResult result) { + print(result.adrAddress); + }, + selectedPlaceWidgetBuilder: + (_, selectedPlace, state, isSearchBarFocused) { + print( + "state: $state, isSearchBarFocused: $isSearchBarFocused"); + return isSearchBarFocused + ? Container() + : FloatingCard( + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(12.0), + child: state == SearchingState.Searching + ? Center(child: CircularProgressIndicator()) + : Container( + margin: EdgeInsets.all(12), + child: Column( + children: [ + SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () async { + print(selectedPlace); + AddNewAddressRequestModel + addNewAddressRequestModel = + new AddNewAddressRequestModel( + customer: Customer(addresses: [ + Addresses( + address1: selectedPlace + .formattedAddress, + address2: selectedPlace + .formattedAddress, + customerAttributes: "", + city: "", + createdOnUtc: "", + id: 0, + latLong: + "$latitude,$longitude", + email: "") + ]), + ); - selectedPlace.addressComponents.forEach((e) { - if (e.types.contains("country")) { - addNewAddressRequestModel.customer - .addresses[0].country = e.longName; - } - if (e.types.contains("postal_code")) { - addNewAddressRequestModel.customer - .addresses[0].zipPostalCode = - e.longName; - } - if (e.types.contains("locality")) { - addNewAddressRequestModel.customer - .addresses[0].city = - e.longName; - } - }); + selectedPlace.addressComponents + .forEach((e) { + if (e.types.contains("country")) { + addNewAddressRequestModel + .customer + .addresses[0] + .country = e.longName; + } + if (e.types + .contains("postal_code")) { + addNewAddressRequestModel + .customer + .addresses[0] + .zipPostalCode = e.longName; + } + if (e.types.contains("locality")) { + addNewAddressRequestModel + .customer + .addresses[0] + .city = e.longName; + } + }); - await model.addAddressInfo( - addNewAddressRequestModel: addNewAddressRequestModel); - if (model.state == ViewState.ErrorLocal) { - Utils.showErrorToast(model.error); - } else { - AppToast.showSuccessToast( - message: "Address Added Successfully"); - } - Navigator.of(context).pop(); - }, - label: TranslationBase.of(context).addNewAddress, - ), - ], - ), - ), - ); - }, - initialPosition: LatLng(latitude, longitude), - useCurrentLocation: false, - ), - )); + await model.addAddressInfo( + addNewAddressRequestModel: + addNewAddressRequestModel); + if (model.state == + ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast( + message: + "Address Added Successfully"); + } + Navigator.of(context).pop(); + }, + label: TranslationBase.of(context) + .addNewAddress, + ), + ], + ), + ), + ); + }, + initialPosition: LatLng(latitude, longitude), + useCurrentLocation: false, + ), + )); } } diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart index 2a7696b7..f314a9bf 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -26,12 +26,10 @@ class NewCMCPage extends StatefulWidget { final CMCViewModel model; @override - _NewCMCPageState createState() => - _NewCMCPageState(); + _NewCMCPageState createState() => _NewCMCPageState(); } -class _NewCMCPageState extends State - with TickerProviderStateMixin { +class _NewCMCPageState extends State with TickerProviderStateMixin { PageController _controller; int _currentIndex = 1; @@ -49,7 +47,8 @@ class _NewCMCPageState extends State price: widget.model.cmcAllServicesList[0].price, serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(), selectedServiceName: widget.model.cmcAllServicesList[0].description, - selectedServiceNameAR: widget.model.cmcAllServicesList[0].descriptionN, + selectedServiceNameAR: + widget.model.cmcAllServicesList[0].descriptionN, recordID: 1, totalPrice: widget.model.cmcAllServicesList[0].totalPrice, vAT: widget.model.cmcAllServicesList[0].vAT); @@ -98,20 +97,24 @@ class _NewCMCPageState extends State model: model, onTap: () async { UpdatePresOrderRequestModel updatePresOrderRequestModel = - UpdatePresOrderRequestModel( - presOrderID: order.presOrderID, - rejectionReason: "", - presOrderStatus: 4, editedBy: 3); + UpdatePresOrderRequestModel( + presOrderID: order.presOrderID, + rejectionReason: "", + presOrderStatus: 4, + editedBy: 3); await model.updateCmcPresOrder(updatePresOrderRequestModel); if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); } else { - AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully ); + AppToast.showSuccessToast( + message: + TranslationBase.of(context).processDoneSuccessfully); await model.getCmcAllPresOrders(); } }, )); } + return Scaffold( body: SafeArea( child: SingleChildScrollView( @@ -142,212 +145,255 @@ class _NewCMCPageState extends State children: [ widget.model.cmcAllOrderDetail.length != 0 ? FractionallySizedBox( - widthFactor: 0.9, - child: SingleChildScrollView( - child: Column( - children: [ - Container( - width: double.infinity, - margin: EdgeInsets.only(top: 15), - decoration: BoxDecoration( - border: - Border.all(color: Colors.grey, width: 1), - borderRadius: BorderRadius.circular(12), - color: Colors.white), + widthFactor: 0.9, + child: SingleChildScrollView( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 12, - ), Container( width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), + margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), - ), - // borderRadius: BorderRadius.circular(12), - color: Colors.white), + border: Border.all( + color: Colors.grey, width: 1), + borderRadius: + BorderRadius.circular(12), + color: + Theme.of(context).primaryColor), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - Texts( - TranslationBase - .of(context) - .requestID, - bold: false, - fontSize: 13, - ), SizedBox( - height: 4, + height: 12, ), - Texts( - widget.model.cmcAllOrderDetail[0].iD.toString(), - fontSize: 22, - ), - ], - ), - ), - Container( - width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, + Container( + width: double.infinity, + padding: EdgeInsets.only( + left: 15, + bottom: 15, + top: 15, + right: 15), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Colors.grey, + width: 1.0, + ), + ), + // borderRadius: BorderRadius.circular(12), + color: Theme.of(context) + .primaryColor), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context) + .requestID, + bold: false, + fontSize: 13, + ), + SizedBox( + height: 4, + ), + Texts( + widget.model + .cmcAllOrderDetail[0].iD + .toString(), + fontSize: 22, + ), + ], ), ), - // borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase - .of(context) - .OrderStatus, - bold: false, - fontSize: 13, - ), - SizedBox( - height: 4, - ), - Texts( - - projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0] - .descriptionN : widget.model.cmcAllOrderDetail[0].description, - fontSize: 22, + Container( + width: double.infinity, + padding: EdgeInsets.only( + left: 15, + bottom: 15, + top: 15, + right: 15), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Colors.grey, + width: 1.0, + ), + ), + // borderRadius: BorderRadius.circular(12), + color: Theme.of(context) + .primaryColor), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context) + .OrderStatus, + bold: false, + fontSize: 13, + ), + SizedBox( + height: 4, + ), + Texts( + projectViewModel.isArabic + ? widget + .model + .cmcAllOrderDetail[0] + .descriptionN + : widget + .model + .cmcAllOrderDetail[0] + .description, + fontSize: 22, + ), + ], + ), ), - ], - ), - ), - Container( - width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, + Container( + width: double.infinity, + padding: EdgeInsets.only( + left: 15, + bottom: 15, + top: 15, + right: 15), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Colors.grey, + width: 1.0, + ), + ), + // borderRadius: BorderRadius.circular(12), + color: Theme.of(context) + .primaryColor), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context) + .pickupDate, + bold: false, + fontSize: 13, + ), + SizedBox( + height: 4, + ), + Texts( + DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate( + widget + .model + .cmcAllOrderDetail[ + 0] + .createdOn)), + fontSize: 22, + ), + ], ), ), - // borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).pickupDate, - bold: false, - fontSize: 13, + Container( + width: double.infinity, + padding: EdgeInsets.only( + left: 15, bottom: 15, top: 15), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Colors.grey, + width: 1.0, + ), + ), + // borderRadius: BorderRadius.circular(12), + color: Theme.of(context) + .primaryColor), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context) + .serviceName, + bold: false, + fontSize: 13, + ), + SizedBox( + height: 4, + ), + Texts( + !projectViewModel.isArabic + ? widget + .model + .cmcAllOrderDetail[0] + .description + .toString() + : widget + .model + .cmcAllOrderDetail[0] + .descriptionN + .toString(), + fontSize: 22, + ), + ], + ), ), SizedBox( - height: 4, + height: 12, ), - Texts( - DateUtil.getDayMonthYearDateFormatted( - DateUtil.convertStringToDate(widget.model.cmcAllOrderDetail[0].createdOn)), - fontSize: 22, - ), - ], - ), - ), - Container( - width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, + Center( + child: Container( + width: MediaQuery.of(context) + .size + .width * + 0.85, + child: SecondaryButton( + label: TranslationBase.of( + context) + .cancel + .toUpperCase(), + onTap: () { + showConfirmMessage( + widget.model, + widget.model + .cmcAllOrderDetail[0]); + }, + color: Colors.red[800], + disabled: false, + textColor: Theme.of(context) + .backgroundColor), ), ), - // borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).serviceName, - bold: false, - fontSize: 13, - ), SizedBox( - height: 4, - ), - Texts( - !projectViewModel.isArabic?widget.model.cmcAllOrderDetail[0].description - .toString() : - widget.model.cmcAllOrderDetail[0] - .descriptionN - .toString(), - fontSize: 22, + height: 22, ), ], ), ), - SizedBox( - height: 12, - ), - Center( - child: Container( - width: MediaQuery - .of(context) - .size - .width * - 0.85, - child: SecondaryButton( - label: TranslationBase.of(context).cancel.toUpperCase(), - onTap: () { - showConfirmMessage(widget.model, - widget.model.cmcAllOrderDetail[0]); - } - , - color: Colors.red[800], - disabled: false, - textColor: Theme - .of(context) - .backgroundColor), - ), - ), SizedBox( height: 22, ), ], ), ), - SizedBox( - height: 22, - ), - ], - ), - ), - ) + ) : NewCMCStepOnePage( - changePageViewIndex: changePageViewIndex, - cMCInsertPresOrderRequestModel: - cMCInsertPresOrderRequestModel, - model: widget.model, - ), + changePageViewIndex: changePageViewIndex, + cMCInsertPresOrderRequestModel: + cMCInsertPresOrderRequestModel, + model: widget.model, + ), NewCMCStepTowPage( longitude: _longitude, latitude: _latitude, changePageViewIndex: changePageViewIndex, - cmcInsertPresOrderRequestModel: cMCInsertPresOrderRequestModel, + cmcInsertPresOrderRequestModel: + cMCInsertPresOrderRequestModel, model: widget.model, - ), NewCMCStepThreePage( + ), + NewCMCStepThreePage( changePageViewIndex: changePageViewIndex, - cmcInsertPresOrderRequestModel: cMCInsertPresOrderRequestModel, + cmcInsertPresOrderRequestModel: + cMCInsertPresOrderRequestModel, model: widget.model, ), ], diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart index b80d125a..c07b8345 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -62,14 +62,14 @@ class _NewCMCStepOnePageState extends State { ), Column( children: - widget.model.cmcAllServicesList.map((service) { + widget.model.cmcAllServicesList.map((service) { return Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( border: - Border.all(color: Colors.grey, width: 1), + Border.all(color: Colors.grey, width: 1), borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Column( children: [ Row( @@ -79,53 +79,52 @@ class _NewCMCStepOnePageState extends State { activeColor: Colors.red[800], onChanged: (newValue) async { PatientERCMCInsertServicesList - patientERCMCInsertServicesList = - new PatientERCMCInsertServicesList( - price: service.price, - serviceID: service.serviceID - .toString(), - selectedServiceName: - service.description, - selectedServiceNameAR: - service.descriptionN, - recordID: 1, - totalPrice: - service.totalPrice, - vAT: service.vAT); + patientERCMCInsertServicesList = + new PatientERCMCInsertServicesList( + price: service.price, + serviceID: service.serviceID + .toString(), + selectedServiceName: + service.description, + selectedServiceNameAR: + service.descriptionN, + recordID: 1, + totalPrice: + service.totalPrice, + vAT: service.vAT); setState(() { widget .cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList = - [ + .patientERCMCInsertServicesList = [ patientERCMCInsertServicesList ]; }); CMCGetItemsRequestModel - cMCGetItemsRequestModel = - new CMCGetItemsRequestModel( - checkupType: newValue); + cMCGetItemsRequestModel = + new CMCGetItemsRequestModel( + checkupType: newValue); await widget.model.getCheckupItems( cMCGetItemsRequestModel: - cMCGetItemsRequestModel); + cMCGetItemsRequestModel); }, groupValue: widget - .cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList - .length > - 0 + .cMCInsertPresOrderRequestModel + .patientERCMCInsertServicesList + .length > + 0 ? int.parse(widget - .cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList[ - 0] - .serviceID) + .cMCInsertPresOrderRequestModel + .patientERCMCInsertServicesList[ + 0] + .serviceID) : 1), Expanded( child: Padding( padding: const EdgeInsets.all(20.0), child: Texts( - projectViewModel.isArabic ? service - .descriptionN : service - .description, + projectViewModel.isArabic + ? service.descriptionN + : service.description, fontSize: 15, ), ), @@ -144,14 +143,18 @@ class _NewCMCStepOnePageState extends State { height: 30, ), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, width: double.infinity, child: Column( children: [ Row( children: [ - Container(margin: EdgeInsets.only( - right: 10, left: 10), child: Texts(TranslationBase.of(context).coveredService, fontWeight: FontWeight.bold,)) + Container( + margin: EdgeInsets.only(right: 10, left: 10), + child: Texts( + TranslationBase.of(context).coveredService, + fontWeight: FontWeight.bold, + )) ], ), Column( @@ -163,10 +166,10 @@ class _NewCMCStepOnePageState extends State { child: Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( - color: Colors.white), + color: Theme.of(context).primaryColor), child: Column( - crossAxisAlignment: CrossAxisAlignment - .start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ SizedBox( height: 12, @@ -182,17 +185,18 @@ class _NewCMCStepOnePageState extends State { width: 0.5, color: Colors.grey)), //borderRadius: , - color: Colors.white), + color: + Theme.of(context).primaryColor), child: Column( crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ - Container(margin: EdgeInsets.only( - right: 10, left: 10), - child: Texts( - item.itemName, - fontSize: 15, fontWeight: FontWeight.bold - ), + Container( + margin: EdgeInsets.only( + right: 10, left: 10), + child: Texts(item.itemName, + fontSize: 15, + fontWeight: FontWeight.bold), ), ], ), @@ -222,37 +226,34 @@ class _NewCMCStepOnePageState extends State { Container( width: MediaQuery.of(context).size.width * 0.9, child: SecondaryButton( - label: TranslationBase - .of(context) - .next, - textColor: Theme - .of(context) - .backgroundColor, + label: TranslationBase.of(context).next, + textColor: Theme.of(context).backgroundColor, color: Colors.grey[800], onTap: () async { if (widget.cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList.length != - 0 || + .patientERCMCInsertServicesList.length != + 0 || widget.cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList == + .patientERCMCInsertServicesList == null) { int index = widget.model.cmcAllServicesList.length; PatientERCMCInsertServicesList - patientERCMCInsertServicesList = - new PatientERCMCInsertServicesList( - price: widget - .model.cmcAllServicesList[index - 1].price, - serviceID: widget - .model.cmcAllServicesList[index - 1].serviceID - .toString(), - selectedServiceName: widget.model - .cmcAllServicesList[index - 1].description, - selectedServiceNameAR: widget.model - .cmcAllServicesList[index - 1].descriptionN, - recordID: 1, - totalPrice: widget - .model.cmcAllServicesList[index - 1].totalPrice, - vAT: widget.model.cmcAllServicesList[index - 1].vAT); + patientERCMCInsertServicesList = + new PatientERCMCInsertServicesList( + price: widget + .model.cmcAllServicesList[index - 1].price, + serviceID: widget + .model.cmcAllServicesList[index - 1].serviceID + .toString(), + selectedServiceName: widget.model + .cmcAllServicesList[index - 1].description, + selectedServiceNameAR: widget.model + .cmcAllServicesList[index - 1].descriptionN, + recordID: 1, + totalPrice: widget + .model.cmcAllServicesList[index - 1].totalPrice, + vAT: + widget.model.cmcAllServicesList[index - 1].vAT); widget.cMCInsertPresOrderRequestModel .patientERCMCInsertServicesList = [ diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart index eea9853b..75699a5c 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -22,15 +22,13 @@ class NewCMCStepThreePage extends StatefulWidget { {Key key, this.changePageViewIndex, this.model, - this.cmcInsertPresOrderRequestModel}); + this.cmcInsertPresOrderRequestModel}); @override - _NewCMCStepThreePageState createState() => - _NewCMCStepThreePageState(); + _NewCMCStepThreePageState createState() => _NewCMCStepThreePageState(); } -class _NewCMCStepThreePageState - extends State { +class _NewCMCStepThreePageState extends State { Completer _controller = Completer(); static CameraPosition _kGooglePlex = CameraPosition( @@ -49,8 +47,7 @@ class _NewCMCStepThreePageState widget.cmcInsertPresOrderRequestModel.latitude.hashCode .toString(), ), - position: LatLng( - widget.cmcInsertPresOrderRequestModel.latitude, + position: LatLng(widget.cmcInsertPresOrderRequestModel.latitude, widget.cmcInsertPresOrderRequestModel.longitude)), ); _kGooglePlex = CameraPosition( @@ -86,15 +83,16 @@ class _NewCMCStepThreePageState ), Container( decoration: BoxDecoration( - color: Colors.white, + color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular(12)), padding: EdgeInsets.all(8), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts(TranslationBase - .of(context) - .orderLocation + " : ", fontWeight: FontWeight.bold,), + Texts( + TranslationBase.of(context).orderLocation + " : ", + fontWeight: FontWeight.bold, + ), SizedBox( height: 12, ), @@ -115,40 +113,38 @@ class _NewCMCStepThreePageState SizedBox( height: 12, ), - Texts(TranslationBase - .of(context) - .selectedService), + Texts(TranslationBase.of(context).selectedService), ...List.generate( widget.cmcInsertPresOrderRequestModel .patientERCMCInsertServicesList.length, - (index) => - Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase - .of(context) - .serviceName, - fontSize: 12, fontWeight: FontWeight.bold, - ), - SizedBox( - height: 5, - ), - Texts( - projectViewModel.isArabic ? widget + (index) => Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).serviceName, + fontSize: 12, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 5, + ), + Texts( + projectViewModel.isArabic + ? widget .cmcInsertPresOrderRequestModel .patientERCMCInsertServicesList[index] - .selectedServiceNameAR : widget + .selectedServiceNameAR + : widget .cmcInsertPresOrderRequestModel .patientERCMCInsertServicesList[index] .selectedServiceName, - fontSize: 15, - bold: true, - ), - ], + fontSize: 15, + bold: true, ), - ), + ], + ), + ), ) ], ), @@ -165,9 +161,7 @@ class _NewCMCStepThreePageState Container( width: MediaQuery.of(context).size.width * 0.9, child: SecondaryButton( - label: TranslationBase - .of(context) - .confirm, + label: TranslationBase.of(context).confirm, color: Colors.grey[800], onTap: () async { await widget.model.insertPresPresOrder( @@ -176,9 +170,7 @@ class _NewCMCStepThreePageState widget.changePageViewIndex(0); } }, - textColor: Theme - .of(context) - .backgroundColor), + textColor: Theme.of(context).backgroundColor), ), ], ), diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart index cc8ea8dd..3d969d9e 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart @@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; @@ -36,17 +37,14 @@ class NewCMCStepTowPage extends StatefulWidget { : super(key: key); @override - _NewCMCStepTowPageState createState() => - _NewCMCStepTowPageState(); + _NewCMCStepTowPageState createState() => _NewCMCStepTowPageState(); } -class _NewCMCStepTowPageState - extends State { +class _NewCMCStepTowPageState extends State { double latitude = 0; double longitude = 0; AddressInfo _selectedAddress; - @override void initState() { if (widget.cmcInsertPresOrderRequestModel.latitude == null) { @@ -60,17 +58,18 @@ class _NewCMCStepTowPageState setLatitudeAndLongitude({bool isSetState = false, String latLong}) { if (latLong == null) - latLong = widget.model.addressesList[widget.model.addressesList - .length - 1].latLong; + latLong = widget + .model.addressesList[widget.model.addressesList.length - 1].latLong; List latLongArr = latLong.split(','); latitude = double.parse(latLongArr[0]); longitude = double.parse(latLongArr[1]); } + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - return AppScaffold( + return AppScaffold( isShowDecPage: false, body: Stack( children: [ @@ -83,7 +82,6 @@ class _NewCMCStepTowPageState autocompleteLanguage: projectViewModel.currentLanguage, enableMapTypeButton: true, searchForInitialValue: false, - onPlacePicked: (PickResult result) { print(result.adrAddress); widget.changePageViewIndex(3); @@ -94,57 +92,56 @@ class _NewCMCStepTowPageState return isSearchBarFocused ? Container() : FloatingCard( - bottomPosition: 0.0, - leftPosition: 0.0, - rightPosition: 0.0, - width: 500, - borderRadius: BorderRadius.circular(12.0), - child: state == SearchingState.Searching - ? Center(child: CircularProgressIndicator()) - : Container( - margin: EdgeInsets.all(12), - child: Column( - children: [ - SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => - CMCLocationPage( - latitude: latitude, - longitude: longitude, - - ), - ), - ); - }, - label: TranslationBase.of(context).addNewAddress, - ), - SizedBox(height: 10,), - SecondaryButton( - color: Colors.red - [800], - textColor: Colors.white, - onTap: () { - setState(() { - widget.cmcInsertPresOrderRequestModel - .latitude = - selectedPlace.geometry.location.lat; - widget.cmcInsertPresOrderRequestModel - .longitude = - selectedPlace.geometry.location.lng; - }); - widget.changePageViewIndex(3); - }, - label: TranslationBase.of(context).confirm, - ), - ], - ) - ), - ); + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(12.0), + child: state == SearchingState.Searching + ? Center(child: CircularProgressIndicator()) + : Container( + margin: EdgeInsets.all(12), + child: Column( + children: [ + SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () { + Navigator.push( + context, + FadePage( + page: CMCLocationPage( + latitude: latitude, + longitude: longitude, + ), + ), + ); + }, + label: TranslationBase.of(context) + .addNewAddress, + ), + SizedBox( + height: 10, + ), + SecondaryButton( + color: Colors.red[800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.cmcInsertPresOrderRequestModel + .latitude = + selectedPlace.geometry.location.lat; + widget.cmcInsertPresOrderRequestModel + .longitude = + selectedPlace.geometry.location.lng; + }); + widget.changePageViewIndex(3); + }, + label: TranslationBase.of(context).confirm, + ), + ], + )), + ); }, initialPosition: LatLng(latitude, longitude), useCurrentLocation: false, @@ -159,37 +156,36 @@ class _NewCMCStepTowPageState // height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded(child: Texts(getAddressName(), fontSize: 14,),), + Expanded( + child: Texts( + getAddressName(), + fontSize: 14, + ), + ), Icon(Icons.arrow_drop_down) ], ), ), ), - height: 56, width: double.infinity, color: Theme - .of(context) - .scaffoldBackgroundColor, - + height: 56, + width: double.infinity, + color: Theme.of(context).scaffoldBackgroundColor, ) ], ), ); - - } - void confirmSelectLocationDialog(List addresses) { showDialog( context: context, child: SelectLocationDialog( addresses: addresses, - selectedAddress: _selectedAddress - , + selectedAddress: _selectedAddress, onValueSelected: (value) { setLatitudeAndLongitude(latLong: value.latLong); setState(() { diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart index 4f6213d5..f1d3e72f 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -17,8 +17,7 @@ class CMCPage extends StatefulWidget { _CMCPageState createState() => _CMCPageState(); } -class _CMCPageState extends State - with SingleTickerProviderStateMixin { +class _CMCPageState extends State with SingleTickerProviderStateMixin { TabController _tabController; @override @@ -36,14 +35,18 @@ class _CMCPageState extends State @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) async{ - await model.getCmcAllPresOrders(); - + onModelReady: (model) async { + await model.getCmcAllPresOrders(); }, builder: (_, model, widget) => AppScaffold( isShowAppBar: true, - description:TranslationBase.of(context).infoCMC, - imagesInfo: [ImagesInfo(imageAr: 'assets/images/Wifi-AR.png',imageEn: 'assets/images/wifi-EN.png', isAsset: true)], + description: TranslationBase.of(context).infoCMC, + imagesInfo: [ + ImagesInfo( + imageAr: 'assets/images/Wifi-AR.png', + imageEn: 'assets/images/wifi-EN.png', + isAsset: true) + ], appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, body: Scaffold( extendBodyBehindAppBar: true, @@ -58,9 +61,7 @@ class _CMCPageState extends State child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), child: Container( - color: Theme.of(context) - .scaffoldBackgroundColor - .withOpacity(0.8), + color: Theme.of(context).primaryColor.withOpacity(0.8), height: 70.0, ), ), @@ -76,7 +77,7 @@ class _CMCPageState extends State color: Theme.of(context).dividerColor, width: 0.7), ), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Center( child: TabBar( isScrollable: true, @@ -86,7 +87,7 @@ class _CMCPageState extends State indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( @@ -99,7 +100,8 @@ class _CMCPageState extends State Container( width: MediaQuery.of(context).size.width * 0.37, child: Center( - child: Texts(TranslationBase.of(context).orderLog), + child: + Texts(TranslationBase.of(context).orderLog), ), ), ], diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart index 4bf3a762..c9e4262f 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -49,6 +49,7 @@ class _LocationPageState return BaseView( onModelReady: (model) {}, builder: (_, model, widget) => AppScaffold( + appBarTitle: TranslationBase.of(context).addAddress, isShowDecPage: false, isShowAppBar: true, baseViewModel: model, diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index 447ba177..86ee791b 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -31,19 +31,20 @@ class NewHomeHealthCareStepOnePage extends StatefulWidget { _NewHomeHealthCareStepOnePageState(); } -class _NewHomeHealthCareStepOnePageState extends State { - +class _NewHomeHealthCareStepOnePageState + extends State { PickResult _result; - @override void initState() { - if (widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList == null) - widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList = []; + if (widget.patientERInsertPresOrderRequestModel + .patientERHHCInsertServicesList == + null) + widget.patientERInsertPresOrderRequestModel + .patientERHHCInsertServicesList = []; super.initState(); } - @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -67,9 +68,7 @@ class _NewHomeHealthCareStepOnePageState extends State + FadePage( + page: LocationPage( latitude: latitude, longitude: longitude, diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart index d9bf67d8..ab564cb7 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart @@ -45,15 +45,15 @@ class _NewHomeHealthCarePageState extends State _getCurrentLocation(); } - _getCurrentLocation() async { - await getLastKnownPosition().then((value) { - _latitude = value.latitude; - _longitude = value.longitude; - }).catchError((e) { - _longitude = 0; - _latitude = 0; - }); - } + _getCurrentLocation() async { + await getLastKnownPosition().then((value) { + _latitude = value.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + } @override void dispose() { @@ -87,7 +87,9 @@ class _NewHomeHealthCarePageState extends State if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); } else { - AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully ); + AppToast.showSuccessToast( + message: + TranslationBase.of(context).processDoneSuccessfully); await model.getHHCAllPresOrders(); // await model.getHHCAllServices(); } @@ -105,7 +107,9 @@ class _NewHomeHealthCarePageState extends State child: Column( children: [ Container( - margin: EdgeInsets.only(left: MediaQuery.of(context).size.width*0.05, right: MediaQuery.of(context).size.width*0.05), + margin: EdgeInsets.only( + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), child: StepsWidget( index: _currentIndex, changeCurrentTab: _changeCurrentTab, @@ -130,11 +134,13 @@ class _NewHomeHealthCarePageState extends State width: double.infinity, margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( - border: Border.all(color: Colors.grey, width: 1), + border: Border.all( + color: Colors.grey, width: 1), borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ SizedBox( height: 12, @@ -142,7 +148,10 @@ class _NewHomeHealthCarePageState extends State Container( width: double.infinity, padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), + left: 15, + bottom: 15, + top: 15, + right: 15), decoration: BoxDecoration( border: Border( bottom: BorderSide( @@ -151,13 +160,14 @@ class _NewHomeHealthCarePageState extends State ), ), // borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: + Theme.of(context).primaryColor), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Texts( - TranslationBase - .of(context) + TranslationBase.of(context) .requestID, bold: false, fontSize: 13, @@ -166,7 +176,8 @@ class _NewHomeHealthCarePageState extends State height: 4, ), Texts( - widget.model.pendingOrder.iD.toString(), + widget.model.pendingOrder.iD + .toString(), fontSize: 22, ), ], @@ -175,7 +186,10 @@ class _NewHomeHealthCarePageState extends State Container( width: double.infinity, padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), + left: 15, + bottom: 15, + top: 15, + right: 15), decoration: BoxDecoration( border: Border( bottom: BorderSide( @@ -184,13 +198,14 @@ class _NewHomeHealthCarePageState extends State ), ), // borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: + Theme.of(context).primaryColor), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Texts( - TranslationBase - .of(context) + TranslationBase.of(context) .OrderStatus, bold: false, fontSize: 13, @@ -199,11 +214,11 @@ class _NewHomeHealthCarePageState extends State height: 4, ), Texts( - - projectViewModel.isArabic ? widget - .model.pendingOrder - .descriptionN : widget.model - .pendingOrder.description, + projectViewModel.isArabic + ? widget.model.pendingOrder + .descriptionN + : widget.model.pendingOrder + .description, fontSize: 22, ), ], @@ -212,7 +227,10 @@ class _NewHomeHealthCarePageState extends State Container( width: double.infinity, padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), + left: 15, + bottom: 15, + top: 15, + right: 15), decoration: BoxDecoration( border: Border( bottom: BorderSide( @@ -221,12 +239,15 @@ class _NewHomeHealthCarePageState extends State ), ), // borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: + Theme.of(context).primaryColor), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Texts( - TranslationBase.of(context).pickupDate, + TranslationBase.of(context) + .pickupDate, bold: false, fontSize: 13, ), @@ -234,9 +255,14 @@ class _NewHomeHealthCarePageState extends State height: 4, ), Texts( - DateUtil.getDayMonthYearDateFormatted( - DateUtil.convertStringToDate(widget - .model.pendingOrder.createdOn)), + DateUtil + .getDayMonthYearDateFormatted( + DateUtil + .convertStringToDate( + widget + .model + .pendingOrder + .createdOn)), fontSize: 22, ), ], @@ -247,7 +273,10 @@ class _NewHomeHealthCarePageState extends State (index) => Container( width: double.infinity, padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), + left: 15, + bottom: 15, + top: 15, + right: 15), decoration: BoxDecoration( border: Border( bottom: BorderSide( @@ -256,14 +285,14 @@ class _NewHomeHealthCarePageState extends State ), ), // borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context) + .primaryColor), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - TranslationBase - .of(context) + TranslationBase.of(context) .serviceName, bold: false, fontSize: 13, @@ -273,12 +302,16 @@ class _NewHomeHealthCarePageState extends State ), Texts( projectViewModel.isArabic - ? widget.model - .hhcAllOrderDetail[index] - .descriptionN - : widget.model - .hhcAllOrderDetail[index] - .description, + ? widget + .model + .hhcAllOrderDetail[ + index] + .descriptionN + : widget + .model + .hhcAllOrderDetail[ + index] + .description, fontSize: 22, bold: true, ), @@ -291,18 +324,24 @@ class _NewHomeHealthCarePageState extends State ), Center( child: Container( - width: - MediaQuery.of(context).size.width * 0.85, + width: MediaQuery.of(context) + .size + .width * + 0.85, child: SecondaryButton( - label: TranslationBase.of(context).cancel.toUpperCase(), + label: TranslationBase.of(context) + .cancel + .toUpperCase(), onTap: () { - showConfirmMessage(widget.model, - widget.model.hhcAllOrderDetail[0]); + showConfirmMessage( + widget.model, + widget.model + .hhcAllOrderDetail[0]); }, color: Colors.red[800], disabled: false, - textColor: - Theme.of(context).backgroundColor), + textColor: Theme.of(context) + .backgroundColor), ), ), SizedBox( @@ -315,22 +354,24 @@ class _NewHomeHealthCarePageState extends State ) : NewHomeHealthCareStepOnePage( changePageViewIndex: _changeCurrentTab, - patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel, + patientERInsertPresOrderRequestModel: + patientERInsertPresOrderRequestModel, model: widget.model, ), NewHomeHealthCareStepTowPage( latitude: _latitude, longitude: _longitude, changePageViewIndex: _changeCurrentTab, - patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel, + patientERInsertPresOrderRequestModel: + patientERInsertPresOrderRequestModel, model: widget.model, ), NewHomeHealthCareStepThreePage( changePageViewIndex: _changeCurrentTab, - patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel, + patientERInsertPresOrderRequestModel: + patientERInsertPresOrderRequestModel, model: widget.model, ) - ], ), ), diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart index 1c10e594..b39c918f 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart @@ -37,15 +37,19 @@ class _HomeHealthCarePageState extends State @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model){ + onModelReady: (model) { model.getHHCAllPresOrders(); }, builder: (_, model, widget) => AppScaffold( isShowAppBar: true, description: TranslationBase.of(context).HHCNotAuthMsg, appBarTitle: TranslationBase.of(context).homeHealthCare, - imagesInfo: [ImagesInfo(imageAr: 'assets/images/Wifi-AR.png',imageEn: 'assets/images/wifi-EN.png', isAsset: true)], - + imagesInfo: [ + ImagesInfo( + imageAr: 'assets/images/Wifi-AR.png', + imageEn: 'assets/images/wifi-EN.png', + isAsset: true) + ], body: Scaffold( extendBodyBehindAppBar: true, appBar: PreferredSize( @@ -77,7 +81,7 @@ class _HomeHealthCarePageState extends State color: Theme.of(context).dividerColor, width: 0.7), ), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Center( child: TabBar( isScrollable: true, @@ -87,19 +91,25 @@ class _HomeHealthCarePageState extends State indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( width: MediaQuery.of(context).size.width * 0.37, child: Center( - child: Texts(TranslationBase.of(context).homeHealthCare), + child: Texts( + TranslationBase.of(context).homeHealthCare, + color: Colors.black, + ), ), ), Container( width: MediaQuery.of(context).size.width * 0.37, child: Center( - child: Texts(TranslationBase.of(context).orderLog), + child: Texts( + TranslationBase.of(context).orderLog, + color: Colors.black, + ), ), ), ], diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index d81fe78f..877f9fb7 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_index_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart'; @@ -58,8 +59,12 @@ class _AllHabibMedicalServiceState extends State { @override void initState() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); - WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))}); + locationUtils = + new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => { + Geolocator.getLastKnownPosition() + .then((value) => setLocation(value)) + }); }); super.initState(); } @@ -98,12 +103,14 @@ class _AllHabibMedicalServiceState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - TranslationBase.of(context).healthWeatherIndicators, + TranslationBase.of(context) + .healthWeatherIndicators, color: Colors.white, fontWeight: FontWeight.w600, ), Texts( - TranslationBase.of(context).healthTipsBasedOnCurrentWeather, + TranslationBase.of(context) + .healthTipsBasedOnCurrentWeather, color: Colors.white, fontSize: 14, ), @@ -131,7 +138,11 @@ class _AllHabibMedicalServiceState extends State { width: 60, height: 60, ), - Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white)) + Directionality( + textDirection: TextDirection.ltr, + child: AppText(weather, + fontSize: 22, + color: Colors.white)) ], ), Texts( @@ -151,7 +162,8 @@ class _AllHabibMedicalServiceState extends State { Navigator.pop(context); widget.goToMyProfile(); }, - imageLocation: 'assets/images/new-design/my_file_bottom_bar.png', + imageLocation: + 'assets/images/new-design/my_file_bottom_bar.png', title: TranslationBase.of(context).myMedicalFile, ), ServicesContainer( @@ -173,7 +185,8 @@ class _AllHabibMedicalServiceState extends State { ), ), ), - imageLocation: 'assets/images/new-design/booking_icon_active.png', + imageLocation: + 'assets/images/new-design/booking_icon_active.png', title: TranslationBase.of(context).bookAppo, ), ServicesContainer( @@ -183,15 +196,28 @@ class _AllHabibMedicalServiceState extends State { page: PaymentService(), ), ), - imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', + imageLocation: + 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).onlinePaymentService, ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: AnicllaryOrders(), + ), + ), + imageLocation: + 'assets/images/comprehensive_medical_checkup_logo.png', + title: TranslationBase.of(context).anicllaryOrders, + ), ServicesContainer( onTap: () => Navigator.push( context, FadePage(), ), - imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', + imageLocation: + 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).covid19_driveThrueTest, ), ServicesContainer( @@ -224,13 +250,17 @@ class _AllHabibMedicalServiceState extends State { page: InsuranceUpdate(), ), ), - imageLocation: 'assets/images/medical/insurance_card_icon.png', + imageLocation: + 'assets/images/medical/insurance_card_icon.png', title: TranslationBase.of(context).updateInsurance, ), ServicesContainer( onTap: () => Navigator.push( context, - FadePage(page: authUser.patientID == null ? EReferralIndexPage() : EReferralPage()), + FadePage( + page: authUser.patientID == null + ? EReferralIndexPage() + : EReferralPage()), ), imageLocation: 'assets/images/ereferral_service_icon.png', title: TranslationBase.of(context).ereferral, @@ -242,7 +272,8 @@ class _AllHabibMedicalServiceState extends State { page: MyFamily(), ), ), - imageLocation: 'assets/images/new-design/family_menu_icon_red.png', + imageLocation: + 'assets/images/new-design/family_menu_icon_red.png', title: TranslationBase.of(context).myFamily, ), if (projectViewModel.havePrivilege(35)) @@ -251,7 +282,8 @@ class _AllHabibMedicalServiceState extends State { context, FadePage(page: ChildVaccinesPage()), ), - imageLocation: 'assets/images/new-design/children_vaccines_icon.png', + imageLocation: + 'assets/images/new-design/children_vaccines_icon.png', title: TranslationBase.of(context).childVaccine, ), ServicesContainer( @@ -261,7 +293,8 @@ class _AllHabibMedicalServiceState extends State { page: ToDo(isShowAppBar: true), ), ), - imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png', + imageLocation: + 'assets/images/new-design/upcoming_icon_bottom_bar.png', title: TranslationBase.of(context).todoList, ), if (projectViewModel.havePrivilege(42)) @@ -288,7 +321,8 @@ class _AllHabibMedicalServiceState extends State { page: (HealthCalculators()), ), ), - imageLocation: 'assets/images/new-design/health_calculator_icon.png', + imageLocation: + 'assets/images/new-design/health_calculator_icon.png', title: TranslationBase.of(context).calculators, ), ServicesContainer( @@ -298,12 +332,14 @@ class _AllHabibMedicalServiceState extends State { page: HealthConverter(), ), ), - imageLocation: 'assets/images/new-design/health_convertor_icon.png', + imageLocation: + 'assets/images/new-design/health_convertor_icon.png', title: TranslationBase.of(context).converters, ), if (projectViewModel.havePrivilege(38)) ServicesContainer( - onTap: () => Navigator.push(context, FadePage(page: H2OPage())), + onTap: () => + Navigator.push(context, FadePage(page: H2OPage())), // Navigator.push( // context, // FadePage( @@ -319,7 +355,8 @@ class _AllHabibMedicalServiceState extends State { context, FadePage(), ), - imageLocation: 'assets/images/new-design/smartwatch_icon.png', + imageLocation: + 'assets/images/new-design/smartwatch_icon.png', title: TranslationBase.of(context).smartWatches, ), ServicesContainer( @@ -329,12 +366,15 @@ class _AllHabibMedicalServiceState extends State { page: ParkingPage(), ), ), - imageLocation: 'assets/images/new-design/parking_system_icon.png', + imageLocation: + 'assets/images/new-design/parking_system_icon.png', title: TranslationBase.of(context).parking, ), ServicesContainer( - onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"), - imageLocation: 'assets/images/new-design/virtual_tour_icon.png', + onTap: () => launch( + "https://hmgwebservices.com/vt_mobile/html/index.html"), + imageLocation: + 'assets/images/new-design/virtual_tour_icon.png', title: TranslationBase.of(context).vTour, ), ServicesContainer( @@ -342,10 +382,12 @@ class _AllHabibMedicalServiceState extends State { Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => MyWebView( title: "HMG News", - selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + selectedUrl: + "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", ))); }, - imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png', + imageLocation: + 'assets/images/new-design/twitter_dashboard_icon.png', title: TranslationBase.of(context).latestNews, ), ServicesContainer( @@ -368,7 +410,8 @@ class _AllHabibMedicalServiceState extends State { getAuthUser() async { if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson( + await this.sharedPref.getObject(USER_PROFILE)); setState(() { authUser = data; }); @@ -382,7 +425,8 @@ class _AllHabibMedicalServiceState extends State { }); } else { setState(() { - weather = data != null ? data['Temperature'].toString() + '\u2103' : '--'; + weather = + data != null ? data['Temperature'].toString() + '\u2103' : '--'; }); } } diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart new file mode 100644 index 00000000..eccc1309 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart @@ -0,0 +1,177 @@ +import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class AnicllaryOrders extends StatefulWidget { + @override + _AnicllaryOrdersState createState() => _AnicllaryOrdersState(); +} + +class _AnicllaryOrdersState extends State + with SingleTickerProviderStateMixin { + TabController _tabController; + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getOrders(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).anicllaryOrders, + body: SingleChildScrollView( + padding: EdgeInsets.all(12), + child: model.ancillaryLists.length > 0 + ? Column(children: [ + getPatientInfo(model), + getAncillaryOrdersList(model) + ]) + : SizedBox()))); + } + + Widget getPatientInfo(AnciallryOrdersViewModel model) { + print(model.ancillaryLists); + return Padding( + child: Column( + children: [ + Row( + children: [ + Texts( + TranslationBase.of(context).mrn, + fontWeight: FontWeight.bold, + fontSize: 22, + ), + Texts( + " : ", + fontSize: 20, + ), + Texts( + model.ancillaryLists[0].patientID.toString(), + ) + ], + ), + Row( + children: [ + Texts( + TranslationBase.of(context).patientName, + fontWeight: FontWeight.bold, + fontSize: 20, + ), + Texts( + " : ", + fontSize: 20, + ), + Texts( + model.ancillaryLists[0].patientName, + ) + ], + ), + Divider() + ], + ), + padding: EdgeInsets.only(top: 5.0, bottom: 10.0), + ); + } + + Widget getAncillaryOrdersList(AnciallryOrdersViewModel model) { + return Column( + children: model.ancillaryLists[0].ancillaryOrderList + .map( + (item) => InkWell( + onTap: () { + ancillaryOrdersDetails(item); + }, + child: Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + width: 0.5, + ))), + padding: EdgeInsets.all(15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.all(3), + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context) + .appointmentNo + + ' : ', + fontWeight: FontWeight.bold, + ), + Texts(item.appointmentNo.toString()) + ], + )), + Padding( + padding: EdgeInsets.all(3), + child: Row( + children: [ + Texts( + TranslationBase.of(context) + .appointmentDate + + ' : ', + fontWeight: FontWeight.bold), + Texts(DateUtil.getFormattedDate( + DateUtil.convertStringToDate( + item.appointmentDate), + "MMM dd,yyyy")) + ], + )), + Padding( + padding: EdgeInsets.all(3), + child: Row( + children: [ + Texts( + TranslationBase.of(context) + .doctorName + + ' : ', + fontWeight: FontWeight.bold), + Texts(item.doctorName.toString()) + ], + )), + Divider( + color: Colors.black12, + height: 1, + ) + ]), + Icon( + Icons.arrow_right, + size: 25, + ) + ]))), + ) + .toList()); + } + + ancillaryOrdersDetails(item) { + Navigator.push( + context, + FadePage( + page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart new file mode 100644 index 00000000..dc0d73d4 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -0,0 +1,246 @@ +import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; + +class AnicllaryOrdersDetails extends StatefulWidget { + final dynamic appoNo; + final dynamic orderNo; + AnicllaryOrdersDetails(this.appoNo, this.orderNo); + @override + _AnicllaryOrdersState createState() => _AnicllaryOrdersState(); +} + +class _AnicllaryOrdersState extends State + with SingleTickerProviderStateMixin { + void initState() { + super.initState(); + } + + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => + model.getOrdersDetails(widget.appoNo, widget.orderNo), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).anicllaryOrders, + body: SingleChildScrollView( + padding: EdgeInsets.all(12), + child: model.ancillaryListsDetails.length > 0 + ? Column(children: [ + getPatientInfo(model), + getInvoiceDetails(model), + getInsuranceDetails(model), + getAncillaryDetails(model) + ]) + : SizedBox()))); + } + + Widget getPatientInfo(AnciallryOrdersViewModel model) { + print(model.ancillaryListsDetails); + return Padding( + child: Column( + children: [ + Row( + children: [ + Texts( + TranslationBase.of(context).mrn, + fontWeight: FontWeight.bold, + fontSize: 22, + ), + Texts( + " : ", + fontSize: 20, + ), + Texts( + model.ancillaryListsDetails[0].patientID.toString(), + ) + ], + ), + Row( + children: [ + Texts( + TranslationBase.of(context).patientName, + fontWeight: FontWeight.bold, + fontSize: 20, + ), + Texts( + " : ", + fontSize: 20, + ), + Texts( + model.ancillaryLists[0].patientName, + ) + ], + ), + Divider( + color: Colors.black26, + ) + ], + ), + padding: EdgeInsets.only(top: 5.0, bottom: 5.0), + ); + } + + Widget getInvoiceDetails(model) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Texts( + TranslationBase.of(context).invoiceNo, + fontWeight: FontWeight.bold, + ), + Texts(" : "), + Texts( + model.ancillaryListsDetails[0].appointmentNo.toString(), + ) + ], + ), + Row( + children: [ + Texts( + TranslationBase.of(context).date, + fontWeight: FontWeight.bold, + ), + Texts(" : "), + Texts( + DateUtil.getFormattedDate( + DateUtil.convertStringToDate( + model.ancillaryListsDetails[0].appointmentDate), + "MMM dd,yyyy"), + ) + ], + ), + Row( + children: [ + Texts( + TranslationBase.of(context).date, + fontWeight: FontWeight.bold, + ), + Texts(" : "), + Texts( + model.ancillaryListsDetails[0].doctorName, + ), + ], + ), + SizedBox( + height: 10, + ), + Divider( + color: Colors.black26, + ) + ], + ); + } + + Widget getInsuranceDetails(model) { + return Padding( + padding: EdgeInsets.only(top: 10, bottom: 10), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Texts( + TranslationBase.of(context).insurance, + fontWeight: FontWeight.bold, + ), + Texts( + TranslationBase.of(context).insuranceID, + fontWeight: FontWeight.bold, + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Texts( + model.ancillaryListsDetails[0].policyName, + ), + Texts( + model.ancillaryListsDetails[0].insurancePolicyNo, + ) + ], + ), + SizedBox( + height: 15, + ), + Divider( + color: Colors.red[800], + thickness: 3, + ) + ], + )); + } + + Widget getAncillaryDetails(model) { + Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList, + (obj) => obj.procedureCategoryName); + print(newMap); + + return Padding( + padding: EdgeInsets.only(top: 10, bottom: 10), + child: getHeaderDetails(newMap)); + } + + Widget getHeaderDetails(newMap) { + List list = new List(); + + newMap.forEach((key, value) { + list.add( + Texts( + key, + fontWeight: FontWeight.bold, + ), + ); + list.add(Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [getLabDetails(value)], + )); + }); + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: list, + ); + } + + getLabDetails(value) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: value.map((result) { + return Container( + width: MediaQuery.of(context).size.width * .9, + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + flex: 3, + child: Text(result.procedureName.toString(), + overflow: TextOverflow.ellipsis)), + Expanded(child: AppText(result.companyShare.toString())), + Expanded(child: AppText(result.companyTaxAmount.toString())), + Expanded( + child: AppText( + result.companyShareWithTax.toString(), + )) + ], + )); + }).toList(), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart index dbb46eee..bc1de1f6 100644 --- a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart +++ b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart'; @@ -20,8 +21,8 @@ class HealthWeatherIndicator extends StatefulWidget { class _HospitalsPageState extends State { var data; - LocationUtils locationUtils; AppSharedPreferences sharedPref = AppSharedPreferences(); + LocationUtils locationUtils; var weather = '--'; @override void initState() { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart index 2dbf2035..8b9a5409 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'dart:math'; @@ -508,8 +509,8 @@ class _BMICalculatorState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => ResultPage( + FadePage( + page: ResultPage( finalResult: bmiResult, textResult: textResult, msg: msg, diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart index 8ac6b06c..a541b3ce 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:percent_indicator/percent_indicator.dart'; @@ -114,8 +115,8 @@ class ResultPage extends StatelessWidget { handler: (){ Navigator.push( context, - MaterialPageRoute( - builder: (context) => BariatricsPage(1, 1, finalResult)), + FadePage( + page: BariatricsPage(1, 1, finalResult)), ); }, ), diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart index b393600f..9e3d049f 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'dart:math'; @@ -701,8 +702,8 @@ class _BmrCalculatorState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => BmrResultPage( + FadePage( + page: BmrResultPage( bmrResult: bmrResult, calories: calories, )), diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart index 51b4cad6..3bda439f 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'dart:math'; @@ -1001,8 +1002,8 @@ class _BodyFatState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => FatResult( + FadePage( + page: FatResult( bodyFat: bodyFat, fat: fat, textResult: textResult, diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart index d4e9c427..a7f60f68 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'calorie_result_page.dart'; @@ -678,8 +679,8 @@ class _CalorieCalculatorState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => CalorieResultPage( + FadePage( + page: CalorieResultPage( calorie: calories, )), ); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart index 50152328..78a737bb 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart @@ -1,10 +1,10 @@ +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; import 'package:flutter/services.dart'; import 'carbs_result_page.dart'; @@ -207,8 +207,7 @@ class _CarbsState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => CalorieCalculator()), + FadePage(page: CalorieCalculator()), ); } }); @@ -340,8 +339,8 @@ class _CarbsState extends State { calculate(); Navigator.push( context, - MaterialPageRoute( - builder: (context) => CarbsResult( + FadePage( + page: CarbsResult( cCal: cCal, pCal: pCal, fCal: fCal, diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart index c69f0564..d19c6017 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:intl/intl.dart'; @@ -121,8 +122,8 @@ class _DeliveryDueState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => DeliveryDueResult( + FadePage( + page: DeliveryDueResult( conceivedDate: conceivedDate, dateFrom: dateFrom, dateTo: dateTo, diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart index 2aff7836..4e0b1391 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'dart:math'; @@ -532,8 +533,8 @@ class _IdealBodyState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => IdealBodyResult( + FadePage( + page: IdealBodyResult( idealBodyWeight: idealWeight, minRange: minRange, mixRange: maxRange, diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart index 9c5dc0d3..508e8590 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:intl/intl.dart'; @@ -329,8 +330,8 @@ class _OvulationPeriodState extends State { { Navigator.push( context, - MaterialPageRoute( - builder: (context) => OvulationResult( + FadePage( + page: OvulationResult( conceivedDate: conceivedDate, dateFrom: dateFrom, dateTo: dateTo, diff --git a/lib/pages/AlHabibMedicalService/​ health_calculators.dart b/lib/pages/AlHabibMedicalService/​ health_calculators.dart index 80e0079f..dbd8939c 100644 --- a/lib/pages/AlHabibMedicalService/​ health_calculators.dart +++ b/lib/pages/AlHabibMedicalService/​ health_calculators.dart @@ -66,7 +66,7 @@ class _HealthCalculatorsState extends State isScrollable: true, indicatorWeight: 4.0, indicatorColor: Colors.red, - labelColor: Theme.of(context).primaryColor, + labelColor: Theme.of(context).buttonColor, labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0), unselectedLabelColor: Colors.grey, @@ -74,13 +74,15 @@ class _HealthCalculatorsState extends State Container( width: MediaQuery.of(context).size.width * 0.35, child: Center( - child: Texts(TranslationBase.of(context).generalHealth), + child: Texts( + TranslationBase.of(context).generalHealth), ), ), Container( width: MediaQuery.of(context).size.width * 0.35, child: Center( - child: Texts(TranslationBase.of(context).womanHealth), + child: + Texts(TranslationBase.of(context).womanHealth), ), ), ], @@ -119,7 +121,8 @@ class _HealthCalculatorsState extends State child: MedicalProfileItem( title: TranslationBase.of(context).bmi, imagePath: 'bmi_health_calculator.png', - subTitle: TranslationBase.of(context).calcHealth, + subTitle: + TranslationBase.of(context).calcHealth, ), ), ), @@ -137,7 +140,8 @@ class _HealthCalculatorsState extends State child: MedicalProfileItem( title: TranslationBase.of(context).calories, imagePath: 'calories-calculator.png', - subTitle: TranslationBase.of(context).calcHealth, + subTitle: + TranslationBase.of(context).calcHealth, ), ), ), @@ -159,7 +163,8 @@ class _HealthCalculatorsState extends State child: MedicalProfileItem( title: TranslationBase.of(context).bmr, imagePath: 'BMR_calculator.png', - subTitle: TranslationBase.of(context).calcHealth, + subTitle: + TranslationBase.of(context).calcHealth, ), ), ), @@ -215,9 +220,11 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: TranslationBase.of(context).carbohydrate, + title: + TranslationBase.of(context).carbohydrate, imagePath: 'carb_protein.png', - subTitle: TranslationBase.of(context).proteinFat, + subTitle: + TranslationBase.of(context).proteinFat, ), ), ), diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index 6d1e98ea..adff790c 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -6,21 +6,16 @@ import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dar //import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; -import 'package:diplomaticquarterapp/core/service/blood/blood_details_servies.dart'; -import 'package:diplomaticquarterapp/core/viewModels/blooddonation/blood_details_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart'; -import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectCiteisDialog.dart'; -import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -30,14 +25,11 @@ import 'package:flutter/material.dart'; import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:provider/provider.dart'; -//import '../../../core/model/my_balance/AdvanceModel.dart'; -import 'confirm_payment_page.dart'; import 'dialogs/SelectBeneficiaryDialog.dart'; import 'dialogs/SelectBloodDialog.dart'; import 'dialogs/SelectGenderDialog.dart'; import 'dialogs/SelectPatientFamilyDialog.dart'; import 'dialogs/SelectPatientInfoDialog.dart'; -import 'new_text_Field.dart'; enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } enum Gender { Male, Female, NON } @@ -63,7 +55,8 @@ class _BloodDonationPageState extends State { AuthenticatedUser authenticatedUser; GetAllSharedRecordsByStatusList selectedPatientFamily; AdvanceModel advanceModel = AdvanceModel(); - List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-"); + List_BloodGroupDetailsModel bloodDetails = + List_BloodGroupDetailsModel(bloodGroup: "A-"); AppSharedPreferences sharedPref = AppSharedPreferences(); AuthenticatedUser authUser; var checkedValue = false; @@ -108,7 +101,7 @@ class _BloodDonationPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -131,7 +124,7 @@ class _BloodDonationPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -155,7 +148,7 @@ class _BloodDonationPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -180,9 +173,8 @@ class _BloodDonationPageState extends State { ), InkWell( onTap: () { - Navigator.of(context).push(MaterialPageRoute( - builder: (BuildContext context) => - UserAgreementPage())); + Navigator.of(context) + .push(FadePage(page: UserAgreementPage())); }, child: Container( child: Texts( @@ -236,7 +228,7 @@ class _BloodDonationPageState extends State { children: [ Center( child: Container( - color: Colors.white, + color: Theme.of(context).primaryColor, width: 350, child: InkWell( onTap: () { @@ -267,7 +259,6 @@ class _BloodDonationPageState extends State { ), ], ), - SizedBox( height: MediaQuery.of(context).size.height * 0.15, ) @@ -291,8 +282,9 @@ class _BloodDonationPageState extends State { ), label: TranslationBase.of(context).save, onTap: () async { - if(_selectedHospital == null){ - AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); + if (_selectedHospital == null) { + AppToast.showErrorToast( + message: TranslationBase.of(context).selectCity); return; } bloodDetails.city = projectProvider.isArabic @@ -536,7 +528,8 @@ class _BloodDonationPageState extends State { return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary; } - String getHospitalName(ProjectViewModel projectProvider, BuildContext context) { + String getHospitalName( + ProjectViewModel projectProvider, BuildContext context) { if (_selectedHospital != null) return projectProvider.isArabic ? _selectedHospital.descriptionN diff --git a/lib/pages/Blood/my_balance_page.dart b/lib/pages/Blood/my_balance_page.dart index 26665c2b..06bd50f6 100644 --- a/lib/pages/Blood/my_balance_page.dart +++ b/lib/pages/Blood/my_balance_page.dart @@ -48,11 +48,11 @@ class MyBalancePage extends StatelessWidget { children: [ Texts( TranslationBase.of(context).totalBalance, - color: Colors.white, + color: Theme.of(context).primaryColor, ), Texts( '${model.totalAdvanceBalanceAmount ?? 0} SAR', - color: Colors.white, + color: Theme.of(context).primaryColor, bold: true, ), ], @@ -68,7 +68,7 @@ class MyBalancePage extends StatelessWidget { height: 65, margin: EdgeInsets.only(top: 8), decoration: BoxDecoration( - color: Colors.white, + color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(7), ), diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index ae968764..966dc4d4 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; @@ -628,8 +629,8 @@ class _BookConfirmState extends State { GifLoaderDialogUtils.hideDialog(context); Navigator.push( context, - MaterialPageRoute( - builder: (context) => BookSuccess( + FadePage( + page: BookSuccess( docObject: docObject, patientShareResponse: patientShareResponse, appoDateFormatted: widget.appoDateFormatted, diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index bd6c242c..26a5b0fe 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; @@ -592,7 +593,7 @@ class _BookSuccessState extends State { appo.appointmentNo = widget.patientShareResponse.appointmentNo; Navigator.push( - context, MaterialPageRoute(builder: (context) => PaymentMethod())) + context, FadePage(page: PaymentMethod())) .then((value) { print(value); if (value != null) { @@ -920,11 +921,11 @@ class _BookSuccessState extends State { Future navigateToQR(context, String appoQR) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => QRCode( - patientShareResponse: widget.patientShareResponse, - appoQR: appoQR, - ))); + FadePage( + page: QRCode( + patientShareResponse: widget.patientShareResponse, + appoQR: appoQR, + ))); } _getNormalText(text) { diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 392eb24c..2a349cf2 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:rating_bar/rating_bar.dart'; @@ -153,7 +154,8 @@ class _DoctorProfileState extends State alignment: Alignment.center, child: Text( "(" + - widget.docProfileList.noOfPatientsRate.toString() + + widget.docProfileList.noOfPatientsRate + .toString() + " " + TranslationBase.of(context).reviews + ")", @@ -279,7 +281,8 @@ class _DoctorProfileState extends State color: Theme.of(context).primaryColor, margin: EdgeInsets.only(bottom: 5.0), padding: EdgeInsets.all(10.0), - child: Text(TranslationBase.of(context).doctorRating, + child: Text( + TranslationBase.of(context).doctorRating, style: TextStyle( fontSize: 22.0, color: Colors.white))), Container( @@ -297,8 +300,11 @@ class _DoctorProfileState extends State margin: EdgeInsets.only(top: 5.0), alignment: Alignment.center, child: RatingBar.readOnly( - initialRating: - this.widget.doctor.actualDoctorRate.toDouble(), + initialRating: this + .widget + .doctor + .actualDoctorRate + .toDouble(), size: 35.0, filledColor: Colors.yellow[700], emptyColor: Colors.grey[500], @@ -311,7 +317,11 @@ class _DoctorProfileState extends State Container( margin: EdgeInsets.only(top: 10.0), child: Text( - this.widget.doctor.noOfPatientsRate.toString() + + this + .widget + .doctor + .noOfPatientsRate + .toString() + " " + TranslationBase.of(context).reviews, style: TextStyle( @@ -327,7 +337,8 @@ class _DoctorProfileState extends State child: Text( TranslationBase.of(context).excellent, style: TextStyle( - fontSize: 13.0, color: Colors.black))), + fontSize: 13.0, + color: Colors.black))), Container( margin: EdgeInsets.only(top: 10.0), child: SizedBox( @@ -349,9 +360,11 @@ class _DoctorProfileState extends State width: 100.0, margin: EdgeInsets.only( top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).v_good, + child: Text( + TranslationBase.of(context).v_good, style: TextStyle( - fontSize: 13.0, color: Colors.black))), + fontSize: 13.0, + color: Colors.black))), Container( margin: EdgeInsets.only(top: 10.0), child: SizedBox( @@ -373,9 +386,11 @@ class _DoctorProfileState extends State width: 100.0, margin: EdgeInsets.only( top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).good, + child: Text( + TranslationBase.of(context).good, style: TextStyle( - fontSize: 13.0, color: Colors.black))), + fontSize: 13.0, + color: Colors.black))), Container( margin: EdgeInsets.only(top: 10.0), child: SizedBox( @@ -397,9 +412,11 @@ class _DoctorProfileState extends State width: 100.0, margin: EdgeInsets.only( top: 10.0, left: 15.0, right: 15.0), - child: Text(TranslationBase.of(context).average, + child: Text( + TranslationBase.of(context).average, style: TextStyle( - fontSize: 13.0, color: Colors.black))), + fontSize: 13.0, + color: Colors.black))), Container( margin: EdgeInsets.only(top: 10.0), child: SizedBox( @@ -422,9 +439,11 @@ class _DoctorProfileState extends State margin: EdgeInsets.only( top: 10.0, left: 15.0, right: 15.0), child: Text( - TranslationBase.of(context).below_average, + TranslationBase.of(context) + .below_average, style: TextStyle( - fontSize: 13.0, color: Colors.black))), + fontSize: 13.0, + color: Colors.black))), Container( margin: EdgeInsets.only(top: 10.0), child: SizedBox( @@ -440,7 +459,8 @@ class _DoctorProfileState extends State ), ), Container( - margin: EdgeInsets.only(top: 40.0), child: Divider()), + margin: EdgeInsets.only(top: 40.0), + child: Divider()), Container( margin: EdgeInsets.only(top: 0.0), child: Align( @@ -462,7 +482,8 @@ class _DoctorProfileState extends State onPressed: () { Navigator.of(context).pop(); }, - child: Text(TranslationBase.of(context).cancel, + child: Text( + TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)), ), ), @@ -485,7 +506,8 @@ class _DoctorProfileState extends State } double getRatingWidth(int patientNumber) { - var width = (patientNumber / this.widget.docProfileList.noOfPatientsRate) * 100; + var width = + (patientNumber / this.widget.docProfileList.noOfPatientsRate) * 100; return width; } @@ -528,8 +550,8 @@ class _DoctorProfileState extends State Future navigateToBookConfirm(context) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => BookConfirm( + FadePage( + page: BookConfirm( doctor: widget.doctor, isLiveCareAppointment: widget.isLiveCareAppointment, selectedDate: DocAvailableAppointments.selectedDate, diff --git a/lib/pages/BookAppointment/Search.dart b/lib/pages/BookAppointment/Search.dart index 94308c1c..6dee1076 100644 --- a/lib/pages/BookAppointment/Search.dart +++ b/lib/pages/BookAppointment/Search.dart @@ -1,21 +1,18 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; -import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; -import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart'; -import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:geolocator/geolocator.dart'; import 'components/SearchByClinic.dart'; class Search extends StatefulWidget { final int type; final List clnicIds; + Search({this.type = 0, this.clnicIds}); + @override _SearchState createState() => _SearchState(); } @@ -43,9 +40,12 @@ class _SearchState extends State with TickerProviderStateMixin { children: [ TabBar( tabs: [ - Tab(text: TranslationBase.of(context).clinicName), Tab( - text: TranslationBase.of(context).doctorName, + child: Text(TranslationBase.of(context).clinicName, + style: TextStyle(color: Colors.black))), + Tab( + child: Text(TranslationBase.of(context).doctorName, + style: TextStyle(color: Colors.black)), ) ], controller: _tabController, diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 7caf1977..cd8bb789 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -16,6 +16,7 @@ import '../../../uitl/date_uitl.dart'; class DocAvailableAppointments extends StatefulWidget { DoctorList doctor; static bool areSlotsAvailable = false; + static bool areAppointmentsAvailable = false; static DateTime selectedAppoDateTime; static String selectedDate; static String selectedTime; @@ -137,7 +138,7 @@ class _DocAvailableAppointmentsState extends State shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.0), side: BorderSide( - color: Colors.blue[400], //Color of the border + color: Color(0xff76cfb7), //Color of the border style: BorderStyle.solid, //Style of the border width: 1.5, //width of the border ), @@ -209,8 +210,8 @@ class _DocAvailableAppointmentsState extends State color: _calendarController.isSelected(date) ? Colors.green[400] : _calendarController.isToday(date) - ? Colors.brown[300] - : Colors.blue[400], + ? Colors.transparent + : Color(0xff76cfb7), ), width: 40.0, height: 40.0, @@ -321,7 +322,7 @@ class _DocAvailableAppointmentsState extends State Widget getSelectedButton(int index) { return RaisedButton( - color: Colors.blue[400], + color: Color(0xff76cfb7), //Color of the border textColor: Colors.white, onPressed: () { setState(() { @@ -345,17 +346,22 @@ class _DocAvailableAppointmentsState extends State GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { if (res['FreeTimeSlots'].length != 0) { + DocAvailableAppointments.areAppointmentsAvailable = true; freeSlotsResponse = res['FreeTimeSlots']; print("res['FreeTimeSlots']"); print(res['FreeTimeSlots'].length); _getJSONSlots().then((value) => { setState(() => {_events.clear(), _events = value}) }); - } else {} + } else { + DocAvailableAppointments.areAppointmentsAvailable = false; + } } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); print(err); }); } @@ -370,18 +376,22 @@ class _DocAvailableAppointmentsState extends State GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { if (res['PatientER_DoctorFreeSlots'].length != 0) { + DocAvailableAppointments.areAppointmentsAvailable = true; freeSlotsResponse = res['PatientER_DoctorFreeSlots']; print("res['PatientER_DoctorFreeSlots']"); print(res['PatientER_DoctorFreeSlots'].length); _getJSONSlots().then((value) => { setState(() => {_events.clear(), _events = value}) }); - } else {} + } else { + DocAvailableAppointments.areAppointmentsAvailable = false; + } } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); print(err); }); } @@ -399,10 +409,10 @@ class _DocAvailableAppointmentsState extends State decoration: BoxDecoration( shape: BoxShape.circle, color: _calendarController.isSelected(date) - ? Colors.green[400] + ? Color(0xffB8382C) : _calendarController.isToday(date) ? Colors.brown[300] - : Colors.blue[400], + : Color(0xff76cfb7), ), width: 40.0, height: 40.0, diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 7e4e8fa9..63c5e8e1 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; class SearchByClinic extends StatefulWidget { @@ -295,8 +296,8 @@ class _SearchByClinicState extends State { BuildContext context, SearchInfo searchInfo) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => DentalComplaints(searchInfo: searchInfo), + FadePage( + page: DentalComplaints(searchInfo: searchInfo), ), ); } @@ -308,13 +309,14 @@ class _SearchByClinicState extends State { patientDoctorAppointmentListHospital) async { isProjectLoaded = false; Navigator.push( - context, - MaterialPageRoute( - builder: (context) => SearchResults( - isLiveCareAppointment: false, - doctorsList: docList, - patientDoctorAppointmentListHospital: - patientDoctorAppointmentListHospital))).then((value) { + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + doctorsList: docList, + patientDoctorAppointmentListHospital: + patientDoctorAppointmentListHospital))) + .then((value) { getProjectsList(); }); } diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 5e4ea91c..a1ecb7a0 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsLis import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import '../SearchResults.dart'; @@ -160,8 +161,8 @@ class _SearchByDoctorState extends State { patientDoctorAppointmentListHospital) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => SearchResults( + FadePage( + page: SearchResults( isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: diff --git a/lib/pages/BookAppointment/widgets/CardCommon.dart b/lib/pages/BookAppointment/widgets/CardCommon.dart index b03e9b24..ce26200d 100644 --- a/lib/pages/BookAppointment/widgets/CardCommon.dart +++ b/lib/pages/BookAppointment/widgets/CardCommon.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import '../../../Constants.dart'; @@ -8,6 +9,7 @@ class CardCommon extends StatelessWidget { final text; final subText; final type; + const CardCommon( {@required this.image, @required this.text, @@ -58,9 +60,9 @@ class CardCommon extends StatelessWidget { Future navigateToSearch(context, type) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => Search( - type: type, - ))); + FadePage( + page: Search( + type: type, + ))); } } diff --git a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart index 57377d75..02d40b3f 100644 --- a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart +++ b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; // ignore: must_be_immutable @@ -128,8 +129,8 @@ class _DentalComplaintCardState extends State { patientDoctorAppointmentListHospital) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => SearchResults( + FadePage( + page: SearchResults( doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))); diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart index 2788145f..bb6fccab 100644 --- a/lib/pages/BookAppointment/widgets/DoctorView.dart +++ b/lib/pages/BookAppointment/widgets/DoctorView.dart @@ -4,16 +4,15 @@ import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsLis import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:rating_bar/rating_bar.dart'; import '../DoctorProfile.dart'; class DoctorView extends StatelessWidget { - final DoctorList doctor; - bool isLiveCareAppointment; - - + final DoctorList doctor; + bool isLiveCareAppointment; DoctorView({@required this.doctor, @required this.isLiveCareAppointment}); @@ -52,48 +51,53 @@ class DoctorView extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if(doctor.doctorTitle!=null) - Text(this.doctor.doctorTitle + " " + this.doctor.name, - style: TextStyle( - fontSize: 14.0, - color: Colors.grey[700], - letterSpacing: 1.0)), - Container( - margin: EdgeInsets.only(top: 3.0), - child: Text(this.doctor.clinicName != null ? this.doctor.clinicName : "", + if (doctor.doctorTitle != null) + Text(this.doctor.doctorTitle + " " + this.doctor.name, style: TextStyle( - fontSize: 12.0, - color: Colors.grey[600], + fontSize: 14.0, + color: Colors.grey[700], letterSpacing: 1.0)), - ), Container( margin: EdgeInsets.only(top: 3.0), - child: Text(this.doctor.projectName, + child: Text( + this.doctor.clinicName != null + ? this.doctor.clinicName + : "", style: TextStyle( fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)), ), - if(doctor.speciality!=null) Container( - margin: EdgeInsets.only(top: 3.0, bottom: 3.0), - child: Text( - getDoctorSpeciality(this.doctor.speciality).trim(), + margin: EdgeInsets.only(top: 3.0), + child: Text(this.doctor.projectName, style: TextStyle( fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)), ), - this.doctor.nearestFreeSlot != null ? Container( - margin: EdgeInsets.only(top: 3.0, bottom: 3.0), - child: Text( - getDate(this.doctor.nearestFreeSlot), - style: TextStyle( - fontSize: 14.0, - fontWeight: FontWeight.bold, - color: Colors.green[600], - letterSpacing: 1.0)), - ) : Container(), + if (doctor.speciality != null) + Container( + margin: EdgeInsets.only(top: 3.0, bottom: 3.0), + child: Text( + getDoctorSpeciality(this.doctor.speciality) + .trim(), + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[600], + letterSpacing: 1.0)), + ), + this.doctor.nearestFreeSlot != null + ? Container( + margin: EdgeInsets.only(top: 3.0, bottom: 3.0), + child: Text(getDate(this.doctor.nearestFreeSlot), + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.bold, + color: Colors.green[600], + letterSpacing: 1.0)), + ) + : Container(), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.max, @@ -175,7 +179,7 @@ class DoctorView extends StatelessWidget { } String getMinute(DateTime dateObj) { - if(dateObj.minute == 0) { + if (dateObj.minute == 0) { return dateObj.minute.toString() + "0"; } else { return dateObj.minute.toString(); @@ -186,12 +190,12 @@ class DoctorView extends StatelessWidget { {isAppo}) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => DoctorProfile( - doctor: docObject, - isLiveCareAppointment: isLiveCareAppointment, - docProfileList: docProfile, - isOpenAppt: isAppo, - ))); + FadePage( + page: DoctorProfile( + doctor: docObject, + isLiveCareAppointment: isLiveCareAppointment, + docProfileList: docProfile, + isOpenAppt: isAppo, + ))); } } diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index ae33cc03..fad0b0c2 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -1,10 +1,10 @@ -import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -12,9 +12,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; - -import 'dialogs/delete_child.dart'; class ChildPage extends StatefulWidget { @override @@ -60,7 +57,8 @@ class _ChildPageState extends State Navigator.push( context, FadePage( - page: VaccinationTablePage(model.babyInformationModelList[index]), + page: VaccinationTablePage(model + .babyInformationModelList[index]), ), ); }, @@ -119,7 +117,9 @@ class _ChildPageState extends State Navigator.push( context, FadePage( - page: VaccinationTablePage(model.babyInformationModelList[index]), + page: VaccinationTablePage(model + .babyInformationModelList[ + index]), ), ); }, @@ -159,9 +159,9 @@ class _ChildPageState extends State newChild: deleteBaby); if (model.isDeleted) { AppToast.showSuccessToast( - message: - TranslationBase.of(context) - .recordDeleted); + message: TranslationBase.of( + context) + .recordDeleted); Navigator.pop( context, model.isDeleted); } else { @@ -183,34 +183,34 @@ class _ChildPageState extends State ], ))), ), - bottomSheet: Container( - height: height * 0.15, - width: double.infinity, - padding: EdgeInsets.all(16), - child: SecondaryButton( - textColor: Colors.white, - color: checkedValue == false - ? Colors.white24 - : Color.fromRGBO( - 63, - 72, - 74, - 1, + bottomSheet: Container( + height: height * 0.15, + width: double.infinity, + padding: EdgeInsets.all(16), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO( + 63, + 72, + 74, + 1, + ), + label: TranslationBase.of(context).addNewChild, + // + onTap: () { + Navigator.push( + context, + FadePage( + page: AddNewChildPage(), + ), + ).then((value) { + if (value) model.getNewUserOrders(); + }); + }, + ), ), - label: TranslationBase.of(context).addNewChild, - // - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => AddNewChildPage(), - ), - ).then((value) { - if (value) model.getNewUserOrders(); - }); - }, - ), - ), )); } } diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart index 1e6911e2..04a7178f 100644 --- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; @@ -13,9 +14,11 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; import 'package:table_calendar/table_calendar.dart'; class CovidTimeSlots extends StatefulWidget { @@ -28,6 +31,8 @@ class CovidTimeSlots extends StatefulWidget { int selectedClinicID; int selectedDoctorID; + var language; + PatientShareResponse patientShareResponse; CovidTimeSlots({@required this.projectID}); @@ -89,10 +94,10 @@ class _CovidTimeSlotsState extends State super.dispose(); } - void _onDaySelected(DateTime day, List events) { + void _onDaySelected(DateTime day, List events, ProjectViewModel projectViewModel) { final DateFormat formatter = DateFormat('yyyy-MM-dd'); setState(() { - this.selectedDate = DateUtil.getMonthDayYearDateFormatted(day); + this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en"); openTimeSlotsPickerForDate(day, docFreeSlots); CovidTimeSlots.selectedDate = formatter.format(day); print(CovidTimeSlots.selectedDate); @@ -111,6 +116,7 @@ class _CovidTimeSlotsState extends State @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, @@ -170,11 +176,12 @@ class _CovidTimeSlotsState extends State borderRadius: BorderRadius.circular(10.0), color: Colors.white), margin: EdgeInsets.fromLTRB(0.0, 20.0, 0.0, 5.0), - padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), + padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 20.0), width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.65, + // height: MediaQuery.of(context).size.height * 0.65, child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, children: [ Container( margin: EdgeInsets.all(10.0), @@ -219,7 +226,7 @@ class _CovidTimeSlotsState extends State }, ), ), - _buildTableCalendarWithBuilders(), + _buildTableCalendarWithBuilders(projectViewModel), ], ), ), @@ -253,7 +260,7 @@ class _CovidTimeSlotsState extends State onPressed: () { bookCovidTestAppointment(); }, - child: Text("BOOK", style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)), ), ), ), @@ -264,9 +271,9 @@ class _CovidTimeSlotsState extends State ); } - Widget _buildTableCalendarWithBuilders() { + Widget _buildTableCalendarWithBuilders(ProjectViewModel projectViewModel) { return TableCalendar( - locale: 'en_US', + locale: projectViewModel.isArabic ? 'ar_SA' : 'en_US', calendarController: _calendarController, events: _events, initialCalendarFormat: CalendarFormat.month, @@ -351,6 +358,7 @@ class _CovidTimeSlotsState extends State _onDaySelected( date, event, + projectViewModel ); _animationController.forward(from: 0.0); }, @@ -488,7 +496,6 @@ class _CovidTimeSlotsState extends State CovidTimeSlots.selectedDate, context) .then((res) { - print(res); if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: "Appointment Booked Successfully"); getPatientShare(context, res['AppointmentNo'], docObject.clinicID, @@ -525,8 +532,8 @@ class _CovidTimeSlotsState extends State cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) { - GifLoaderDialogUtils.showMyDialog(context); ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.cancelAppointment(appo, context).then((res) { if (res['MessageStatus'] == 1) { @@ -560,10 +567,12 @@ class _CovidTimeSlotsState extends State navigateToPaymentAlert() { Navigator.push( - context, - MaterialPageRoute( - builder: (context) => CovidPaymentAlert( - patientShareResponse: widget.patientShareResponse))); + context, + FadePage( + page: CovidPaymentAlert( + patientShareResponse: widget.patientShareResponse), + ), + ); } getCovidFreeSlots(BuildContext context, int projectID) { diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart index c82fd0f1..a8cb5048 100644 --- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:provider/provider.dart'; @@ -285,8 +286,8 @@ class _CovidDrivethruLocationState extends State { }); Navigator.push( context, - MaterialPageRoute( - builder: (context) => CovidPaymentDetails( + FadePage( + page: CovidPaymentDetails( covidPaymentInfoResponse: covidPaymentInfoResponse, projectID: int.parse(projectID), ))); diff --git a/lib/pages/Covid-DriveThru/covid-payment-alert.dart b/lib/pages/Covid-DriveThru/covid-payment-alert.dart index ac5f45fc..ca6640c0 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-alert.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-alert.dart @@ -1,7 +1,13 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-summary.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -15,10 +21,13 @@ class CovidPaymentAlert extends StatefulWidget { } class _CovidPaymentAlertState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUser authUser; + @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "COVID-19 TEST", + appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, body: SingleChildScrollView( child: Column( @@ -43,7 +52,7 @@ class _CovidPaymentAlertState extends State { children: [ Container( margin: EdgeInsets.only(left: 30.0, right: 20.0), - child: Text("Alert", + child: Text(TranslationBase.of(context).covidAlert, style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, @@ -54,7 +63,8 @@ class _CovidPaymentAlertState extends State { margin: EdgeInsets.only( left: 30.0, right: 20.0, top: 5.0), child: Text( - "Pay With-in 15 mins to confirm the appointment", + TranslationBase.of(context).covidAlertHeader, + // "Pay With-in 15 mins to confirm the appointment", overflow: TextOverflow.clip, style: TextStyle( color: Colors.white, fontSize: 20.0)), @@ -72,7 +82,7 @@ class _CovidPaymentAlertState extends State { children: [ Container( alignment: Alignment.center, - child: Text("Pay With-in 15 mins", + child: Text(TranslationBase.of(context).covidAlertMins, overflow: TextOverflow.clip, style: TextStyle( color: new Color(0xFFc5272d), @@ -83,7 +93,7 @@ class _CovidPaymentAlertState extends State { alignment: Alignment.center, margin: EdgeInsets.only(top: 15.0), child: Text( - "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically​.", + TranslationBase.of(context).covidAlertInfo, textAlign: TextAlign.center, style: TextStyle( color: Colors.grey[700], @@ -115,7 +125,7 @@ class _CovidPaymentAlertState extends State { Container( margin: EdgeInsets.only( top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), - child: Text("COVID-19 TEST", + child: Text(TranslationBase.of(context).covidTest, style: TextStyle( fontSize: 18.0, color: Colors.black, @@ -137,10 +147,12 @@ class _CovidPaymentAlertState extends State { child: Text( widget.patientShareResponse.projectName != null - ? widget.patientShareResponse.projectName + ? widget + .patientShareResponse.projectName : "NULL", style: TextStyle( - fontSize: 18.0, color: Colors.grey[700])), + fontSize: 18.0, + color: Colors.grey[700])), ), ], ), @@ -159,14 +171,16 @@ class _CovidPaymentAlertState extends State { )), Container( child: Text( - widget.patientShareResponse.appointmentDate != + widget.patientShareResponse + .appointmentDate != null ? getDate(widget.patientShareResponse .appointmentDate) .split(" ")[0] : "NULL", style: TextStyle( - fontSize: 18.0, color: Colors.grey[700])), + fontSize: 18.0, + color: Colors.grey[700])), ), ], ), @@ -185,14 +199,16 @@ class _CovidPaymentAlertState extends State { )), Container( child: Text( - widget.patientShareResponse.appointmentDate != + widget.patientShareResponse + .appointmentDate != null ? getDate(widget.patientShareResponse .appointmentDate) .split(" ")[1] : "NULL", style: TextStyle( - fontSize: 18.0, color: Colors.grey[700])), + fontSize: 18.0, + color: Colors.grey[700])), ), ], ), @@ -216,7 +232,8 @@ class _CovidPaymentAlertState extends State { .patientShareResponse.doctorNameObj : "NULL", style: TextStyle( - fontSize: 18.0, color: Colors.grey[700])), + fontSize: 18.0, + color: Colors.grey[700])), ), ], ), @@ -251,9 +268,9 @@ class _CovidPaymentAlertState extends State { disabledTextColor: Colors.white, disabledColor: Colors.grey[500], onPressed: () { -// bookCovidTestAppointment(); + startPaymentProcess(); }, - child: Text("NEXT", style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)), ), ), ), @@ -264,6 +281,37 @@ class _CovidPaymentAlertState extends State { ); } + startPaymentProcess() { + navigateToPaymentMethod(context, widget.patientShareResponse); + } + + Future navigateToPaymentMethod( + context, PatientShareResponse patientShareResponse) async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson( + await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + + Navigator.push( + context, FadePage(page: PaymentMethod())) + .then((value) { + print(value); + if (value != null) { + Navigator.push( + context, + FadePage( + page: CovidPaymentSummary( + patientShareResponse: widget.patientShareResponse, + selectedPaymentMethod: value.toString()), + ), + ); + } + }); + } + String getDate(String appoDate) { var appoDateFormatted = ""; diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart index 07914c9e..e6c87d0a 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-details.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart' import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -17,7 +18,7 @@ class CovidPaymentDetails extends StatefulWidget { _CovidPaymentDetailsState createState() => _CovidPaymentDetailsState(); } -class _CovidPaymentDetailsState extends State { +class _CovidPaymentDetailsState extends State { bool isAgree = false; @override @@ -197,7 +198,8 @@ class _CovidPaymentDetailsState extends State { onPressed: () { cancel(); }, - child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).cancel, + style: TextStyle(fontSize: 18.0)), ), ), ), @@ -218,7 +220,8 @@ class _CovidPaymentDetailsState extends State { disabledTextColor: Colors.white, disabledColor: Colors.grey[500], onPressed: isAgree ? next : null, - child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).next, + style: TextStyle(fontSize: 18.0)), ), ), ), @@ -232,10 +235,10 @@ class _CovidPaymentDetailsState extends State { void next() { Navigator.push( context, - MaterialPageRoute( - builder: (context) => CovidTimeSlots( - projectID: widget.projectID, - ))); + FadePage( + page: CovidTimeSlots( + projectID: widget.projectID, + ))); } cancel() { diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart new file mode 100644 index 00000000..e71285b5 --- /dev/null +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -0,0 +1,333 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class CovidPaymentSummary extends StatefulWidget { + PatientShareResponse patientShareResponse; + + final String selectedPaymentMethod; + MyInAppBrowser browser; + AuthenticatedUser authenticatedUser; + AppSharedPreferences sharedPref = AppSharedPreferences(); + String transID = ""; + + CovidPaymentSummary( + {@required this.patientShareResponse, this.selectedPaymentMethod}); + + @override + _CovidPaymentSummaryState createState() => _CovidPaymentSummaryState(); +} + +class _CovidPaymentSummaryState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).confirmThePayment, + textAlign: TextAlign.center, + fontWeight: FontWeight.w500, + fontSize: 24, + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + height: 100.0, + padding: EdgeInsets.all(7.0), + width: MediaQuery.of(context).size.width * 0.45, + child: + Image.asset(getImagePath(widget.selectedPaymentMethod)), + ), + Texts( + '${widget.patientShareResponse.patientShareWithTax} ' + + TranslationBase.of(context).sar, + fontSize: 26, + bold: true, + ) + ], + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).fileNumber, + initialValue: + projectViewModel.user.patientID.toString(), + isEnabled: false, + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).name, + initialValue: projectViewModel.user.firstName, + isEnabled: false, + ), + ), + ), + ], + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).mobileNumber, + initialValue: projectViewModel.user.mobileNumber, + isEnabled: false, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).depositorName, + initialValue: projectViewModel.user.firstName + + " " + + projectViewModel.user.middleName + + " " + + projectViewModel.user.lastName, + isEnabled: false, + ), + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).confirm.toUpperCase(), + onTap: () { + startPaymentProcess(projectViewModel.user); + }, + ), + ), + ); + } + + startPaymentProcess(AuthenticatedUser authenticatedUser) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.patientShareResponse.projectID; + appo.clinicID = widget.patientShareResponse.clinicID; + appo.appointmentNo = widget.patientShareResponse.appointmentNo; + + openPayment( + widget.selectedPaymentMethod, + authenticatedUser, + double.parse( + widget.patientShareResponse.patientShareWithTax.toString()), + widget.patientShareResponse, + appo); + } + + openPayment( + String paymentMethod, + AuthenticatedUser authenticatedUser, + double amount, + PatientShareResponse patientShareResponse, + AppoitmentAllHistoryResultList appo) async { + if (paymentMethod == "ApplePay") { + // await widget.chromeBrowser.open( + // url: "https://applepay-datatrans-sample.herokuapp.com/", + // options: ChromeSafariBrowserClassOptions( + // android: AndroidChromeCustomTabsOptions( + // addDefaultShareMenuItem: false), + // ios: IOSSafariOptions(barCollapsingEnabled: true))); + } else { + widget.browser = new MyInAppBrowser( + onExitCallback: onBrowserExit, + appo: appo, + onLoadStartCallback: onBrowserLoadStart); + + widget.browser.openPaymentBrowser( + amount, + "Appointment check in", + Utils.getAppointmentTransID( + appo.projectID, appo.clinicID, appo.appointmentNo), + appo.projectID.toString(), + authenticatedUser.emailAddress, + paymentMethod, + authenticatedUser.patientType, + authenticatedUser.firstName, + authenticatedUser.patientID, + authenticatedUser, + widget.browser, + widget.patientShareResponse.isLiveCareAppointment, + widget.patientShareResponse.appointmentDate, + widget.patientShareResponse.appointmentNo, + widget.patientShareResponse.clinicID, + widget.patientShareResponse.doctorID); + } + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (widget.browser.isOpened()) widget.browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (widget.browser.isOpened()) widget.browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (isPaymentMade) checkPaymentStatus(appo); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service + .checkPaymentStatus( + Utils.getAppointmentTransID( + appo.projectID, appo.clinicID, appo.appointmentNo), + context) + .then((res) { + print("Printing Payment Status Reponse!!!!"); + print(res); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + createAdvancePayment(res, appo); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service + .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], + res['Fort_id'], res['PaymentMethod'], context) + .then((res) { + print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); + addAdvancedNumberRequest( + res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString()); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest( + String advanceNumber, String paymentReference, String appointmentID) { + DoctorsListService service = new DoctorsListService(); + service + .addAdvancedNumberRequest( + advanceNumber, paymentReference, appointmentID, context) + .then((res) { + print(res); + getAppoQR(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getAppoQR(context) { + DoctorsListService service = new DoctorsListService(); + service + .generateAppointmentQR(widget.patientShareResponse, context) + .then((res) { + print(res); + GifLoaderDialogUtils.hideDialog(context); + navigateToQR(context, res['AppointmentQR']); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + Future navigateToQR(context, String appoQR) async { + Navigator.push( + context, + FadePage( + page: QRCode( + patientShareResponse: widget.patientShareResponse, + appoQR: appoQR, + ))); + } + + String getImagePath(String paymentMethod) { + switch (paymentMethod) { + case "MADA": + return 'assets/images/new-design/mada.png'; + break; + case "SADAD": + return 'assets/images/new-design/sadad.png'; + break; + case "VISA": + return 'assets/images/new-design/visa.png'; + break; + case "MASTERCARD": + return 'assets/images/new-design/mastercard.png'; + break; + case "Installment": + return 'assets/images/new-design/installment.png'; + break; + } + + return 'assets/images/new-design/mada.png'; + } +} diff --git a/lib/pages/DrawerPages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart index 33e39397..96e055b3 100644 --- a/lib/pages/DrawerPages/family/add-family_type.dart +++ b/lib/pages/DrawerPages/family/add-family_type.dart @@ -27,7 +27,7 @@ class AddFamilyMemberType extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/DQ/dq_logo_icon.png', + 'assets/images/habib-logo.png', height: 80, width: 80, ), diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 5a2247e5..0a5c5091 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -38,9 +38,7 @@ import 'package:provider/provider.dart'; class MyFamily extends StatefulWidget { final bool isAppbarVisible; - MyFamily({this.isAppbarVisible = true}); - @override _MyFamily createState() => _MyFamily(); } @@ -59,7 +57,8 @@ class _MyFamily extends State with TickerProviderStateMixin { ProjectViewModel projectViewModel; AuthenticatedUser user; VitalSignService _vitalSignService = locator(); - PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); var isVaiable = false; @override @@ -117,8 +116,7 @@ class _MyFamily extends State with TickerProviderStateMixin { child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.92, - // 0.9, + width: MediaQuery.of(context).size.width * 0.92, // 0.9, decoration: BoxDecoration( border: Border( bottom: BorderSide( @@ -133,6 +131,8 @@ class _MyFamily extends State with TickerProviderStateMixin { indicatorWeight: 5.0, //indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.tab, + + indicatorColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), @@ -177,38 +177,38 @@ class _MyFamily extends State with TickerProviderStateMixin { ), ); - return AppScaffold( - appBarTitle: TranslationBase.of(context).myFamilyFiles, - isShowAppBar: widget.isAppbarVisible, - body: SingleChildScrollView( - child: Container( - height: SizeConfig.screenHeight * .9, - width: SizeConfig.realScreenWidth, - padding: EdgeInsets.all(20), - child: Stack( - children: [ - TabBar( - controller: _tabController, - indicatorColor: Colors.red, - tabs: [ - Tab( - // padding: EdgeInsets.all(6), - child: AppText(TranslationBase.of(context).family)), - Tab( - // padding: EdgeInsets.all(6), - child: - AppText(TranslationBase.of(context).request)), - ], - ), - TabBarView( - controller: _tabController, - children: [ - myFamilyDetails(context), - myFamilyRequest(context) - ], - ) - ], - )))); + // return AppScaffold( + // appBarTitle: TranslationBase.of(context).myFamilyFiles, + // isShowAppBar: widget.isAppbarVisible, + // body: SingleChildScrollView( + // child: Container( + // height: SizeConfig.screenHeight * .9, + // width: SizeConfig.realScreenWidth, + // padding: EdgeInsets.all(20), + // child: Stack( + // children: [ + // TabBar( + // controller: _tabController, + // indicatorColor: Colors.red, + // tabs: [ + // Tab( + // // padding: EdgeInsets.all(6), + // child: AppText(TranslationBase.of(context).family)), + // Tab( + // // padding: EdgeInsets.all(6), + // child: + // AppText(TranslationBase.of(context).request)), + // ], + // ), + // TabBarView( + // controller: _tabController, + // children: [ + // myFamilyDetails(context), + // myFamilyRequest(context) + // ], + // ) + // ], + // )))); } Widget myFamilyDetails(context) { @@ -395,20 +395,12 @@ class _MyFamily extends State with TickerProviderStateMixin { left: 10, right: 10), child: Row(children: [ Expanded( - flex: 3, - child: AppText( - TranslationBase.of(context) - .theName)), + flex: 3, child: AppText('Name')), Expanded( - flex: 1, - child: AppText( - TranslationBase.of(context) - .allowView)), + flex: 1, child: AppText('Allow')), Expanded( flex: 1, - child: AppText( - TranslationBase.of(context) - .rejectView)), + child: AppText('Reject')), ])), Column( children: familyFileProvider @@ -519,10 +511,7 @@ class _MyFamily extends State with TickerProviderStateMixin { result.statusDescription, color: result.status == 3 ? Colors.green - : result.status == 2 - ? Colors - .yellow[800] - : Colors.red, + : Colors.red, )), ], )); @@ -559,54 +548,66 @@ class _MyFamily extends State with TickerProviderStateMixin { else return Column( children: [ + // Padding( + // padding:EdgeInsets.only(left:10, right:10), + // child: Row( + // mainAxisAlignment: + // MainAxisAlignment.spaceBetween, + // children: [ + // Expanded( + // flex: 3, + // child: AppText( + // TranslationBase.of(context).request), + // ), + // Expanded( + // flex: 2, + // child: AppText( + // TranslationBase.of(context).switchUser, + // )), + // Expanded( + // flex: 1, + // child: AppText( + // TranslationBase.of(context).deleteView, + // )), + // ], + // )), Column(children: [ Padding( padding: EdgeInsets.only(left: 10, right: 10), child: Row(children: [ Expanded( - flex: 3, - child: AppText( - TranslationBase.of(context) - .theName)), + flex: 3, child: AppText('Name')), Expanded( - flex: 1, - child: AppText( - TranslationBase.of(context) - .deleteView)), + flex: 1, child: AppText('Delete')), ])), Column( children: familyFileProvider .allSharedRecordsByStatusResponse .getAllSharedRecordsByStatusList .map((result) { - return result.status == 3 - ? Padding( - padding: EdgeInsets.all(10), - child: Row( - children: [ - Expanded( - flex: 3, - child: AppText( - result.patientName)), - Expanded( - flex: 1, - child: IconButton( - icon: Icon( - Icons.delete, - color: Colors.black, - ), - onPressed: () { - deactivateRequest( - result.iD, - 5, - context); - }, - )), - ], - )) - : Container( - child: AppText(isAvailable())); + return Padding( + padding: EdgeInsets.all(10), + child: Row( + children: [ + Expanded( + flex: 3, + child: AppText( + result.patientName)), + Expanded( + flex: 1, + child: IconButton( + icon: Icon( + Icons.delete, + color: Colors.black, + ), + onPressed: () { + deactivateRequest( + result.iD, 5, context); + }, + )), + ], + )); }).toList()) ]) ], @@ -696,11 +697,8 @@ class _MyFamily extends State with TickerProviderStateMixin { .familyFileProvider .silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser) - .then((value) { - _vitalSignService.heightCm = ""; - _vitalSignService.weightKg = ""; - loginAfter(value, context); - }).catchError((err) { + .then((value) => loginAfter(value, context)) + .catchError((err) { print(err); AppToast.showErrorToast(message: err); Navigator.of(context).pop(); @@ -708,11 +706,14 @@ class _MyFamily extends State with TickerProviderStateMixin { } loginAfter(result, context) async { - //GifLoaderDialogUtils.hideDialog(context); - Provider.of(context, listen: false).setPrivilege(privilegeList: result,isLoginChild: true); + GifLoaderDialogUtils.hideDialog(context); var currentLang = await sharedPref.getString(APP_LANGUAGE); + Provider.of(context, listen: false) + .setPrivilege(privilegeList: result, isLoginChild: true); result = list.CheckActivationCode.fromJson(result); var familyFile = await sharedPref.getObject(FAMILY_FILE); + + result = list.CheckActivationCode.fromJson(result); var mainUser = await sharedPref.getObject(MAIN_USER); var bloodType = await sharedPref.getString(BLOOD_TYPE); this.sharedPref.clear(); @@ -721,7 +722,7 @@ class _MyFamily extends State with TickerProviderStateMixin { } this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setObject(MAIN_USER, mainUser); - this.sharedPref.setString(BLOOD_TYPE, bloodType); + this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); @@ -732,8 +733,8 @@ class _MyFamily extends State with TickerProviderStateMixin { Provider.of(context, listen: false) .setUser(authenticatedUserObject.user); - await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if(pharmacyModuleViewModel.error.isNotEmpty) + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); }); diff --git a/lib/pages/DrawerPages/notifications/notifications_page.dart b/lib/pages/DrawerPages/notifications/notifications_page.dart index 53aad843..9745609d 100644 --- a/lib/pages/DrawerPages/notifications/notifications_page.dart +++ b/lib/pages/DrawerPages/notifications/notifications_page.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -57,15 +58,14 @@ class NotificationsPage extends StatelessWidget { .map( (notification) => InkWell( onTap: () async { - if(!notification.isRead) + if (!notification.isRead) model.markAsRead(notification.id); Navigator.push( context, - MaterialPageRoute( - builder: (BuildContext context) => - NotificationsDetailsPage( - notification: notification, - ))); + FadePage( + page: NotificationsDetailsPage( + notification: notification, + ))); }, child: Container( width: double.infinity, @@ -122,8 +122,7 @@ class NotificationsPage extends StatelessWidget { ..add( InkWell( onTap: () async { - GifLoaderDialogUtils.showMyDialog( - context); + GifLoaderDialogUtils.showMyDialog(context); currentIndex++; GetNotificationsRequestModel getNotificationsRequestModel = @@ -132,10 +131,9 @@ class NotificationsPage extends StatelessWidget { pagingSize: 14, notificationStatusID: 2); - await model.getNotifications(getNotificationsRequestModel,context); - GifLoaderDialogUtils.hideDialog( - context); - + await model.getNotifications( + getNotificationsRequestModel, context); + GifLoaderDialogUtils.hideDialog(context); }, child: Center( child: Image.asset('assets/images/notf.png'), diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index 1ea0f7f5..831eb013 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -14,11 +14,13 @@ import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; + import '../AvailableAppointmentsPage.dart'; enum HaveAppointment { YES, NO } @@ -87,17 +89,16 @@ class _PickupLocationState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => PickupLocationFromMap( - latitude: _latitude, - longitude: _longitude, - onPick: (value) { - setState(() { - _result = value; - }); - }, - ), - ), + FadePage( + page: PickupLocationFromMap( + latitude: _latitude, + longitude: _longitude, + onPick: (value) { + setState(() { + _result = value; + }); + }, + )), ); }, child: Container( @@ -111,7 +112,8 @@ class _PickupLocationState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded(child: Texts(getSelectFromMapName(context))), + Expanded( + child: Texts(getSelectFromMapName(context))), Icon( FontAwesomeIcons.mapMarkerAlt, size: 24, @@ -327,8 +329,8 @@ class _PickupLocationState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => PickupLocationFromMap( + FadePage( + page: PickupLocationFromMap( latitude: _latitude, longitude: _longitude, onPick: (value) { @@ -351,7 +353,8 @@ class _PickupLocationState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded(child: Texts(getSelectFromMapName(context))), + Expanded( + child: Texts(getSelectFromMapName(context))), Icon( FontAwesomeIcons.mapMarkerAlt, size: 24, @@ -366,7 +369,6 @@ class _PickupLocationState extends State { SizedBox( height: 45, ), - ], ), ), @@ -409,18 +411,16 @@ class _PickupLocationState extends State { widget.patientER.pickupLocationLattitude; widget.patientER.longitude = widget.patientER.pickupLocationLongitude; - widget.patientER.dropoffLocationName = - _selectedHospital.name; + widget.patientER.dropoffLocationName = _selectedHospital.name; widget.patientER.createdBy = widget.amRequestViewModel.user.patientID; widget.patientER.isOutPatient = widget.amRequestViewModel.user.outSA; - widget.patientER.patientIdentificationID = widget - .amRequestViewModel.user.patientIdentificationNo; + widget.patientER.patientIdentificationID = + widget.amRequestViewModel.user.patientIdentificationNo; widget.patientER.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now()); - widget.patientER.pickupLocationName = - _result.formattedAddress; + widget.patientER.pickupLocationName = _result.formattedAddress; widget.patientER.projectID = widget.amRequestViewModel.user.projectID; widget.patientER.requesterFileNo = @@ -498,8 +498,8 @@ class _PickupLocationState extends State { GifLoaderDialogUtils.hideDialog(context); Navigator.push( context, - MaterialPageRoute( - builder: (context) => AvailableAppointmentsPage( + FadePage( + page: AvailableAppointmentsPage( appointmentsAllHistoryList: widget.amRequestViewModel.appoitmentAllHistoryResultList, ), diff --git a/lib/pages/ErService/EdOnline/ConfirmExitPageDialog.dart b/lib/pages/ErService/EdOnline/ConfirmExitPageDialog.dart new file mode 100644 index 00000000..1144e587 --- /dev/null +++ b/lib/pages/ErService/EdOnline/ConfirmExitPageDialog.dart @@ -0,0 +1,76 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ConfirmExitPageDialog extends StatelessWidget { + final GestureTapCallback onTapYes; + final GestureTapCallback onTapNo; + + const ConfirmExitPageDialog({Key key, this.onTapYes, this.onTapNo}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return SimpleDialog( + contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0), + title: Center( + child: Texts( + TranslationBase.of(context).confirm, + color: Colors.black, + ), + ), + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts( + "Are you sure you want to exit this page ?", + color: Colors.grey, + ), + SizedBox( + height: 5, + ), + Divider(), + SizedBox( + height: 5.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: () { + onTapNo(); + }, + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).no, + color: Colors.red, + ), + ), + ), + ), + + InkWell( + onTap: () { + Navigator.pop(context); + onTapYes(); + }, + child: Container( + child: Center( + child: Texts(TranslationBase.of(context).yes), + ), + ), + ), + ], + ), + SizedBox( + height: 20.0, + ), + ], + ) + ], + ); + } +} diff --git a/lib/pages/ErService/EdOnline/DdServicesPage.dart b/lib/pages/ErService/EdOnline/DdServicesPage.dart new file mode 100644 index 00000000..7395b901 --- /dev/null +++ b/lib/pages/ErService/EdOnline/DdServicesPage.dart @@ -0,0 +1,120 @@ +import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'EdOnlineAgreementPage.dart'; +import 'EdOnlineNotesPage.dart'; +import 'EdOnlineQuestionsPage.dart'; +import 'EdOnlineSelectedHospitalPage.dart'; +import 'EdPaymentInformationPage.dart'; +import 'ConfirmExitPageDialog.dart'; + +class DdServicesPage extends StatefulWidget { + @override + _DdServicesPageState createState() => _DdServicesPageState(); +} + +class _DdServicesPageState extends State { + PageController pageController; + + bool isAgree = false; + TriageInformationRequest triageInformationRequest = new TriageInformationRequest(); + + List selectedQuestions = List(); + + @override + void initState() { + super.initState(); + pageController = new PageController(); + + } + + _changePageViewIndex(int tab) { + setState(() { + pageController.jumpToPage(tab); + pageController.animateToPage(tab, + duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); + }); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Scaffold( + appBar: AppBar( + elevation: 0, + textTheme: TextTheme( + headline6: TextStyle( + color: Theme.of(context).textTheme.headline1.color, + fontWeight: FontWeight.bold), + ), + title: Text( + 'ED Online', + style: TextStyle( + fontWeight: FontWeight.bold, + color: Theme.of(context).textTheme.headline1.color, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), + // bold: true, + // color: Colors.white, + ), + leading: Builder( + builder: (BuildContext context) { + return IconButton( + icon: Icon(Icons.arrow_back), + color: Theme.of(context).textTheme.headline1.color, + onPressed: () { + showConfirmMessage(context); + }, + ); + }, + ), + centerTitle: true, + ), + body: PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, + onPageChanged: _changePageViewIndex, + children: [ + EdOnlineSelectedHospitalPage( + changePageViewIndex: _changePageViewIndex, + triageInformationRequest: triageInformationRequest, + ), + EdOnlineAgreementPage( + changePageViewIndex: _changePageViewIndex, + isAgree: isAgree, + ), + EdOnlineQuestionsPage( + changePageViewIndex: _changePageViewIndex, + selectedQuestions: selectedQuestions, + ), + EdOnlineNotesPage( + changePageViewIndex: _changePageViewIndex, + selectedQuestions: selectedQuestions, + triageInformationRequest: triageInformationRequest, + ), + EdPaymentInformationPage(selectedHospital: triageInformationRequest.selectedHospital,) + ], + ), + ); + } + + void showConfirmMessage( + BuildContext context, + ) { + showDialog( + context: context, + child: ConfirmExitPageDialog( + onTapYes: () { + Navigator.pop(context); + }, + onTapNo: () { + Navigator.pop(context); + }, + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineAgreementPage.dart b/lib/pages/ErService/EdOnline/EdOnlineAgreementPage.dart new file mode 100644 index 00000000..950dc2e0 --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineAgreementPage.dart @@ -0,0 +1,99 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class EdOnlineAgreementPage extends StatefulWidget { + final HospitalsModel selectedHospital; + final Function changePageViewIndex; + bool isAgree; + EdOnlineAgreementPage({Key key, this.selectedHospital, this.changePageViewIndex,this.isAgree}) : super(key: key); + + @override + _EdOnlineAgreementPageState createState() => _EdOnlineAgreementPageState(); +} + +class _EdOnlineAgreementPageState extends State { + + + @override + Widget build(BuildContext context) { + return AppScaffold( + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + SizedBox(), + InkWell( + onTap: (){ + setState(() { + widget.isAgree = !widget.isAgree; + }); + }, + child: Row( + children: [ + Checkbox( + value: widget.isAgree, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() { + widget.isAgree = !widget.isAgree; + }); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Texts( + TranslationBase.of(context).onlineCheckInAgreement, + fontSize: 15, + ), + ), + ), + ], + ), + ), + SizedBox(), + ], + ), + ), + bottomSheet: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + height: 56, + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).back.toUpperCase(), + onTap: () => widget.changePageViewIndex(0), + ), + ), + ), + SizedBox(width: 10,), + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).next.toUpperCase(), + disabled: !widget.isAgree, + onTap: () => widget.changePageViewIndex(2), + ), + ), + ), + + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart new file mode 100644 index 00000000..45df4041 --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart @@ -0,0 +1,177 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; +import 'package:provider/provider.dart'; + +class EdOnlineNotesPage extends StatefulWidget { + final List selectedQuestions; + final Function changePageViewIndex; + TriageInformationRequest triageInformationRequest; + EdOnlineNotesPage( + {Key key, this.selectedQuestions, this.changePageViewIndex,this.triageInformationRequest}) + ; + + @override + _EdOnlineNotesPageState createState() => _EdOnlineNotesPageState(); +} + +class _EdOnlineNotesPageState extends State { + TextEditingController _chiefComplaintsTextController = + TextEditingController(); + TextEditingController _noteTextController = TextEditingController(); + DateTime selectedTime; + final _formKey = GlobalKey(); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Form( + key: _formKey, + child: NewTextFields( + controller: _chiefComplaintsTextController, + maxLines: 15, + minLines: 5, + hintText: TranslationBase.of(context).chiefComplaints, + validator: (value) { + if (value.isEmpty) return TranslationBase.of(context).errorChiefComplaints; + return null; + }, + ), + ), + SizedBox( + height: 8, + ), + InkWell( + onTap: () { + DatePicker.showDateTimePicker( + context, + showTitleActions: true, + minTime: DateTime.now(), + maxTime: DateTime.now().add(Duration(hours: 24)), + onConfirm: (date) { + setState(() { + selectedTime = date; + }); + }, + currentTime: DateTime.now(), + locale: projectViewModel.localeType, + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + // height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(selectedTime == null ?TranslationBase.of(context).errorExpectedArrivalTime:TranslationBase.of(context).expectedArrivalTime), + Texts(getDate(context)), + ], + ), + ), + ), + SizedBox( + height: 8, + ), + NewTextFields( + controller: _noteTextController, + maxLines: 15, + minLines: 5, + hintText: TranslationBase.of(context).notes, + ), + ], + ), + ), + ), + bottomSheet: Container( + height: 56, + margin: EdgeInsets.only(bottom: 5), + width: double.infinity, + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).back.toUpperCase(), + onTap: () => widget.changePageViewIndex(2), + ), + ), + ), + SizedBox(width: 10,), + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).save.toUpperCase(), + disabled: selectedTime == null, + onTap: () async { + if (_formKey.currentState.validate()) { + GifLoaderDialogUtils.showMyDialog(context); + model.saveQuestionsInformation( + chiefComplaint: + _chiefComplaintsTextController.text.toString(), + notes: _noteTextController.text.toString(), + selectedQuestions: widget.selectedQuestions, + projectId: widget.triageInformationRequest.projectID,selectedTime: selectedTime).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if(model.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: model.error); + else + { + widget.changePageViewIndex(4); + } + + }).catchError((onError){ + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: onError.toString()); + }); + } + }), + ), + ), + ], + ), + ), + ), + ); + } + + getDate(BuildContext context) { + String message = ""; + if (selectedTime != null) { + message = "${selectedTime.hour}:${selectedTime.minute}"; + } + return message; + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart b/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart new file mode 100644 index 00000000..e3eb1c4c --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart @@ -0,0 +1,127 @@ +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class EdOnlineQuestionsPage extends StatefulWidget { + final HospitalsModel selectedHospital; + final Function changePageViewIndex; + List selectedQuestions; + + EdOnlineQuestionsPage({Key key, this.selectedHospital,this.selectedQuestions, this.changePageViewIndex}); + + + @override + _EdOnlineQuestionsPageState createState() => _EdOnlineQuestionsPageState(); +} + +class _EdOnlineQuestionsPageState extends State { + + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getQuestions(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + ...List.generate( + model.triageQuestionsModelList.length, + (index) => + InkWell( + onTap: (){ + setState(() { + if (widget.selectedQuestions + .contains(model.triageQuestionsModelList[index])) { + widget.selectedQuestions + .remove(model.triageQuestionsModelList[index]); + } else { + widget.selectedQuestions + .add(model.triageQuestionsModelList[index]); + } + }); + }, + child: Row( + children: [ + Checkbox( + value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]), + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() { + if (widget.selectedQuestions + .contains(model.triageQuestionsModelList[index])) { + widget.selectedQuestions + .remove(model.triageQuestionsModelList[index]); + } else { + widget.selectedQuestions + .add(model.triageQuestionsModelList[index]); + } + }); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Texts( + model.triageQuestionsModelList[index].question, + fontSize: 15, + ), + ), + ), + ], + ), + ), + + ), + SizedBox(height: 80,) + ], + ), + ), + bottomSheet: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + height: 56, + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).back.toUpperCase(), + onTap: () => widget.changePageViewIndex(1), + ), + ), + ), + SizedBox(width: 10,), + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).next.toUpperCase(), + disabled: widget.selectedQuestions.isEmpty, + onTap: () => widget.changePageViewIndex(3), + ), + ), + ), + + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart new file mode 100644 index 00000000..34c41040 --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart @@ -0,0 +1,102 @@ +import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../../../Constants.dart'; + + +class EdOnlineSelectedHospitalPage extends StatefulWidget { + final Function changePageViewIndex; + TriageInformationRequest triageInformationRequest; + + EdOnlineSelectedHospitalPage( + {Key key, this.changePageViewIndex,this.triageInformationRequest}) + : super(key: key); + + @override + _EdOnlineSelectedHospitalPageState createState() => + _EdOnlineSelectedHospitalPageState(); +} + +class _EdOnlineSelectedHospitalPageState + extends State { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getHospitals(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + ...List.generate( + model.hospitals.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.triageInformationRequest.selectedHospital = model.hospitals[index]; + widget.triageInformationRequest.projectID = model.hospitals[index].iD; + }); + }, + child: ListTile( + title: Text(model.hospitals[index].name + + ' ${model.hospitals[index].distanceInKilometers} ' + + TranslationBase.of(context).km), + leading: Radio( + value: model.hospitals[index], + groupValue: widget.triageInformationRequest.selectedHospital, + activeColor: secondaryColor, + onChanged: (value) { + setState(() { + widget.triageInformationRequest.selectedHospital = model.hospitals[index]; + widget.triageInformationRequest.projectID = model.hospitals[index].iD; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ) + ], + ), + ), + bottomSheet: Container( + height: 76, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: SecondaryButton( + // textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).next.toUpperCase(), + disabled: widget.triageInformationRequest.selectedHospital==null, + onTap: () => widget.changePageViewIndex(1)), + ), + ), + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart new file mode 100644 index 00000000..c510196b --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart @@ -0,0 +1,112 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class EdPaymentInformationPage extends StatefulWidget { + final HospitalsModel selectedHospital; + + const EdPaymentInformationPage({Key key, this.selectedHospital}) : super(key: key); + @override + _EdPaymentInformationPageState createState() => + _EdPaymentInformationPageState(); +} + +class _EdPaymentInformationPageState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getPatientPaymentInformation(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.0), + color: Colors.white), + margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0), + padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), + child: Column( + children: [ + Container( + alignment: Alignment.center, + margin: + EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), + child: Text(TranslationBase.of(context).testFee, + style: TextStyle( + color: Colors.black, + fontSize: 22.0, + fontWeight: FontWeight.bold)), + ), + if(model.erPatientShareModel!=null) + Table( + children: [ + TableRow(children: [ + TableCell( + child: + Texts(TranslationBase.of(context).testFee)), + TableCell( + child: Texts(model + .erPatientShareModel.patientShare + .toStringAsFixed(2))), + ]), + TableRow(children: [ + TableCell( + child: Texts( + TranslationBase.of(context).patientTaxToDo)), + TableCell( + child: Texts(model + .erPatientShareModel.patientTaxAmount + .toStringAsFixed(2))), + ]), + TableRow(children: [ + TableCell( + child: Texts(TranslationBase.of(context) + .patientShareTotalToDo)), + TableCell( + child: Texts(model + .erPatientShareModel.patientShareWithTax + .toStringAsFixed(2))), + ]), + ], + ), + ], + ), + ), + ], + ), + ), + bottomSheet: Container( + height: 76, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: SecondaryButton( + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).next.toUpperCase(), + onTap: () { + Navigator.push(context, FadePage(page: PaymentMethod())).then( + (value) { + //TODO Haroun call API here + }, + ); + }, + ), + ), + ), + ), + ); + } + + + +} diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index 886d47d2..e0ff3ed4 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -1,10 +1,16 @@ import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import '../../uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; +import 'AmbulanceReq.dart'; +import 'EdOnline/DdServicesPage.dart'; +import 'EdOnline/EdOnlineSelectedHospitalPage.dart'; +import 'NearestEr.dart'; + class ErOptions extends StatefulWidget { final bool isAppbar; @@ -49,7 +55,12 @@ class _ErOptionsState extends State { image: 'assets/images/new-design/AM.PNG', text: TranslationBase.of(context).ambulancerequest, subText: TranslationBase.of(context).requestA, - type: 0, + onTap: (){ + Navigator.push( + context, + FadePage( + page: AmbulanceReq())); + }, ), ), @@ -58,8 +69,39 @@ class _ErOptionsState extends State { image: 'assets/images/new-design/emergency_icon.png', text: TranslationBase.of(context).nearester, subText: TranslationBase.of(context).locationa, - type: 1), + onTap:(){ + Navigator.push( + context, + FadePage( + page: NearestEr())); + }), + + ) + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/AM.PNG', + text:'ED service', + subText: 'ED service', + onTap: (){ + Navigator.push( + context, + FadePage( + page: DdServicesPage())); + }, + ), + ), + Expanded( + child: Container(), ) ], ), diff --git a/lib/pages/ErService/widgets/card_common.dart b/lib/pages/ErService/widgets/card_common.dart index 35ece966..6b396dc9 100644 --- a/lib/pages/ErService/widgets/card_common.dart +++ b/lib/pages/ErService/widgets/card_common.dart @@ -10,20 +10,18 @@ class CardCommonEr extends StatelessWidget { final image; final text; final subText; - final type; + + final Function onTap; const CardCommonEr( {@required this.image, @required this.text, @required this.subText, - @required this.type}); + @required this.onTap}); @override Widget build(BuildContext context) { return GestureDetector( - onTap: () { - navigateToSearch(context, this.type); - - }, + onTap: () => onTap(), child: Container( margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0), decoration: BoxDecoration(boxShadow: [ @@ -59,25 +57,4 @@ class CardCommonEr extends StatelessWidget { ); } - Future navigateToSearch(context, type) async { -//===Switch case=== - if(type==0) - { - - Navigator.push( - context, - FadePage( - page: AmbulanceReq())); - } - else{ - - Navigator.push( - context, - FadePage( - page: NearestEr())); - - } - - - } } diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 17b6d57b..9848b394 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:rating_bar/rating_bar.dart'; @@ -236,9 +237,10 @@ class _AppointmentDetailsState extends State Future navigateToBookConfirm(context) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => BookConfirm( + FadePage( + page: BookConfirm( doctor: getDoctorObject(), + isLiveCareAppointment: widget.appo.isLiveCareAppointment, selectedDate: DocAvailableAppointments.selectedDate, selectedTime: DocAvailableAppointments.selectedTime))); } diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index a49149b5..5ed0fef4 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -82,9 +82,17 @@ class _MyAppointmentsState extends State child: Column(children: [ TabBar( tabs: [ - Tab(text: TranslationBase.of(context).booked), - Tab(text: TranslationBase.of(context).confirmed), - Tab(text: TranslationBase.of(context).arrived), + Tab( + child: Text(TranslationBase.of(context).booked, + style: TextStyle(color: Colors.black))), + Tab( + child: Text(TranslationBase.of(context).confirmed, + style: TextStyle(color: Colors.black)), + ), + Tab( + child: Text(TranslationBase.of(context).arrived, + style: TextStyle(color: Colors.black)), + ) ], controller: _tabController, ), @@ -103,7 +111,7 @@ class _MyAppointmentsState extends State leading: Radio( value: FilterType.Clinic, groupValue: filterType, - activeColor: Theme.of(context).primaryColor, + activeColor: Color(0xffB8382C), onChanged: (FilterType value) { setFilterType(value); }, @@ -120,7 +128,7 @@ class _MyAppointmentsState extends State leading: Radio( value: FilterType.Hospital, groupValue: filterType, - activeColor: Theme.of(context).primaryColor, + activeColor: Color(0xffB8382C), onChanged: (FilterType value) => setFilterType(value), ), ), diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 60035ee1..51eefe1a 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -110,7 +110,7 @@ class _AppointmentActionsState extends State { child: Text(e.title, overflow: TextOverflow.clip, style: TextStyle( - color: new Color(0xFF40ACC9), + color: new Color(0xffB8382C), letterSpacing: 1.0, fontSize: 18.0)), ), @@ -498,8 +498,8 @@ class _AppointmentActionsState extends State { dynamic listPres) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => PrescriptionReportPage( + FadePage( + page: PrescriptionReportPage( prescriptionReportEnhList: prescriptionReportEnhList, listPres: listPres, appo: widget.appo))); @@ -508,8 +508,8 @@ class _AppointmentActionsState extends State { Future navigateToLabResults(PatientLabOrders patientLabOrders) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => + FadePage( + page: LaboratoryResultPage(patientLabOrders: patientLabOrders))) .then((value) {}); } @@ -517,8 +517,8 @@ class _AppointmentActionsState extends State { Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => + FadePage( + page: RadiologyDetailsPage(finalRadiology: finalRadiology))) .then((value) {}); } diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart index 0d3ac2e5..51e18ff4 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart'; @@ -57,14 +58,14 @@ class _ApointmentCardState extends State { children: [ Container( width: projectViewModel.isArabic ? 27 : 20, - height: projectViewModel.isArabic ? 165 : 140, + height: projectViewModel.isArabic ? 165 : 140, decoration: BoxDecoration( //Colors.red[900] Color(0xff404545) color: widget.appo.isLiveCareAppointment ? Color(0xff404545) : !widget.appo.isInOutPatient - ? Colors.red[900] - : Theme.of(context).primaryColor, + ? Colors.red[900] + : Theme.of(context).primaryColor, borderRadius: BorderRadius.only( topLeft: projectViewModel.isArabic ? Radius.circular(0) @@ -85,21 +86,21 @@ class _ApointmentCardState extends State { child: Center( child: Text( widget.appo.isLiveCareAppointment - ? TranslationBase.of(context) - .liveCare - .toUpperCase() + ? TranslationBase.of(context).liveCare.toUpperCase() : !widget.appo.isInOutPatient - ? TranslationBase.of(context) - .inPatient - .toUpperCase() - : TranslationBase.of(context) - .outpatient - .toUpperCase(), + ? TranslationBase.of(context) + .inPatient + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), style: TextStyle(color: Colors.white), ), )), ), - SizedBox(width: 8,), + SizedBox( + width: 8, + ), ClipRRect( borderRadius: BorderRadius.circular(100.0), child: Image.network(widget.appo.doctorImageURL, @@ -166,7 +167,7 @@ class _ApointmentCardState extends State { ), Container( transform: - Matrix4.translationValues(15.0, -40.0, 0.0), + Matrix4.translationValues(15.0, -40.0, 0.0), child: projectViewModel.isArabic ? Image.asset( "assets/images/new-design/arrow_menu_black-ar.png", @@ -179,17 +180,18 @@ class _ApointmentCardState extends State { ), ], ), - (widget.appo.patientStatusType == AppointmentType.BOOKED || + (widget.appo.patientStatusType == + AppointmentType.BOOKED || widget.appo.patientStatusType == AppointmentType.CONFIRMED) ? Container( child: CountdownTimer( controller: new CountdownTimerController( - endTime: - DateTime.now().millisecondsSinceEpoch + - (widget.appo.remaniningHoursTocanPay * - 1000) * - 60), + endTime: DateTime.now() + .millisecondsSinceEpoch + + (widget.appo.remaniningHoursTocanPay * + 1000) * + 60), widgetBuilder: (_, CurrentRemainingTime time) { return time != null ? Text( @@ -235,10 +237,7 @@ class _ApointmentCardState extends State { } Future navigateToAppointmentDetails(context, appo) async { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => AppointmentDetails(appo: appo))) + Navigator.push(context, FadePage(page: AppointmentDetails(appo: appo))) .then((value) { widget.onReloadAppointmentHistory(); }); diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 622f88c8..79bcd94b 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart'; @@ -367,7 +368,7 @@ class _ToDoState extends State { height: 30.0, margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0) - : EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0), + : EdgeInsets.fromLTRB(20.0, 0.0, 160.0, 0.0), transform: Matrix4.translationValues(0.0, -8.0, 0.0), child: Row( mainAxisAlignment: MainAxisAlignment.start, @@ -392,7 +393,7 @@ class _ToDoState extends State { style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, - fontSize: 12.0)), + fontSize: 11.0)), ) : Container( child: Text( @@ -401,7 +402,7 @@ class _ToDoState extends State { style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, - fontSize: 12.0)), + fontSize: 11.0)), ) ], ), @@ -600,8 +601,8 @@ class _ToDoState extends State { Future navigateToAppointmentDetails(context, appo) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => AppointmentDetails(appo: appo))) + FadePage( + page: AppointmentDetails(appo: appo))) .then((value) { getPatientAppointmentHistory(); }); @@ -702,8 +703,8 @@ class _ToDoState extends State { context, String appoQR, PatientShareResponse patientShareResponse) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => QRCode( + FadePage( + page: QRCode( patientShareResponse: patientShareResponse, appoQR: appoQR, ))).then((value) { @@ -907,7 +908,7 @@ class _ToDoState extends State { } Navigator.push( - context, MaterialPageRoute(builder: (context) => PaymentMethod())) + context, FadePage(page: PaymentMethod())) .then((value) { print(value); getPatientAppointmentHistory(); diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index 3a0734dc..9a22eada 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -27,7 +27,7 @@ class _PaymentMethodState extends State { Container( margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0), alignment: Alignment.center, - child: Text("Select Payment Method", + child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle( fontSize: 26.0, fontWeight: FontWeight.bold)), ), diff --git a/lib/pages/ToDoList/widgets/upcomingCard.dart b/lib/pages/ToDoList/widgets/upcomingCard.dart index 3fefe616..6610ed33 100644 --- a/lib/pages/ToDoList/widgets/upcomingCard.dart +++ b/lib/pages/ToDoList/widgets/upcomingCard.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dar import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:rating_bar/rating_bar.dart'; @@ -351,6 +352,6 @@ class _TodoListCardState extends State { Future navigateToAppointmentDetails(context) async { Navigator.push( - context, MaterialPageRoute(builder: (context) => AppointmentDetails())); + context, FadePage(page: AppointmentDetails())); } } diff --git a/lib/pages/final_products_page.dart b/lib/pages/final_products_page.dart index 03adee97..4820689a 100644 --- a/lib/pages/final_products_page.dart +++ b/lib/pages/final_products_page.dart @@ -1,15 +1,21 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'base/base_view.dart'; class FinalProductsPage extends StatefulWidget { - String id; - FinalProductsPage({this.id}); + final String id; + final int productType; // 1 : default, 2 : manufacturer , 3 : recently viewed + + FinalProductsPage({this.id, this.productType = 1}); + @override _FinalProductsPageState createState() => _FinalProductsPageState(id: id); } @@ -28,11 +34,22 @@ class _FinalProductsPageState extends State { @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getFinalProducts(i: id), + onModelReady: (model) { + if (widget.productType == 1) { + model.getFinalProducts(i: id); + } else if (widget.productType == 2) { + model.getManufacturerProducts(id); + } else if (widget.productType == 3) { + model.getLastVisitedProducts(); + } else { + model.getBestSellerProducts(); + } + }, + allowAny: true, builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => PharmacyAppScaffold( - appBarTitle: 'Products', + appBarTitle: "Products", isBottomBar: false, isShowAppBar: true, backgroundColor: Colors.white, @@ -117,193 +134,220 @@ class _FinalProductsPageState extends State { itemBuilder: (BuildContext context, int index) { return NetworkBaseView( baseViewModel: model, - child: Card( - color: model.finalProducts[index] - .discountName != - null - ? Color(0xffFFFF00) - : Colors.white, - elevation: 0, - shape: Border( - right: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - left: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - bottom: BorderSide( - color: Colors.grey.shade300, - width: 1, + child: InkWell( + child: Card( + color: model.finalProducts[index] + .discountName != + null + ? Color(0xffFFFF00) + : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), ), - top: BorderSide( - color: Colors.grey.shade300, - width: 1, + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, ), - ), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(110.0), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, ), - color: Colors.white, - ), - padding: EdgeInsets.symmetric( - horizontal: 0), - width: MediaQuery.of(context) - .size - .width / - 3, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Container( - margin: EdgeInsets.fromLTRB( - 0, 16, 0, 0), - alignment: Alignment.center, - child: Image.network( - model.finalProducts[index] - .images.isNotEmpty - ? model - .finalProducts[ - index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.cover, - height: 80, - ), - ), - Container( - width: model + padding: EdgeInsets.symmetric( + horizontal: 0), + width: MediaQuery.of(context) + .size + .width / + 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + margin: + EdgeInsets.fromLTRB( + 0, 16, 0, 0), + alignment: + Alignment.center, + child: Image.network( + model .finalProducts[ index] - .rxMessage != - null - ? MediaQuery.of(context) - .size - .width / - 2.8 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular(6)), + .images + .isNotEmpty + ? model + .finalProducts[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), ), - child: Texts( - model.finalProducts[index] + Container( + width: model + .finalProducts[ + index] .rxMessage != null - ? model - .finalProducts[ - index] - .rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w600, + ? MediaQuery.of( + context) + .size + .width / + 2.8 + : 0, + padding: + EdgeInsets.all(4), + decoration: BoxDecoration( + color: + Color(0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular( + 6)), + ), + child: Texts( + model + .finalProducts[ + index] + .rxMessage != + null + ? model + .finalProducts[ + index] + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w600, + ), ), - ), - ], - ), - Container( - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, + ], ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - if (model + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + if (model + .finalProducts[ + index] + .discountName != + null) + Container( + width: + double.infinity, + height: 13.0, + decoration: + BoxDecoration( + color: Color( + 0xff5AB145), + ), + child: Center( + child: Texts( + model + .finalProducts[ + index] + .discountName, + regular: true, + color: + Colors.white, + fontSize: 10.4, + ), + ), + ), + Texts( + model .finalProducts[ index] - .discountName != - null) - Container( - width: double.infinity, - height: 13.0, - decoration: - BoxDecoration( - color: - Color(0xff5AB145), - ), - child: Center( - child: Texts( - model - .finalProducts[ - index] - .discountName, - regular: true, - color: Colors.white, - fontSize: 10.4, - ), + .name, + regular: true, + fontSize: 12, + fontWeight: + FontWeight.w400, + ), + Padding( + padding: + const EdgeInsets + .only( + top: 4, + bottom: 4), + child: Texts( + "SAR ${model.finalProducts[index].price}", + bold: true, + fontSize: 14, ), ), - Texts( - model.finalProducts[index] - .name, - regular: true, - fontSize: 12, - fontWeight: - FontWeight.w400, - ), - Padding( - padding: - const EdgeInsets.only( - top: 4, - bottom: 4), - child: Texts( - "SAR ${model.finalProducts[index].price}", - bold: true, - fontSize: 14, + Row( + children: [ + StarRating( + totalAverage: model + .finalProducts[ + index] + .approvedRatingSum > + 0 + ? (model.finalProducts[index].approvedRatingSum + .toDouble() / + model + .finalProducts[index] + .approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${model.finalProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ) + ], ), - ), - Row( - children: [ - StarRating( - totalAverage: model - .finalProducts[ - index] - .approvedRatingSum > - 0 - ? (model.finalProducts[index].approvedRatingSum - .toDouble() / - model - .finalProducts[index] - .approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: true), - Texts( - "(${model.finalProducts[index].approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ) - ], - ), - ], + ], + ), ), - ), - ], + ], + ), ), ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage( + model.finalProducts[index]), + )), + }, )); }, ), @@ -316,158 +360,186 @@ class _FinalProductsPageState extends State { itemCount: model.finalProducts.length, itemBuilder: (BuildContext context, int index) { - return Card( - child: Row( - children: [ - Stack( - children: [ - Column( - children: [ - Container( - decoration: BoxDecoration(), - child: Padding( - padding: EdgeInsets.only( - left: 9.0, - top: 8.0, - right: 10.0, + return InkWell( + child: Card( + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + Container( + decoration: + BoxDecoration(), + child: Padding( + padding: + EdgeInsets.only( + left: 9.0, + top: 8.0, + right: 10.0, + ), ), ), - ), - Container( - margin: EdgeInsets.fromLTRB( - 0, 0, 0, 0), - alignment: Alignment.center, - child: Image.network( - model.finalProducts[index] - .images.isNotEmpty - ? model - .finalProducts[ - index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.contain, - height: 80, + Container( + margin: + EdgeInsets.fromLTRB( + 0, 0, 0, 0), + alignment: + Alignment.center, + child: Image.network( + model + .finalProducts[ + index] + .images + .isNotEmpty + ? model + .finalProducts[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.contain, + height: 80, + ), ), - ), - ], + ], + ), + Column( + children: [ + Container( + width: model + .finalProducts[ + index] + .rxMessage != + null + ? MediaQuery.of( + context) + .size + .width / + 3.5 + : 0, + padding: + EdgeInsets.all(4), + decoration: BoxDecoration( + color: + Color(0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular( + 6)), + ), + child: Texts( + model + .finalProducts[ + index] + .rxMessage != + null + ? model + .finalProducts[ + index] + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w600, + ), + ), + ], + ), + ], + ), + Container( + height: 100.0, + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, ), - Column( + child: Column( + mainAxisAlignment: + MainAxisAlignment + .spaceAround, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ + SizedBox( + height: 4.0, + ), Container( - width: model - .finalProducts[ - index] - .rxMessage != - null - ? MediaQuery.of(context) + width: + MediaQuery.of(context) .size - .width / - 3.5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular(6)), - ), + .width * + 0.65, child: Texts( model.finalProducts[index] - .rxMessage != - null - ? model - .finalProducts[ - index] - .rxMessage - : "", - color: Colors.white, + .name, regular: true, - fontSize: 10, + fontSize: 13.2, fontWeight: - FontWeight.w600, + FontWeight.w500, + maxLines: 5, ), ), - ], - ), - ], - ), - Container( - height: 100.0, - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - SizedBox( - height: 4.0, - ), - Container( - height: 35.0, - width: 250.0, - child: Texts( - model.finalProducts[index] - .name, - regular: true, - fontSize: 13.2, - fontWeight: FontWeight.w500, - maxLines: 2, + SizedBox( + height: 8.0, ), - ), - SizedBox( - height: 8.0, - ), - Padding( - padding: - const EdgeInsets.only( - top: 4, bottom: 4), - child: Texts( - "SAR ${model.finalProducts[index].price}", - bold: true, - fontSize: 14, + Padding( + padding: + const EdgeInsets.only( + top: 4, bottom: 4), + child: Texts( + "SAR ${model.finalProducts[index].price}", + bold: true, + fontSize: 14, + ), ), - ), - Row( - children: [ - StarRating( - totalAverage: model - .finalProducts[ - index] - .approvedRatingSum > - 0 - ? (model - .finalProducts[ - index] - .approvedRatingSum - .toDouble() / - model - .finalProducts[ - index] - .approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: true), - Texts( - "(${model.finalProducts[index].approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ) - ], - ), - ], + Row( + children: [ + StarRating( + totalAverage: model + .finalProducts[ + index] + .approvedRatingSum > + 0 + ? (model + .finalProducts[ + index] + .approvedRatingSum + .toDouble() / + model + .finalProducts[ + index] + .approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${model.finalProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ) + ], + ), + ], + ), ), - ), - ], + ], + ), ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage( + model.finalProducts[index]), + )), + }, ); }), ), diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart index 42efc179..da66c572 100644 --- a/lib/pages/insurance/insurance_card_screen.dart +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -109,58 +109,92 @@ class _InsuranceCardState extends State { ), Column( crossAxisAlignment: - CrossAxisAlignment.stretch, + CrossAxisAlignment.start, children: [ - Texts( - TranslationBase.of(context).category +": "+ - model.insurance[index] - .subCategoryDesc, - fontSize: 18.5, + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context) + .category, + fontSize: 18.5), + Texts( + model.insurance[index] + .subCategoryDesc, + fontSize: 18.5) + ], ), Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Texts( - TranslationBase.of(context) - .expirationDate +": "+ - convertDateFormat(model - .insurance[index].cardValidTo), - fontSize: 18.5, - ), - Expanded( - child: Column( - children: [ - model.insurance[index].isActive == true - ? Texts( - TranslationBase.of(context) - .activeInsurence, - color: Colors.green, - fontWeight: FontWeight.w900, - fontSize: 17.9) - : Texts( - TranslationBase.of(context) - .notActive, - color: Colors.red, - fontWeight: FontWeight.w900, - fontSize: 17.9) - ], - ), - ), + TranslationBase.of(context) + .expirationDate, + fontSize: 18.5), + Texts( + convertDateFormat( + model.insurance[index] + .cardValidTo, + ), + fontSize: 18.5), ], ), - Texts( - TranslationBase.of(context) - .patientCard +": "+ - model - .insurance[index].patientCardID, - fontSize: 18.5, + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context) + .status + + ": ", + fontSize: 18.5), + model.insurance[index].isActive == + true + ? Texts( + TranslationBase.of(context) + .activeInsurence, + color: Colors.green, + fontWeight: FontWeight.w900, + fontSize: 17.9) + : Texts( + TranslationBase.of(context) + .notActive, + color: Colors.red, + fontWeight: FontWeight.w900, + fontSize: 17.9) + ], ), - Texts( - TranslationBase.of(context) - .policyNumber +" "+ - model.insurance[index] - .insurancePolicyNumber, - fontSize: 18.5, + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context) + .patientCard, + fontSize: 18.5), + Texts( + model.insurance[index] + .patientCardID, + fontSize: 18.5) + ], ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context) + .policyNumber, + fontSize: 18.5, + ), + Texts( + model.insurance[index] + .insurancePolicyNumber, + fontSize: 18.5, + ) + ]), ], ), SizedBox( diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 94ebbc06..ef38ae9c 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -1,8 +1,9 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; @@ -12,8 +13,8 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -36,6 +37,9 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -43,6 +47,7 @@ class _HomePageState extends State { onModelReady: (model) => model.getPatientRadOrders(), builder: (_, model, wi) => AppScaffold( isShowDecPage: false, + isHelp: true, body: Container( width: double.infinity, child: SingleChildScrollView( @@ -70,7 +75,7 @@ class _HomePageState extends State { right: 5, child: Container( width: - MediaQuery.of(context).size.width * 0.8, + MediaQuery.of(context).size.width * 0.8, child: Row( children: [ Expanded( @@ -85,54 +90,82 @@ class _HomePageState extends State { fit: BoxFit.fill, ), color: - Colors.white.withOpacity(0.3), + Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all( Radius.circular(5))), child: Container( - child: Column( children: [ - Texts(TranslationBase.of(context).covidTest, - color: Colors.white, - fontWeight: FontWeight.w700, - ), + Texts( + TranslationBase.of(context) + .covidTest, + color: Colors.white, + fontWeight: FontWeight.w700, + ), Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: + MainAxisAlignment + .spaceAround, children: [ Container( margin: EdgeInsets.only( - top: 15.0,), + top: 15.0, + ), child: SvgPicture.asset( 'assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0), ), Container( - margin: EdgeInsets.only(top: 5.0), + margin: EdgeInsets.only( + top: 5.0), child: Column( children: [ - Texts(TranslationBase.of(context).driveThru, - fontWeight: FontWeight.w700, - color: Colors.white,), + Texts( + TranslationBase.of( + context) + .driveThru, + fontWeight: + FontWeight.w700, + color: Colors.white, + ), ButtonTheme( - shape: RoundedRectangleBorder( + shape: + RoundedRectangleBorder( borderRadius: - BorderRadius.circular(5.0),), - minWidth: MediaQuery.of(context).size.width * 0.15, + BorderRadius + .circular( + 5.0), + ), + minWidth: MediaQuery.of( + context) + .size + .width * + 0.15, height: 25.0, child: RaisedButton( - color: Colors.red[800], - textColor: Colors.white, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), + color: Colors + .red[800], + textColor: + Colors.white, + disabledTextColor: + Colors.white, + disabledColor: + new Color( + 0xFFbcc2c4), onPressed: () { navigateToCovidDriveThru(); }, child: Texts( - TranslationBase.of(context).bookNow, - fontWeight: FontWeight.w700, - color: Colors.white, - ), + TranslationBase.of( + context) + .bookNow, + fontWeight: + FontWeight + .w700, + color: Colors + .white, + ), ), ), ], @@ -173,245 +206,260 @@ class _HomePageState extends State { ], ), ), - Container(width: double.infinity, height:projectViewModel.isArabic ?110: 80) + Container( + width: double.infinity, + height: projectViewModel.isArabic ? 110 : 80) ], ), Positioned( top: 155, left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == - Orientation.landscape + Orientation.landscape ? 0.02 : 0.03), right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == - Orientation.landscape + Orientation.landscape ? 0.02 : 0.03), child: (!model.isLogin) ? Container( - width: double.infinity, - height: 125, - decoration: BoxDecoration( - color: HexColor('#A59E9E'), - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, width: 0.5), - borderRadius: - BorderRadius.all(Radius.circular(9)), - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/bg_graphic.png'), - fit: BoxFit.cover)), - child: Container( - margin: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 2, - ), - Texts( - TranslationBase.of(context).myMedicalFile, - color: Colors.black87, - fontWeight: FontWeight.w700, - fontSize: 23, - ), - - Texts( - TranslationBase.of(context) - .myMedicalFileSubTitle, - color: Colors.black, - fontSize: 16, - ), - Align( - alignment: projectViewModel.isArabic - ? Alignment.bottomLeft - : Alignment.bottomRight, - child: InkWell( - onTap: () { - widget.goToMyProfile(); - }, - child: Container( - margin: EdgeInsets.only(left: 15,right: 15), - width: 90, - height: 30, - decoration: BoxDecoration( - color: HexColor('#D81A2E'), - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, - width: 0.5), - borderRadius: BorderRadius.all( - Radius.circular(0)), + width: double.infinity, + height: 125, + decoration: BoxDecoration( + color: HexColor('#A59E9E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, width: 0.5), + borderRadius: + BorderRadius.all(Radius.circular(9)), + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/bg_graphic.png'), + fit: BoxFit.cover)), + child: Container( + margin: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, ), - child: Center( - child: Texts( - TranslationBase.of(context).viewMore, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: 12, - ), + Texts( + TranslationBase.of(context).myMedicalFile, + color: Colors.black87, + fontWeight: FontWeight.w700, + fontSize: 23, ), - ), - ), - ) - ], - ), - ), - ) - : Container( - width: double.infinity, - height: projectViewModel.isArabic ? 160:130, - decoration: BoxDecoration( - color: HexColor('#A59E9E'), - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, width: 0.5), - borderRadius: - BorderRadius.all(Radius.circular(9)), - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/bg_graphic.png'), - fit: BoxFit.cover), - ), - child: Container( - margin: EdgeInsets.all(5), - child: Column( - children: [ - Row( - children: [ - if (projectViewModel.user != null && model.isLogin) - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - SizedBox( - height: 8, - ), - Texts( - model.user.firstName + - " " + - model.user.lastName, - color: Colors.grey[100], - bold: true, - fontSize: 15, - ), - Texts( - '${model.user.patientID}', - color: Colors.white, - fontSize: 14, - ), - SizedBox( - height: 5, + Texts( + TranslationBase.of(context) + .myMedicalFileSubTitle, + color: Colors.black, + fontSize: 16, + ), + Align( + alignment: projectViewModel.isArabic + ? Alignment.bottomLeft + : Alignment.bottomRight, + child: InkWell( + onTap: () { + widget.goToMyProfile(); + }, + child: Container( + margin: EdgeInsets.only( + left: 15, right: 15), + width: 90, + height: 30, + decoration: BoxDecoration( + color: HexColor('#D81A2E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(0)), ), - Texts( - '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}', - color: Colors.grey[100], - fontWeight: FontWeight.normal, - fontSize: 14, + child: Center( + child: Texts( + TranslationBase.of(context) + .viewMore, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: 12, + ), ), - ], - ), - ), - InkWell( - onTap: () { - widget.goToMyProfile(); - }, - child: Container( - margin: EdgeInsets.all(2), - width: 90, - height: 30, - decoration: BoxDecoration( - color: HexColor('#D81A2E'), - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, - width: 0.5), - borderRadius: BorderRadius.all( - Radius.circular(5), - ), - ), - child: Center( - child: Texts( - TranslationBase.of(context) - .viewMore, - color: Colors.white, - fontSize: 12, ), ), - ), - ) - ], + ) + ], + ), ), - Row( - children: [ - Expanded( - child: Row( + ) + : Container( + width: double.infinity, + height: projectViewModel.isArabic ? 160 : 130, + decoration: BoxDecoration( + color: HexColor('#A59E9E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, width: 0.5), + borderRadius: + BorderRadius.all(Radius.circular(9)), + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/bg_graphic.png'), + fit: BoxFit.cover), + ), + child: Container( + margin: EdgeInsets.all(5), + child: Column( + children: [ + Row( children: [ - Image.asset( - 'assets/images/height_icon.png', - width: 35, - height: 40, - ), - Texts( - "${model.heightCm}", - color: Colors.white, - fontSize: 17, + if (projectViewModel.user != null && + model.isLogin) + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + Row( + children: [ + Texts( + model.user.firstName + + " " + + model.user.lastName, + color: Colors.grey[100], + bold: true, + fontSize: 15, + ), + Container( + margin: + EdgeInsets.fromLTRB( + 8.0, + 0.0, + 8.0, + 0.0), + child: SvgPicture.asset( + "assets/images/new-design/verification_check.svg"), + ), + ], + ), + Texts( + '${model.user.patientID}', + color: Colors.white, + fontSize: 14, + ), + SizedBox( + height: 5, + ), + Texts( + '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}', + color: Colors.grey[100], + fontWeight: FontWeight.normal, + fontSize: 14, + ), + ], + ), + ), + InkWell( + onTap: () { + widget.goToMyProfile(); + }, + child: Container( + margin: EdgeInsets.all(2), + width: 90, + height: 30, + decoration: BoxDecoration( + color: HexColor('#D81A2E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + ), + child: Center( + child: Texts( + TranslationBase.of(context) + .viewMore, + color: Colors.white, + fontSize: 12, + ), + ), + ), ) ], ), - ), - SizedBox( - width: 3, - ), - Expanded( - child: Row( + Row( children: [ - Image.asset( - 'assets/images/weight_icon.png', - width: 25, - height: 40, + Expanded( + child: Row( + children: [ + Image.asset( + 'assets/images/height_icon.png', + width: 35, + height: 40, + ), + Texts( + "${model.heightCm}", + color: Colors.white, + fontSize: 17, + ) + ], + ), ), - Texts( - '${model.weightKg}', - color: Colors.white, - fontSize: 17 - ) - ], - ), - ), - SizedBox( - width: 3, - ), - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Image.asset( - 'assets/images/blood_icon.png', - width: 35, - height: 40, + SizedBox( + width: 3, + ), + Expanded( + child: Row( + children: [ + Image.asset( + 'assets/images/weight_icon.png', + width: 25, + height: 40, + ), + Texts('${model.weightKg}', + color: Colors.white, + fontSize: 17) + ], + ), + ), + SizedBox( + width: 3, + ), + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Image.asset( + 'assets/images/blood_icon.png', + width: 35, + height: 40, + ), + Texts( + '${model.booldType}', + color: Colors.white, + ) + ], + ), ), - Texts( - '${model.booldType}', - color: Colors.white, - ) ], - ), - ), - ], - ) - ], - ), - ), - ), + ) + ], + ), + ), + ), ), ], ), - Padding( padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15), child: InkWell( @@ -427,9 +475,9 @@ class _HomePageState extends State { padding: const EdgeInsets.all(8), child: Row( children: [ - Text( + Texts( TranslationBase.of(context).offerAndPackages, - style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.normal), + color: Colors.white, fontSize: 20, fontWeight: FontWeight.normal, ), Spacer(), Image.asset("assets/images/offer_icon.png"), @@ -439,13 +487,15 @@ class _HomePageState extends State { ), ), ), - if(projectViewModel.havePrivilege(64)||projectViewModel.havePrivilege(65)||projectViewModel.havePrivilege(67)) + if (projectViewModel.havePrivilege(64) || + projectViewModel.havePrivilege(65) || + projectViewModel.havePrivilege(67)) Container( margin: EdgeInsets.only(left: 15, right: 15), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - if(projectViewModel.havePrivilege(64)) + if (projectViewModel.havePrivilege(64)) DashboardItem( onTap: () { Navigator.push( @@ -469,11 +519,13 @@ class _HomePageState extends State { height: 10, ), Texts( - TranslationBase.of(context).homeHealthCare, + TranslationBase.of(context) + .homeHealthCare, textAlign: TextAlign.center, color: Colors.white, fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.55, + fontSize: + SizeConfig.textMultiplier * 1.55, ) ], ), @@ -483,10 +535,9 @@ class _HomePageState extends State { imageName: 'home_healthcare_service_bg.png', opacity: 0.5, ), - if(projectViewModel.havePrivilege(65)) + if (projectViewModel.havePrivilege(65)) DashboardItem( - onTap: () => Navigator.push(context, FadePage(page: LandingPagePharmacy())), - + onTap: () => getPharmacyToken(model), child: Center( child: Padding( padding: const EdgeInsets.all(15.0), @@ -501,11 +552,13 @@ class _HomePageState extends State { height: 20, ), Texts( - TranslationBase.of(context).onlinePharmacy, + TranslationBase.of(context) + .onlinePharmacy, textAlign: TextAlign.center, color: Colors.white, fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.55, + fontSize: + SizeConfig.textMultiplier * 1.55, ) ], ), @@ -514,9 +567,9 @@ class _HomePageState extends State { height: MediaQuery.of(context).size.width * 0.4, imageName: 'al-habib_onlne_pharmacy_bg.png', ), - if(projectViewModel.havePrivilege(67)) + if (projectViewModel.havePrivilege(67)) DashboardItem( - onTap: (){ + onTap: () { Navigator.push( context, FadePage( @@ -535,14 +588,15 @@ class _HomePageState extends State { height: 50, ), SizedBox( - height:10, + height: 10, ), Texts( TranslationBase.of(context).cmcHeading, textAlign: TextAlign.center, color: Colors.white, fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.55, + fontSize: + SizeConfig.textMultiplier * 1.55, ) ], ), @@ -630,7 +684,7 @@ class _HomePageState extends State { borderRadius: BorderRadius.circular(6.0), color: Colors.white, )), - if(projectViewModel.havePrivilege(60)) + if (projectViewModel.havePrivilege(60)) Container( width: MediaQuery.of(context).size.width * 0.29, child: InkWell( @@ -638,8 +692,8 @@ class _HomePageState extends State { context, FadePage( page: ErOptions( - isAppbar: true, - ))), + isAppbar: true, + ))), child: Center( child: Padding( padding: const EdgeInsets.all(15.0), @@ -659,7 +713,8 @@ class _HomePageState extends State { textAlign: TextAlign.center, color: Colors.black87, bold: false, - fontSize: SizeConfig.textMultiplier * 1.7, + fontSize: + SizeConfig.textMultiplier * 1.7, ) ], ), @@ -777,24 +832,42 @@ class _HomePageState extends State { ); } + getPharmacyToken(DashboardViewModel model) async { + if(!model.isLogin) { + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } else { + GifLoaderDialogUtils.showMyDialog(context); + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (pharmacyModuleViewModel.error.isNotEmpty) { + await pharmacyModuleViewModel.createUser().then((value) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } + }); + } + } + navigateToCovidDriveThru() { - Navigator.push(context, - MaterialPageRoute(builder: (context) => CovidDrivethruLocation())); + Navigator.push(context, FadePage(page: CovidDrivethruLocation())); } } class DashboardItem extends StatelessWidget { const DashboardItem( {this.hasBorder = false, - this.imageName, - @required this.child, - this.onTap, - Key key, - this.width, - this.height, - this.color, - this.opacity = 0.4, - this.hasColorFilter = true}) + this.imageName, + @required this.child, + this.onTap, + Key key, + this.width, + this.height, + this.color, + this.opacity = 0.4, + this.hasColorFilter = true}) : super(key: key); final bool hasBorder; final String imageName; @@ -812,14 +885,16 @@ class DashboardItem extends StatelessWidget { onTap: onTap, child: Container( width: width != null ? width : MediaQuery.of(context).size.width * 0.29, - height: height != null ? height : MediaQuery.of(context).orientation == Orientation.portrait - ? MediaQuery.of(context).size.height * 0.17 - : MediaQuery.of(context).size.height * 0.35, + height: height != null + ? height + : MediaQuery.of(context).orientation == Orientation.portrait + ? MediaQuery.of(context).size.height * 0.17 + : MediaQuery.of(context).size.height * 0.35, decoration: BoxDecoration( color: !hasBorder ? color != null - ? color - : HexColor('#050705').withOpacity(opacity) + ? color + : HexColor('#050705').withOpacity(opacity) : Colors.white, borderRadius: BorderRadius.circular(6.0), border: hasBorder @@ -827,11 +902,13 @@ class DashboardItem extends StatelessWidget { : Border.all(width: 0.0, color: Colors.transparent), image: imageName != null ? DecorationImage( - image: ExactAssetImage('assets/images/$imageName'), - fit: BoxFit.cover, - colorFilter: hasColorFilter ? new ColorFilter.mode( - Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, - ) + image: ExactAssetImage('assets/images/$imageName'), + fit: BoxFit.cover, + colorFilter: hasColorFilter + ? new ColorFilter.mode( + Colors.black.withOpacity(0.2), BlendMode.dstIn) + : null, + ) : null, ), child: Center( diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index e63df76c..c99930aa 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -61,8 +61,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { var themeNotifier; ///inject the user data - AuthenticatedUserObject authenticatedUserObject = locator< - AuthenticatedUserObject>(); + AuthenticatedUserObject authenticatedUserObject = + locator(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final authService = new AuthProvider(); @@ -72,12 +72,12 @@ class _LandingPageState extends State with WidgetsBindingObserver { void _requestIOSPermissions() { flutterLocalNotificationsPlugin .resolvePlatformSpecificImplementation< - IOSFlutterLocalNotificationsPlugin>() + IOSFlutterLocalNotificationsPlugin>() ?.requestPermissions( - alert: true, - badge: true, - sound: true, - ); + alert: true, + badge: true, + sound: true, + ); } bool isPageNavigated = false; @@ -86,7 +86,12 @@ class _LandingPageState extends State with WidgetsBindingObserver { _changeCurrentTab(int tab) { setState(() { currentTab = tab; - pageController.jumpToPage(tab); + if (tab != 0) + pageController.jumpToPage(tab); + else { + IS_VOICE_COMMAND_CLOSED = false; + pageController.jumpToPage(tab); + } }); } @@ -110,10 +115,9 @@ class _LandingPageState extends State with WidgetsBindingObserver { if (!isPageNavigated) { isPageNavigated = true; Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - IncomingCall( + context, + MaterialPageRoute( + builder: (context) => IncomingCall( incomingCallData: LandingPage.incomingCallData))) .then((value) { isPageNavigated = false; @@ -149,16 +153,18 @@ class _LandingPageState extends State with WidgetsBindingObserver { pageController = PageController(keepPage: true); _firebaseMessaging.setAutoInitEnabled(true); + locationUtils = + new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance + .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] HMGNetworkConnectivity(context, () { GifLoaderDialogUtils.showMyDialog(context); - PlatformBridge().connectHMGGuestWifi().then((value) => - { - GifLoaderDialogUtils.hideDialog(context) - }); + PlatformBridge() + .connectHMGGuestWifi() + .then((value) => {GifLoaderDialogUtils.hideDialog(context)}); }).checkAndConnectIfNoInternet(); - if (Platform.isIOS) { _firebaseMessaging.requestNotificationPermissions(); } @@ -174,12 +180,12 @@ class _LandingPageState extends State with WidgetsBindingObserver { checkUserStatus(token); } }); - if (results[Permission.location].isGranted); - if (results[Permission.storage].isGranted); - if (results[Permission.camera].isGranted); - if (results[Permission.photos].isGranted); - if (results[Permission.accessMediaLocation].isGranted); - if (results[Permission.calendar].isGranted); + if (results[Permission.location].isGranted) ; + if (results[Permission.storage].isGranted) ; + if (results[Permission.camera].isGranted) ; + if (results[Permission.photos].isGranted) ; + if (results[Permission.accessMediaLocation].isGranted) ; + // if (results[Permission.calendar].isGranted) ; }); requestPermissions(); // }); @@ -305,12 +311,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { ConfirmDialog dialog = new ConfirmDialog( context: context, confirmMessage: message, - okText: TranslationBase - .of(context) - .confirm, - cancelText: TranslationBase - .of(context) - .cancel_nocaps, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => {}, cancelFunction: () => {}); dialog.showAlertDialog(context); @@ -325,59 +327,18 @@ class _LandingPageState extends State with WidgetsBindingObserver { Permission.photos, Permission.notification, Permission.accessMediaLocation, - Permission.calendar, + // Permission.calendar, Permission.activityRecognition ].request(); - var permissionsGranted = await deviceCalendarPlugin.hasPermissions(); - if (permissionsGranted.isSuccess && !permissionsGranted.data) { - permissionsGranted = await deviceCalendarPlugin.requestPermissions(); - if (!permissionsGranted.isSuccess || !permissionsGranted.data) {} - } + // var permissionsGranted = await deviceCalendarPlugin.hasPermissions(); + // if (permissionsGranted.isSuccess && !permissionsGranted.data) { + // permissionsGranted = await deviceCalendarPlugin.requestPermissions(); + // if (!permissionsGranted.isSuccess || !permissionsGranted.data) {} + // } return permissionResults; } - setTheme() async { - // - // defaultTheme = - // ThemeData( - // fontFamily:projectViewModel.isArabic ? 'Cairo' : 'WorkSans', - // primarySwatch: Colors.blue, - // visualDensity: VisualDensity.adaptivePlatformDensity, - // brightness: Brightness.light, - // pageTransitionsTheme: const PageTransitionsTheme( - // builders: { - // TargetPlatform.android: ZoomPageTransitionsBuilder(), - // TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), - // }, - // ), - // hintColor: Colors.grey[400], - // disabledColor: Colors.grey[300], - // errorColor: Color.fromRGBO(235, 80, 60, 1.0), - // scaffoldBackgroundColor: Color(0xffEEEEEE), - // textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), - // textSelectionHandleColor: Colors.grey, - // canvasColor: Colors.white, - // backgroundColor: Colors.white, - // highlightColor: Colors.grey[100].withOpacity(0.4), - // splashColor: Colors.transparent, - // primaryColor: Color(0xff40ACC9), - // bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), - // cursorColor: Colors.grey, - // cardColor: Colors.white, - // iconTheme: IconThemeData(), - // appBarTheme: AppBarTheme( - // color: Color(0xff40ACC9), - // brightness: Brightness.dark, - // elevation: 10.0, - // actionsIconTheme: IconThemeData( - // color: Color(0xff40ACC9), - // ), - // ), - // ); - // themeNotifier.setTheme(defaultTheme); - } - static Future myBackgroundMessageHandler( Map message) async { Map myMap = new Map.from(message['data']); @@ -414,8 +375,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { void doIt() { getUserInformation().then((value) { - if (value != null) projectViewModel.platformBridge() - .registerHmgGeofences(); + if (value != null) + projectViewModel.platformBridge().registerHmgGeofences(); }); } @@ -428,7 +389,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { } }); } - } login() async { @@ -462,31 +422,29 @@ class _LandingPageState extends State with WidgetsBindingObserver { getNotificationCount(token) async { if (await sharedPref.getObject(USER_PROFILE) != null) { var data = - AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); if (data != null) { authService .registeredAuthenticatedUser(data, token, 0, 0) .then((res) => {print(res)}); - authService.getDashboard().then((value) => - { - setState(() { - notificationCount = value['List_PatientDashboard'][0] - ['UnreadPatientNotificationCount'] > - 99 - ? '99+' - : value['List_PatientDashboard'][0] - ['UnreadPatientNotificationCount'] - .toString(); - - sharedPref.setString(NOTIFICATION_COUNT, notificationCount); - }) - }); + authService.getDashboard().then((value) => { + setState(() { + notificationCount = value['List_PatientDashboard'][0] + ['UnreadPatientNotificationCount'] > + 99 + ? '99+' + : value['List_PatientDashboard'][0] + ['UnreadPatientNotificationCount'] + .toString(); + + sharedPref.setString(NOTIFICATION_COUNT, notificationCount); + }) + }); familyFileProvider.getSharedRecordByStatus(); } } } - @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); @@ -496,13 +454,14 @@ class _LandingPageState extends State with WidgetsBindingObserver { elevation: 0, textTheme: TextTheme( headline6: TextStyle( - color: Colors.white, fontWeight: FontWeight.bold), + color: Theme.of(context).textTheme.headline1.color, + fontWeight: FontWeight.bold), ), title: Text( getText(currentTab).toUpperCase(), style: TextStyle( fontWeight: FontWeight.bold, - color: Colors.white, + color: Theme.of(context).textTheme.headline1.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), // bold: true, // color: Colors.white, @@ -511,35 +470,47 @@ class _LandingPageState extends State with WidgetsBindingObserver { builder: (BuildContext context) { return new Stack( children: [ - IconButton( - icon: Icon(Icons.menu), - color: Colors.white, - onPressed: () => Scaffold.of(context).openDrawer(), - ), + currentTab == 0 + ? IconButton( + icon: Icon(Icons.menu), + color: Theme.of(context).textTheme.headline1.color, + onPressed: () => Scaffold.of(context).openDrawer(), + ) + : IconButton( + icon: Icon(Icons.arrow_back), + color: Theme.of(context).textTheme.headline1.color, + onPressed: () { + setState(() { + currentTab = 0; + }); + + pageController.jumpToPage(0); + }, + ), notificationCount != '' ? new Positioned( - right: projectViewModel.isArabic ? 35 : 0, - top: 5, - child: new Container( - padding: EdgeInsets.all(4), - decoration: new BoxDecoration( - color: Colors.red, - borderRadius: BorderRadius.circular(20), - ), - constraints: BoxConstraints( - minWidth: 20, - minHeight: 20, - ), - child: new Text( - notificationCount, - style: new TextStyle( - color: Colors.white, - fontSize: projectViewModel.isArabic ? 8 : 9, - ), - textAlign: TextAlign.center, - ), - ), - ) + right: projectViewModel.isArabic ? 35 : 0, + top: 5, + child: new Container( + padding: EdgeInsets.all(4), + decoration: new BoxDecoration( + color: Colors.red, + borderRadius: BorderRadius.circular(20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: new Text( + notificationCount, + style: new TextStyle( + color: Colors.white, + fontSize: projectViewModel.isArabic ? 8 : 9, + ), + textAlign: TextAlign.center, + ), + ), + ) : SizedBox() ], ); @@ -550,7 +521,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { //iconSize: 70, icon: Icon( projectViewModel.isLogin ? Icons.settings : Icons.login, - color: Colors.white, + color: Theme.of(context).textTheme.headline1.color, ), onPressed: () { if (projectViewModel.isLogin) @@ -572,7 +543,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { children: [ HomePage( goToMyProfile: () { - _changeCurrentTab(1); + _changeCurrentTab(0); }, ), MedicalProfilePage(), @@ -586,13 +557,14 @@ class _LandingPageState extends State with WidgetsBindingObserver { index: currentTab, ), floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, - floatingActionButton: currentTab == 0 - ? FloatingButton( - elevation: true, - onTap: () { - _changeCurrentTab(2); - }) - : null); + floatingActionButton: + (projectViewModel.havePrivilege(34) && currentTab == 0) + ? FloatingButton( + elevation: true, + onTap: () { + _changeCurrentTab(2); + }) + : null); } triggerRobot() { @@ -607,7 +579,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { return TranslationBase.of(context).medicalProfile; case 2: return TranslationBase.of(context).bookAppo; - case 5: + case 5: return TranslationBase.of(context).bookAppo; case 3: return TranslationBase.of(context).services; @@ -616,27 +588,27 @@ class _LandingPageState extends State with WidgetsBindingObserver { } } - void checkUserStatus(token, {isLoader = true}) async { - if (isLoader) - //GifLoaderDialogUtils.showMyDialog(context); - authService - .selectDeviceImei(token) - .then((SelectDeviceIMEIRES value) => setUserValues(value)) - .catchError((err) { - //GifLoaderDialogUtils.hideDialog(context); - }); - - // if (await sharedPref.getObject(USER_PROFILE) != null) { - // var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); - // if (data != null) { - // authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)}); - // authService.getDashboard().then((value) => { - // setState(() { - // notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); - // }) - // }); - // } - // } + void checkUserStatus(token) async { + authService + .selectDeviceImei(token) + .then((SelectDeviceIMEIRES value) => setUserValues(value)); + if (projectViewModel.isLoading == true) { + var data = + AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + if (data != null) { + authService + .registeredAuthenticatedUser(data, token, 0, 0) + .then((res) => {print(res)}); + authService.getDashboard().then((value) => { + setState(() { + if (value != null) { + notificationCount = value['List_PatientDashboard'][0] + ['UnreadPatientNotificationCount'] + .toString(); + } + }) + }); + } + } } - } diff --git a/lib/pages/landing/landing_page_pharmcy.dart b/lib/pages/landing/landing_page_pharmcy.dart index 3a46f45c..04c9bb54 100644 --- a/lib/pages/landing/landing_page_pharmcy.dart +++ b/lib/pages/landing/landing_page_pharmcy.dart @@ -1,28 +1,22 @@ -import 'dart:convert'; - -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:barcode_scan_fix/barcode_scan.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/parent_categorise_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/medicine_search_screen.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/wishlist.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/profile/profile.dart'; import 'package:diplomaticquarterapp/pages/pharmacy_categorise.dart'; import 'package:diplomaticquarterapp/pages/search_products_page.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/widgets/pharmacy/bottom_nav_pharmacy_bar.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/wishlist.dart'; class LandingPagePharmacy extends StatefulWidget { @override @@ -49,78 +43,73 @@ class _LandingPagePharmacyState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: - - // currentTab == 0 || currentTab == 1 || currentTab == 2 - // ? - - AppBar( - backgroundColor: Color(0xff5AB145), - elevation: 0, - title: Container( - height: MediaQuery.of(context).size.height * 0.056, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5.0), - color: Colors.white, - ), - child: InkWell( - child: Padding( - padding: EdgeInsets.all(8.0), - child: Row( - //crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Icon(Icons.search, size: 25.0), - SizedBox( - width: 15.0, + appBar: currentTab != 4 + ? AppBar( + backgroundColor: Color(0xff5AB145), + elevation: 0, + title: Container( + height: MediaQuery.of(context).size.height * 0.056, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5.0), + color: Colors.white, + ), + child: InkWell( + child: Padding( + padding: EdgeInsets.all(8.0), + child: Row( + //crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon(Icons.search, size: 25.0), + SizedBox( + width: 15.0, + ), + Texts( + TranslationBase.of(context).searchProductHere, + fontSize: 13, + ) + ], + ), ), - Texts( - TranslationBase.of(context).searchProductHere, - fontSize: 13, - ) - ], - ), - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => SearchProductsPage()), - ); - }, - ), - ), - leading: Builder( - builder: (BuildContext context) { - return InkWell( - onTap: () { - setState(() { - currentTab = 0; - pageController.jumpToPage(0); - }); - }, - child: Container( - height: 2.0, - width: 10.0, - child: Image.asset( - 'assets/images/pharmacy_logo.png', + onTap: () { + Navigator.push( + context, + FadePage(page: SearchProductsPage()), + ); + }, ), ), - ); - }, - ), - actions: [ - IconButton( - // iconSize: 70, - icon: Image.asset( - 'assets/images/new-design/qr-code.png', + leading: Builder( + builder: (BuildContext context) { + return InkWell( + onTap: () { + setState(() { + currentTab = 0; + pageController.jumpToPage(0); + }); + }, + child: Container( + height: 2.0, + width: 10.0, + child: Image.asset( + 'assets/images/pharmacy_logo.png', + ), + ), + ); + }, ), - onPressed: _scanQrAndGetProduct //do something, - ) - ], - centerTitle: true, - ), - // : currentTab == 4 - // ? null:null, + actions: [ + IconButton( + // iconSize: 70, + icon: Image.asset( + 'assets/images/new-design/qr-code.png', + ), + onPressed: _scanQrAndGetProduct //do something, + ) + ], + centerTitle: true, + ) + : null, // : AppBar( // backgroundColor: Color(0xff5AB145), // elevation: 0, @@ -155,11 +144,10 @@ class _LandingPagePharmacyState extends State { physics: NeverScrollableScrollPhysics(), controller: pageController, children: [ - // TODO mosa_comeback PharmacyPage(), PharmacyCategorisePage(), // OffersCategorisePage(), - WishlistPage(), + WishlistPage(false), PharmacyProfilePage(), // Container( // child: Text('text'), @@ -180,8 +168,9 @@ class _LandingPagePharmacyState extends State { try { String barcode = result; GifLoaderDialogUtils.showMyDialog(context); - await BaseAppClient().getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", - onSuccess: (dynamic response, int statusCode) { + await BaseAppClient() + .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", + onSuccess: (dynamic response, int statusCode) { print(response); var product = PharmacyProduct.fromJson(response["products"][0]); GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 5cfdacc6..103066d5 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -22,6 +22,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -256,9 +257,7 @@ class _clinic_listState extends State { }); } - Navigator.push( - context, MaterialPageRoute(builder: (context) => PaymentMethod())) - .then((value) { + Navigator.push(context, FadePage(page: PaymentMethod())).then((value) { print(value); if (value != null) { openPayment(value, authUser, @@ -669,8 +668,8 @@ class _clinic_listState extends State { patientDoctorAppointmentListHospital) async { Navigator.push( context, - MaterialPageRoute( - builder: (context) => SearchResults( + FadePage( + page: SearchResults( doctorsList: docList, isLiveCareAppointment: true, patientDoctorAppointmentListHospital: diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 58efff71..1952de64 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -46,7 +46,8 @@ class _ConfirmLogin extends State { var sharedPref = new AppSharedPreferences(); bool authenticated; final authService = new AuthProvider(); - PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); int mobileNumber; String errorMsg = ''; SelectDeviceIMEIRES user; @@ -112,7 +113,7 @@ class _ConfirmLogin extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/DQ/logo.png', + 'assets/images/habib-logo.png', height: 90, width: 90, ), @@ -176,7 +177,7 @@ class _ConfirmLogin extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/DQ/logo.png', + 'assets/images/habib-logo.png', height: 90, width: 90, ), @@ -352,6 +353,7 @@ class _ConfirmLogin extends State { sendActivationCode(type) async { var request = this.getCommonRequest(type: type); + request.sMSSignature = await SMSOTP.getSignature(); GifLoaderDialogUtils.showMyDialog(context); await this.authService.sendActivationCode(request).then((result) { GifLoaderDialogUtils.hideDialog(context); @@ -513,8 +515,7 @@ class _ConfirmLogin extends State { .then((result) => { if (result is Map) { - projectViewModel.setPrivilege(privilegeList: result), - result = CheckActivationCode.fromJson(result), + result = CheckActivationCode.fromJson(result), if (this.registerd_data != null && this.registerd_data.isRegister == true) { @@ -585,8 +586,7 @@ class _ConfirmLogin extends State { }); } - goToHome() async { - await authenticatedUserObject.getUser(getUser: true); + goToHome() { authenticatedUserObject.isLogin = true; appointmentRateViewModel.isLogin = true; projectViewModel.isLogin = true; @@ -595,12 +595,11 @@ class _ConfirmLogin extends State { .setUser(authenticatedUserObject.user); getToDoCount(); - await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if(pharmacyModuleViewModel.error.isNotEmpty) + pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); }); - appointmentRateViewModel .getIsLastAppointmentRatedList() .then((value) => { @@ -648,7 +647,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( children: [ Image.asset( @@ -659,10 +658,9 @@ class _ConfirmLogin extends State { SizedBox( height: 20, ), - Texts( - TranslationBase.of(context).verifyWhatsApp, - fontSize: SizeConfig.textMultiplier * 2, - ) + Texts(TranslationBase.of(context).verifyWhatsApp, + fontSize: SizeConfig.textMultiplier * 2, + color: Colors.black) ], ), ))); @@ -675,7 +673,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -686,18 +684,15 @@ class _ConfirmLogin extends State { ), projectViewModel.isArabic ? SizedBox( - height: 20, + height: 0, ) : SizedBox( height: 20, ), - Texts( - TranslationBase.of(context).verifySMS, - fontSize: projectViewModel.isArabic - ? SizeConfig.textMultiplier * 1.8 - : SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, - ) + Texts(TranslationBase.of(context).verifySMS, + fontSize: SizeConfig.textMultiplier * 2, + textAlign: TextAlign.center, + color: Colors.black) ], ), ))); @@ -713,7 +708,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( children: [ Image.asset( @@ -724,10 +719,9 @@ class _ConfirmLogin extends State { SizedBox( height: 20, ), - Texts( - TranslationBase.of(context).verifyFingerprint, - fontSize: SizeConfig.textMultiplier * 2, - ) + Texts(TranslationBase.of(context).verifyFingerprint, + fontSize: SizeConfig.textMultiplier * 2, + color: Colors.black) ], ), ))); @@ -743,7 +737,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -755,10 +749,9 @@ class _ConfirmLogin extends State { SizedBox( height: 20, ), - Texts( - TranslationBase.of(context).verifyFaceID, - fontSize: SizeConfig.textMultiplier * 2, - ) + Texts(TranslationBase.of(context).verifyFaceID, + fontSize: SizeConfig.textMultiplier * 2, + color: Colors.black) ], ), ))); @@ -779,7 +772,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(0, 0, 0, 5), child: Column( children: [ Image.asset( @@ -792,13 +785,12 @@ class _ConfirmLogin extends State { height: 15, ) : SizedBox( - height: 10, + height: 20, ), - Texts( - TranslationBase.of(context).moreVerification, - fontSize: SizeConfig.textMultiplier * 1.8, - textAlign: TextAlign.center, - ) + Texts(TranslationBase.of(context).moreVerification, + fontSize: SizeConfig.textMultiplier * 1.8, + textAlign: TextAlign.center, + color: Colors.black) ], ), ))); diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index 69a66d9e..f8af8eac 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -1,10 +1,14 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/pages/login/forgot-password.dart'; +import 'package:diplomaticquarterapp/pages/login/login.dart'; +import 'package:diplomaticquarterapp/pages/login/register.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -50,8 +54,8 @@ class LoginType extends StatelessWidget { child: InkWell( onTap: () => { LoginType.loginType = 1, - Navigator.of(context) - .pushNamed(LOGIN_PAGE) + Navigator.of(context) + .push(FadePage(page: Login())), }, child: RoundedContainer( borderColor: Colors.grey, @@ -90,8 +94,8 @@ class LoginType extends StatelessWidget { child: InkWell( onTap: () => { LoginType.loginType = 2, - Navigator.of(context) - .pushNamed(LOGIN_PAGE) + Navigator.of(context) + .push(FadePage(page: Login())), }, child: RoundedContainer( borderColor: Colors.grey, @@ -136,8 +140,8 @@ class LoginType extends StatelessWidget { Center( child: InkWell( onTap: () => { - Navigator.of(context) - .pushNamed(FORGOT_PASSWORD) + Navigator.of(context) + .push(FadePage(page: ForgotPassword())), }, child: AppText( TranslationBase.of(context) @@ -166,9 +170,8 @@ class LoginType extends StatelessWidget { child: DefaultButton( TranslationBase.of(context).registerNow, () => { - Navigator.of(context).pushNamed( - REGISTER, - ) + Navigator.of(context) + .push(FadePage(page: Register())), }, )), ], diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 44be9a6d..8d655f76 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -9,9 +9,10 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel. import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/pages/login/register.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; @@ -24,8 +25,6 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; -import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -48,10 +47,13 @@ class _Login extends State { final authService = new AuthProvider(); var sharedPref = new AppSharedPreferences(); bool isLoading = false; - AppointmentRateViewModel appointmentRateViewModel = locator(); - PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + AppointmentRateViewModel appointmentRateViewModel = + locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); - AuthenticatedUserObject authenticatedUserObject = locator(); + AuthenticatedUserObject authenticatedUserObject = + locator(); ProjectViewModel projectViewModel; ToDoCountProviderModel toDoProvider; @@ -86,7 +88,9 @@ class _Login extends State { Expanded( flex: 2, child: Texts( - TranslationBase.of(context).enterNationalId, + loginType == 1 + ? TranslationBase.of(context).enterNationalId + : TranslationBase.of(context).enterFile, fontSize: SizeConfig.textMultiplier * 3.5, textAlign: TextAlign.start, )), @@ -97,7 +101,10 @@ class _Login extends State { children: [ Directionality( textDirection: TextDirection.ltr, - child: MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value)), + child: MobileNo( + onNumberChange: (value) => + {mobileNo = value, validateForm()}, + onCountryChange: (value) => countryCode = value)), Directionality( textDirection: TextDirection.ltr, child: Container( @@ -138,7 +145,9 @@ class _Login extends State { child: DefaultButton( TranslationBase.of(context).login, () => {this.startLogin()}, - color: isButtonDisabled == true ? Colors.grey : Colors.grey[900], + color: isButtonDisabled == true + ? Colors.grey + : Colors.grey[900], textColor: Colors.white, )) ], @@ -159,7 +168,8 @@ class _Login extends State { } void validateForm() { - if (util.validateIDBox(nationalIDorFile.text, loginType) == true && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { + if (util.validateIDBox(nationalIDorFile.text, loginType) == true && + util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { setState(() { isButtonDisabled = false; }); @@ -196,7 +206,7 @@ class _Login extends State { sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']), sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request), GifLoaderDialogUtils.hideDialog(context), - Navigator.of(context).pushNamed(CONFIRM_LOGIN) + Navigator.of(context).push(FadePage(page: ConfirmLogin())), } else { @@ -212,9 +222,7 @@ class _Login extends State { cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => { ConfirmDialog.closeAlertDialog(context), - Navigator.of(context).pushNamed( - REGISTER, - ), + Navigator.of(context).push(FadePage(page: Register())), }, cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); dialog.showAlertDialog(context); @@ -259,9 +267,9 @@ class _Login extends State { projectViewModel.isLogin = true; projectViewModel.user = authenticatedUserObject.user; - await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if(pharmacyModuleViewModel.error.isNotEmpty) - await pharmacyModuleViewModel.createUser(); + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (pharmacyModuleViewModel.error.isNotEmpty) + await pharmacyModuleViewModel.createUser(); }); appointmentRateViewModel diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 131db748..c6a3b872 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -3,24 +3,22 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart'; +import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -43,6 +41,7 @@ class _Register extends State { final sharedPref = new AppSharedPreferences(); bool isLoading; + @override Widget build(BuildContext context) { return AppScaffold( @@ -50,39 +49,38 @@ class _Register extends State { isShowAppBar: true, isShowDecPage: false, body: SingleChildScrollView( - child: Container( - padding: - EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), - height: SizeConfig.realScreenHeight * .9, - width: SizeConfig.realScreenWidth, - child: Column(children: [ - Expanded( - flex: 1, - child: AppText( - TranslationBase.of(context).enterNationalId, - fontSize: SizeConfig.textMultiplier * 3, - textAlign: TextAlign.left, - )), - Expanded( - flex: 4, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - MobileNo( - onNumberChange: (value) => - {mobileNo = value, validateForm()}, - onCountryChange: (value) => countryCode = value), - Container( - child: TextFields( - controller: nationalIDorFile, - onChanged: (value) => validateForm(), - keyboardType: TextInputType.number, - prefixIcon: Icon(Icons.chrome_reader_mode, - color: Color(0xFF40ACC9)), - padding: EdgeInsets.only( - top: 20, bottom: 20, left: 10, right: 10), - hintText: TranslationBase.of(context).nationalID, - )), + child: Container( + padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), + height: SizeConfig.realScreenHeight * .9, + width: SizeConfig.realScreenWidth, + child: Column(children: [ + Expanded( + flex: 1, + child: AppText( + TranslationBase.of(context).enterNationalId, + fontSize: SizeConfig.textMultiplier * 3, + textAlign: TextAlign.left, + )), + Expanded( + flex: 4, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + MobileNo( + onNumberChange: (value) => + {mobileNo = value, validateForm()}, + onCountryChange: (value) => countryCode = value), + Container( + child: TextFields( + controller: nationalIDorFile, + onChanged: (value) => validateForm(), + keyboardType: TextInputType.number, + prefixIcon: Icon(Icons.chrome_reader_mode, + color: Color(0xFF40ACC9)), + padding: EdgeInsets.only( + top: 20, bottom: 20, left: 10, right: 10), + hintText: TranslationBase.of(context).nationalID, + )), Row( children: [ Expanded( @@ -226,9 +224,7 @@ class _Register extends State { cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => { ConfirmDialog.closeAlertDialog(context), - Navigator.of(context).pushNamed( - REGISTER, - ), + Navigator.of(context).push(FadePage(page: Register())), }, cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); dialog.showAlertDialog(context); @@ -312,16 +308,10 @@ class _Register extends State { { result = CheckUserStatusResponse.fromJson(result), sharedPref.setObject(NHIC_DATA, result), - Navigator.of(context).pushNamed( - CONFIRM_LOGIN, - ) - // Navigator.of(context).pushNamed( - // REGISTER_INFO, - // ) + Navigator.of(context).push(FadePage(page: ConfirmLogin())), } else {AppToast.showErrorToast(message: result)} - //this.onRegister(); }); } diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index 4b8e90ae..b2250f5c 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -1,9 +1,11 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/pages/login/register.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -72,9 +74,8 @@ class _WelcomeLogin extends State { child: DefaultButton( TranslationBase.of(context).yes, () => { - Navigator.of(context).pushNamed( - LOGIN_TYPE, - ), + Navigator.of(context) + .push(FadePage(page: LoginType())), }, color: Color(0xFFc5272c), textColor: Colors.white, @@ -87,9 +88,8 @@ class _WelcomeLogin extends State { child: DefaultButton( TranslationBase.of(context).no, () => { - Navigator.of(context).pushNamed( - REGISTER, - ) + Navigator.of(context) + .push(FadePage(page: Register())), }, )) ], diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index c7dd5d37..6611c779 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -94,7 +94,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -125,7 +125,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -168,7 +168,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -189,7 +189,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -214,14 +214,14 @@ class _AdvancePaymentPageState extends State { SizedBox( height: 12, ), - if(model.user!=null) - NewTextFields( - hintText: TranslationBase.of(context).depositorEmail, - initialValue: model.user.emailAddress, - onChanged: (value) { - email = value; - }, - ), + if (model.user != null) + NewTextFields( + hintText: TranslationBase.of(context).depositorEmail, + initialValue: model.user.emailAddress, + onChanged: (value) { + email = value; + }, + ), SizedBox( height: 12, ), @@ -243,7 +243,9 @@ class _AdvancePaymentPageState extends State { child: SecondaryButton( textColor: Colors.white, label: TranslationBase.of(context).submit, - disabled: amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null, + disabled: amount.isEmpty || + _fileTextController.text.isEmpty || + _selectedHospital == null, onTap: () { var mobileNum; var patientName; @@ -278,10 +280,8 @@ class _AdvancePaymentPageState extends State { if (model.state != ViewState.Error && model.state != ViewState.ErrorLocal) { Utils.hideKeyboard(context); - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => PaymentMethod())).then( + Navigator.push(context, FadePage(page: PaymentMethod())) + .then( (value) { Navigator.push( context, diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 1edbcbf6..8f80eeeb 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -13,12 +13,15 @@ import 'package:hexcolor/hexcolor.dart'; import 'advance_payment_page.dart'; class MyBalancePage extends StatelessWidget { - List imagesInfo = List(); @override Widget build(BuildContext context) { - imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/en/0.png', + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/ar/0.png')); return BaseView( onModelReady: (model) => model.getPatientAdvanceBalanceAmount(), builder: (_, model, w) => AppScaffold( @@ -53,9 +56,9 @@ class MyBalancePage extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts( - '${model.totalAdvanceBalanceAmount ?? 0} '+ TranslationBase.of(context).sar, + '${model.totalAdvanceBalanceAmount ?? 0} ' + + TranslationBase.of(context).sar, color: Colors.white, bold: true, ), @@ -76,16 +79,16 @@ class MyBalancePage extends StatelessWidget { height: 65, margin: EdgeInsets.only(top: 8), decoration: BoxDecoration( - color: Colors.white, + color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(7), ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts( - '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} '+TranslationBase.of(context).sar, + '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} ' + + TranslationBase.of(context).sar, bold: true, ), Texts(model.patientAdvanceBalanceAmountList[index] @@ -94,7 +97,9 @@ class MyBalancePage extends StatelessWidget { ), ), ), - SizedBox(height: MediaQuery.of(context).size.height * 0.13 ,) + SizedBox( + height: MediaQuery.of(context).size.height * 0.13, + ) ], ), ), diff --git a/lib/pages/medical/balance/new_text_Field.dart b/lib/pages/medical/balance/new_text_Field.dart index ad9eb580..6d368a6a 100644 --- a/lib/pages/medical/balance/new_text_Field.dart +++ b/lib/pages/medical/balance/new_text_Field.dart @@ -42,38 +42,39 @@ final _mobileFormatter = NumberTextInputFormatter(); class NewTextFields extends StatefulWidget { NewTextFields( {Key key, - this.type, - this.hintText, - this.suffixIcon, - this.autoFocus, - this.onChanged, - this.initialValue, - this.minLines, - this.maxLines, - this.inputFormatters, - this.padding, - this.focus = false, - this.maxLengthEnforced = true, - this.suffixIconColor, - this.inputAction, - this.onSubmit, - this.keepPadding = true, - this.textCapitalization = TextCapitalization.none, - this.controller, - this.keyboardType, - this.validator, - this.borderOnlyError = false, - this.onSaved, - this.onSuffixTap, - this.readOnly: false, - this.maxLength, - this.prefixIcon, - this.bare = false, - this.onTap, - this.fontSize = 16.0, - this.fontWeight = FontWeight.w700, - this.autoValidate = false, - this.hintColor,this.isEnabled=true}) + this.type, + this.hintText, + this.suffixIcon, + this.autoFocus, + this.onChanged, + this.initialValue, + this.minLines, + this.maxLines, + this.inputFormatters, + this.padding, + this.focus = false, + this.maxLengthEnforced = true, + this.suffixIconColor, + this.inputAction, + this.onSubmit, + this.keepPadding = true, + this.textCapitalization = TextCapitalization.none, + this.controller, + this.keyboardType, + this.validator, + this.borderOnlyError = false, + this.onSaved, + this.onSuffixTap, + this.readOnly: false, + this.maxLength, + this.prefixIcon, + this.bare = false, + this.onTap, + this.fontSize = 16.0, + this.fontWeight = FontWeight.w700, + this.autoValidate = false, + this.hintColor, + this.isEnabled = true}) : super(key: key); final String hintText; @@ -142,7 +143,6 @@ class _NewTextFieldsState extends State { super.dispose(); } - bool _determineReadOnly() { if (widget.readOnly != null && widget.readOnly) { _focusNode.unfocus(); @@ -156,12 +156,11 @@ class _NewTextFieldsState extends State { Widget build(BuildContext context) { return AnimatedContainer( duration: Duration(milliseconds: 300), - decoration:BoxDecoration( + decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.white), + color: Theme.of(context).primaryColor), child: Container( margin: EdgeInsets.only(top: 8), - child: TextFormField( enabled: widget.isEnabled, initialValue: widget.initialValue, @@ -171,10 +170,10 @@ class _NewTextFieldsState extends State { textCapitalization: widget.textCapitalization, onFieldSubmitted: widget.inputAction == TextInputAction.next ? (widget.onSubmit != null - ? widget.onSubmit - : (val) { - _focusNode.nextFocus(); - }) + ? widget.onSubmit + : (val) { + _focusNode.nextFocus(); + }) : widget.onSubmit, textInputAction: widget.inputAction, minLines: widget.minLines ?? 1, @@ -190,45 +189,36 @@ class _NewTextFieldsState extends State { autofocus: widget.autoFocus ?? false, validator: widget.validator, onSaved: widget.onSaved, - - style: Theme.of(context) - .textTheme - .body2 - .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), + style: Theme.of(context).textTheme.body2.copyWith( + fontSize: widget.fontSize, fontWeight: widget.fontWeight), inputFormatters: widget.keyboardType == TextInputType.phone ? [ - WhitelistingTextInputFormatter.digitsOnly, - _mobileFormatter, - ] + WhitelistingTextInputFormatter.digitsOnly, + _mobileFormatter, + ] : widget.inputFormatters, decoration: InputDecoration( labelText: widget.hintText, - labelStyle: TextStyle(color: Colors.black), + labelStyle: + TextStyle(color: Theme.of(context).textTheme.bodyText1.color), errorBorder: OutlineInputBorder( borderSide: BorderSide( - color: Theme.of(context) - .errorColor - .withOpacity(0.5), + color: Theme.of(context).errorColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.0)), focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( - color: Theme.of(context) - .errorColor - .withOpacity(0.5), + color: Theme.of(context).errorColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)), focusedBorder: OutlineInputBorder( - borderSide: - BorderSide(color: Colors.white, width: 1.0), + borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), disabledBorder: OutlineInputBorder( - borderSide: - BorderSide(color: Colors.white, width: 1.0), + borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), enabledBorder: OutlineInputBorder( - borderSide: - BorderSide(color: Colors.white, width: 1.0), + borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12), ), ), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 009a7a16..8d49a89b 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -71,6 +71,7 @@ class _MedicalProfilePageState extends State { builder: (_, model, widget) => AppScaffold( isShowDecPage: false, baseViewModel: model, + isHelp: true, body: Container( child: SingleChildScrollView( child: Column( diff --git a/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart index b33246de..88234fe5 100644 --- a/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart +++ b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart @@ -1,99 +1,292 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; -class PrescriptionDeliveryAddressPage extends StatelessWidget { +import 'PrescriptionOrderOverveiw.dart'; + +class PrescriptionDeliveryAddressPage extends StatefulWidget { final Prescriptions prescriptions; + final List prescriptionReportList; + final List prescriptionReportEnhList; - const PrescriptionDeliveryAddressPage({Key key, this.prescriptions}) + const PrescriptionDeliveryAddressPage( + {Key key, + this.prescriptions, + this.prescriptionReportList, + this.prescriptionReportEnhList}) : super(key: key); + @override + _PrescriptionDeliveryAddressPageState createState() => + _PrescriptionDeliveryAddressPageState(); +} + +class _PrescriptionDeliveryAddressPageState + extends State { + AddressInfo _selectedAddress; + Completer _controller = Completer(); + + CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(24.665011045779107, 46.73502189439707), + zoom: 14.4746, + ); + Set markers = new Set(); + double latitude = 0; + double longitude = 0; + + @override + void initState() { + super.initState(); + _getCurrentLocation(); + } + + _getCurrentLocation() async { + await Geolocator.getLastKnownPosition().then((value) { + latitude = value.latitude; + latitude = value.longitude; + _kGooglePlex = CameraPosition( + target: LatLng(latitude, longitude), + zoom: 14.4746, + ); + }).catchError((e) { + latitude = 24.665011045779107; + latitude = 46.73502189439707; + }); + } + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - - return AppScaffold( - isShowAppBar: true, - appBarTitle: 'Delivery Address', - body: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - height: 15, - ), - InkWell( - onTap: () {}, - child: Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - height: 50, - decoration: BoxDecoration( - border: Border.all(color: Colors.grey), - borderRadius: BorderRadius.circular(7), - color: Colors.white, - shape: BoxShape.rectangle, + return BaseView( + onModelReady: (model) => model.getCustomerInfo(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).shippingAddresss, + baseViewModel: model, + body: Container( + height: MediaQuery.of(context).size.height * 0.65, + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 8, ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - child: Texts( - 'Selected Address', - variant: 'bodyText', - ), - margin: EdgeInsets.only(left: 10, right: 10), + InkWell( + onTap: () { + confirmSelectLocationDialog(model.addressesList); + }, + child: Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + height: 50, + decoration: BoxDecoration( + border: Border.all(color: Colors.grey), + borderRadius: BorderRadius.circular(7), + color: Colors.white, + shape: BoxShape.rectangle, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Text( + getAddressName(), + ), + margin: EdgeInsets.only(left: 10, right: 10), + ), + ), + ), + Icon( + Icons.arrow_drop_down, + size: 22, + color: Colors.grey, + ) + ], ), - Icon( - Icons.arrow_drop_down, - size: 22, - color: Colors.grey, - ) - ], + ), ), - ), - ), - SizedBox( - height: 15, + SizedBox( + height: 10, + ), + _selectedAddress == null + ? Container( + child: Image.asset( + projectViewModel.isArabic + ? 'assets/images/pharmacy/shipping_image_ar.png' + : 'assets/images/pharmacy/shipping_image.png', + height: 300, + ), + ) + : Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + decoration: BoxDecoration( + border: Border.all(color: Colors.grey)), + height: 200, + child: GoogleMap( + mapType: MapType.normal, + markers: markers, + initialCameraPosition: _kGooglePlex, + onMapCreated: + (GoogleMapController controller) { + _controller.complete(controller); + }, + ), + ), + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).shippingAddresss), + SizedBox( + height: 10, + ), + Texts( + '${model.user.firstName} ${model.user.lastName}'), + SizedBox( + height: 10, + ), + Texts(_selectedAddress.address1), + SizedBox( + height: 10, + ), + Texts(_selectedAddress.address2), + SizedBox( + height: 10, + ), + Texts(_selectedAddress.city + + " " + + _selectedAddress.country), + ], + ), + ) + ], ), - Container( - - child: Image.asset(projectViewModel.isArabic - ? 'assets/images/pharmacy/shipping_image_ar.png' - : 'assets/images/pharmacy/shipping_image.png',height: 300,), - ) - ], + ), ), - ), - bottomSheet: Container( - width: double.infinity, - height: MediaQuery.of(context).size.height * 0.25, - color: Colors.grey[100], - child: Column( - children: [ - Divider(), - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( - label: 'Add New Address'.toUpperCase(), - onTap: () {}, - ), - ), - Container( + bottomSheet: Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * 0.25, + color: Colors.grey[100], + child: Column( + children: [ + Divider(), + Container( width: MediaQuery.of(context).size.width * 0.8, child: Button( - label: 'Continue'.toUpperCase(), - backgroundColor: Colors.green[200], - onTap: () {}, - )) - ], - ), - )); + label: + TranslationBase.of(context).addNewAddress.toUpperCase(), + onTap: () { + Navigator.push( + context, + FadePage( + page: LocationPage( + latitude: latitude, + longitude: longitude, + )), + ); + }, + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + label: + TranslationBase.of(context).continues.toUpperCase(), + disabled: _selectedAddress == null, + backgroundColor: _selectedAddress == null + ? Colors.green[300] + : Colors.green[700], + onTap: () { + Navigator.push( + context, + FadePage( + page: PrescriptionOrderOverview( + latitude: latitude, + longitude: longitude, + prescriptionReportEnhList: + widget.prescriptionReportEnhList, + prescriptionReportList: + widget.prescriptionReportList, + prescriptions: widget.prescriptions, + selectedAddress: _selectedAddress, + ), + ), + ); + }, + )) + ], + ), + )), + ); + } + + void confirmSelectLocationDialog( + List addresses, + ) { + showDialog( + context: context, + child: SelectLocationDialog( + addresses: addresses, + selectedAddress: _selectedAddress, + onValueSelected: (value) { + setState(() { + _selectedAddress = value; + List latLongArr = value.latLong.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + markers = Set(); + markers.add( + Marker( + markerId: MarkerId( + _selectedAddress.latLong.hashCode.toString(), + ), + position: LatLng(latitude, longitude), + ), + ); + _kGooglePlex = CameraPosition( + target: LatLng(latitude, longitude), + zoom: 14.4746, + ); + }); + }, + ), + ); + } + + String getAddressName() { + if (_selectedAddress != null) + return _selectedAddress.address1; + else + return TranslationBase.of(context).selectAddress; } } diff --git a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart new file mode 100644 index 00000000..bad43a02 --- /dev/null +++ b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart @@ -0,0 +1,203 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class PrescriptionOrderOverview extends StatelessWidget { + final Prescriptions prescriptions; + final List prescriptionReportList; + final List prescriptionReportEnhList; + final AddressInfo selectedAddress; + final double latitude; + final double longitude; + PrescriptionOrderOverview( + {Key key, + this.prescriptions, + this.prescriptionReportList, + this.prescriptionReportEnhList, this.selectedAddress, this.latitude, this.longitude}); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).orderOverview, + baseViewModel: model, + body: Container( + height: MediaQuery.of(context).size.height * 0.8, + child: Column( + children: [ + if (!prescriptions.isInOutPatient) + ...List.generate( + prescriptionReportList.length, + (index) => Container( + width: double.infinity, + margin: EdgeInsets.only(top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: + Border.all(color: Colors.grey[200], width: 0.5), + ), + child: Row( + children: [ + ClipRRect( + borderRadius: + BorderRadius.all(Radius.circular(5)), + child: Image.network( + prescriptionReportList[index].imageSRCUrl, + fit: BoxFit.cover, + width: 60, + height: 70, + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts(prescriptionReportList[index] + .itemDescription + .isNotEmpty + ? prescriptionReportList[index] + .itemDescription + : prescriptionReportList[index] + .itemDescriptionN)), + )), + Icon( + Icons.arrow_forward_ios, + size: 18, + color: Colors.grey[500], + ) + ], + ), + )) + else + ...List.generate( + prescriptionReportEnhList.length, + (index) => Container( + margin: EdgeInsets.all(8.0), + color: Colors.white, + child: Row( + children: [ + ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5)), + child: Image.network( + prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + width: 60, + height: 70, + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(prescriptionReportEnhList[index] + .itemDescription), + ], + ), + ), + ), + Icon( + Icons.arrow_forward_ios, + size: 18, + color: Colors.grey[500], + ) + ], + ), + ), + ) + ], + ), + ), + bottomSheet: Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * 0.15, + color: Colors.grey[100], + child: Column( + children: [ + SizedBox(height: 12,), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: SecondaryButton( + label: TranslationBase.of(context).submit.toUpperCase(), + color: Colors.green[800], + onTap: () async { + showDialog( + context: context, + child: ConfirmWithMessageDialog( + message: TranslationBase.of(context).confirmPrescription, + okTitle: TranslationBase.of(context).ok, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.insertDeliveryOrder(lineItemNo: 0, + longitude: longitude, + latitude: latitude,appointmentNo: prescriptions.appointmentNo, + dischargeID: prescriptions.dischargeNo,createdBy: model.user.patientID) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) + showErrorDialog(context,model.error); + else + { + Navigator.pop(context); + Navigator.pop(context); + Navigator.pop(context); + } + + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + }); + }, + ), + ); + + }, + )) + ], + ), + ), + ), + ); + } + + void showErrorDialog(BuildContext context,String error) { + showDialog( + context: context, + child: ConfirmWithMessageDialog( + message: TranslationBase.of(context).youAlreadyHaveOrder, + okTitle: TranslationBase.of(context).orderOverview, + onTap: () { + Navigator.pop(context); + Navigator.pop(context); + Navigator.pop(context); + + }, + ), + ); + + } + +} diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 864bdca2..c6581493 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -201,16 +201,18 @@ class PrescriptionItemsPage extends StatelessWidget { ), Container( width: MediaQuery.of(context).size.width * 0.8, - child: SecondaryButton( + child: Button( label: TranslationBase.of(context).resendOrder, - color: Colors.green[200], + backgroundColor: Colors.green[800], onTap: (){ - var asd=""; + Navigator.push( context, FadePage( page: PrescriptionDeliveryAddressPage( prescriptions: prescriptions, + prescriptionReportList: model.prescriptionReportList, + prescriptionReportEnhList: model.prescriptionReportEnhList, ), ), ); diff --git a/lib/pages/medical/smart_watch_health_data/health_data_list.dart b/lib/pages/medical/smart_watch_health_data/health_data_list.dart index 2f9a3e60..ea8746e9 100644 --- a/lib/pages/medical/smart_watch_health_data/health_data_list.dart +++ b/lib/pages/medical/smart_watch_health_data/health_data_list.dart @@ -1,5 +1,8 @@ +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/stepsTracker.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +// import 'package:fit_kit/fit_kit.dart'; import 'package:flutter/material.dart'; class HealthDataList extends StatefulWidget { @@ -8,13 +11,30 @@ class HealthDataList extends StatefulWidget { } class _HealthDataListState extends State { + + // List dataTypes = List(); + + @override + void initState() { + // dataTypes.add(DataType.DISTANCE); + // dataTypes.add(DataType.STEP_COUNT); + // dataTypes.add(DataType.HEART_RATE); + // dataTypes.add(DataType.SLEEP); + // dataTypes.add(DataType.ENERGY); + + super.initState(); + } + @override Widget build(BuildContext context) { return AppScaffold( appBarTitle: "Smartwatches", isShowAppBar: true, body: Container( - height: MediaQuery.of(context).size.height, + height: MediaQuery + .of(context) + .size + .height, margin: EdgeInsets.all(20.0), child: SingleChildScrollView( child: Column( @@ -58,21 +78,31 @@ class _HealthDataListState extends State { Divider( color: Colors.grey[500], ), - Row( - children: [ - Container( - child: Image.asset( - "assets/images/SmartWatches/heartrate_icon.png", - width: 60.0, - height: 60.0), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), - child: Text("Steps", - style: TextStyle( - fontSize: 20.0, fontWeight: FontWeight.bold)), - ), - ], + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: StepsTracker(), + ), + ); + }, + child: Row( + children: [ + Container( + child: Image.asset( + "assets/images/SmartWatches/heartrate_icon.png", + width: 60.0, + height: 60.0), + ), + Container( + margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), + child: Text("Steps", + style: TextStyle( + fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), ), Divider( color: Colors.grey[500], @@ -121,25 +151,68 @@ class _HealthDataListState extends State { ), bottomSheet: Container( width: double.infinity, - height: MediaQuery.of(context).size.height * 0.1, + height: MediaQuery + .of(context) + .size + .height * 0.1, color: Colors.grey[100], child: Column( children: [ Divider( color: Colors.transparent, ), - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( - onTap: () { -// launch(model.radImageURL); - }, - label: 'Sync Health Data', - backgroundColor: Colors.grey[800], - ), - ), + InkWell( + onTap: () { + print("ReadLast"); + // readLast(); + }, + child:Container( + height: (MediaQuery + .of(context) + .size + .height/2)*0.12, + width: MediaQuery + .of(context) + .size + .width * 0.8, + decoration: BoxDecoration( + color: Colors.grey[800], + borderRadius: BorderRadius.circular(6.0), + ), + child: Container( + padding: EdgeInsets.only(top: 10.0), + child: Text( + 'Sync Health Data' , textAlign: TextAlign.center,style: TextStyle( + color: Colors.white , fontSize: 18.0 + ), + ), + ),),), ], ), )); } -} + + + // void readLast() async { + // print("ReadLast"); + // final result = await FitKit.readLast(DataType.DISTANCE); + // print(result); + // print(result); + // } + // + // void readAll() async { + // if (await FitKit.requestPermissions(dataTypes)) { + // for (DataType type in dataTypes) { + // final results = await FitKit.read( + // type, + // dateFrom: DateTime.now().subtract(Duration(days: 7)), + // dateTo: DateTime.now(), + // limit: 100, + // ); + // print(results); + // print(results.length); + // } + // readLast(); + // } + // } +} \ No newline at end of file diff --git a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart index 20217ca9..977b99df 100644 --- a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart +++ b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/healt import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -88,8 +89,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "Apple Watch Series 1", + "Apple Watch Series 1", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -108,8 +110,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "Apple Watch Series 2", + "Apple Watch Series 2", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -135,8 +138,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "Apple Watch Series 3", + "Apple Watch Series 3", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -155,8 +159,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "Apple Watch Series 4", + "Apple Watch Series 4", overflow: TextOverflow.clip , style: TextStyle( fontSize: 12.0)), ) @@ -182,8 +187,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "Apple Watch Series 5", + "Apple Watch Series 5", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -202,8 +208,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "Apple Watch Series 6", + "Apple Watch Series 6", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -229,7 +236,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( - child: Text("Mi Band 3", + width: MediaQuery.of(context).size.width*0.22, + child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -248,7 +256,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( - child: Text("Mi Band 4", + width: MediaQuery.of(context).size.width*0.22, + child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -417,9 +426,9 @@ class _SmartWatchInstructionsState extends State { child: CarouselSlider( carouselController: buttonCarouselController, options: CarouselOptions( - enableInfiniteScroll: false, - viewportFraction: 0.95, - height: MediaQuery.of(context).size.height * 0.9), + // enableInfiniteScroll: true, + viewportFraction: 0.99, + height: MediaQuery.of(context).size.height*1.02 ), items: [1, 2].map((i) { return Builder( builder: (BuildContext context) { @@ -427,7 +436,8 @@ class _SmartWatchInstructionsState extends State { width: MediaQuery.of(context).size.width, margin: EdgeInsets.symmetric(horizontal: 5.0), child: Card( - margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + margin: EdgeInsets.only(top:16.0 , bottom: 8.0), + // fromLTRB(8.0, 16.0, 8.0, 8.0), color: Colors.white.withOpacity(1.0), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), @@ -457,8 +467,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "Huawei Watch 2", + "Huawei Watch 2", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -477,8 +488,10 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( "Mobovi TicWatch E2", + overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -504,7 +517,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( - child: Text("Huawei Watch", + width: MediaQuery.of(context).size.width*0.22, + child: Text("Huawei Watch", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -523,7 +537,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( - child: Text("Fossil Sport", + width: MediaQuery.of(context).size.width*0.22, + child: Text("Fossil Sport", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -549,8 +564,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "MisFit Vapor 2", + "MisFit Vapor 2", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -569,8 +585,9 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + width: MediaQuery.of(context).size.width*0.22, child: Text( - "LG Watch Sport", + "LG Watch Sport", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -596,7 +613,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( - child: Text("Mi Band 3", + width: MediaQuery.of(context).size.width*0.22, + child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -615,7 +633,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( - child: Text("Mi Band 4", + width: MediaQuery.of(context).size.width*0.22, + child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle( fontSize: 12.0)), ) @@ -735,7 +754,7 @@ class _SmartWatchInstructionsState extends State { ), Container( margin: EdgeInsets.fromLTRB( - 15.0, 95.0, 15.0, 15.0), + 15.0, 75.0, 15.0, 15.0), child: ButtonTheme( shape: RoundedRectangleBorder( borderRadius: diff --git a/lib/pages/medical/smart_watch_health_data/stepsTracker.dart b/lib/pages/medical/smart_watch_health_data/stepsTracker.dart index 467242e8..3fe1a4ba 100644 --- a/lib/pages/medical/smart_watch_health_data/stepsTracker.dart +++ b/lib/pages/medical/smart_watch_health_data/stepsTracker.dart @@ -84,6 +84,7 @@ class _StepsTrackerState extends State print(res['Med_GetYearStepsTransactionsStsList']); yearlyStepsList.clear(); res['Med_GetYearStepsTransactionsStsList'].forEach((element) { + print('in forEach'); yearlyStepsList.add(new YearlyStepsResModel.fromJson(element)); if (element['ValueSum'] != null) { double value = element['ValueSum']; @@ -91,7 +92,7 @@ class _StepsTrackerState extends State dataLength++; } }); - + print("innnnnnnnnnnnnnnnn"); print(avgStepsValue); print(dataLength); setState(() { diff --git a/lib/pages/medical/vital_sign/LineChartCurved.dart b/lib/pages/medical/vital_sign/LineChartCurved.dart index f2bc3d5f..fe112767 100644 --- a/lib/pages/medical/vital_sign/LineChartCurved.dart +++ b/lib/pages/medical/vital_sign/LineChartCurved.dart @@ -14,10 +14,18 @@ class LineChartCurved extends StatelessWidget { List xAxixs = List(); List yAxixs = List(); + double minY = 0; + double maxY = 0; + + double minX = 0; + double maxX = 0; + double increasingY = 0; + @override Widget build(BuildContext context) { getXaxix(); getYaxix(); + calculateMaxAndMin(); return AspectRatio( aspectRatio: 1.1, child: Container( @@ -70,10 +78,18 @@ class LineChartCurved extends StatelessWidget { } } } + getYaxix() { - int indexess= (timeSeries.length*0.30).toInt(); + // int indexess= (timeSeries.length*0.30).toInt(); + // for (int index = 0; index < timeSeries.length; index++) { + // int mIndex = indexess * index; + // if (mIndex < timeSeries.length) { + // yAxixs.add(timeSeries[mIndex].sales); + // } + // } + for (int index = 0; index < timeSeries.length; index++) { - int mIndex = indexess * index; + int mIndex = indexes * index; if (mIndex < timeSeries.length) { yAxixs.add(timeSeries[mIndex].sales); } @@ -100,7 +116,6 @@ class LineChartCurved extends StatelessWidget { fontSize: 10, ), rotateAngle:-65, - //rotateAngle:-65, margin: 22, getTitles: (value) { if (timeSeries.length < 15) { @@ -128,18 +143,18 @@ class LineChartCurved extends StatelessWidget { fontSize: 10, ), getTitles: (value) { - // if (timeSeries.length < 10) { - // return '${value.toInt()}'; - // } else { - // if (value == getMinY()) - // return '${value.toInt()}'; - // if (value == getMaxY()) - // return '${value.toInt()}'; - // if (yAxixs.contains(value)) { - // return '${value.toInt()}'; - // } - // return ''; - // } + if (timeSeries.length < 15) { + return '${value.toInt()}'; + } else { + if (value == minY) + return '${value.toInt()}'; + if (value == getMaxY()) + return '${value.toInt()}'; + //if (yAxixs.contains(value)) { + return '${value.toInt()}'; + + return ''; + } return '${value.toInt()}'; }, margin: 12, @@ -163,31 +178,55 @@ class LineChartCurved extends StatelessWidget { ), ), ), - minX: 0, - maxX: (timeSeries.length - 1).toDouble(), - maxY: getMaxY()+0.3, - minY: getMinY(), + minX: minX, + maxX: maxX, + maxY: maxY, + minY: minY, lineBarsData: getData(context), ); } + calculateMaxAndMin(){ + getMaxY(); + getMaxX(); + getMin(); + getMinY(); + increasingY = ((maxY-minY)/timeSeries.length - 1)*15; + maxY += increasingY.abs(); + minY -= increasingY.abs(); + } + double getMaxY() { - double max = 0; + maxY = 0; + timeSeries.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > maxY) maxY = resultValueDouble; + }); + + return maxY.roundToDouble() ; + } + + getMaxX(){ + maxX = (timeSeries.length - 1).toDouble(); + } + + double getMin(){ + minX = 0; timeSeries.forEach((element) { double resultValueDouble = element.sales; - if (resultValueDouble > max) max = resultValueDouble; + if (resultValueDouble < minX) minX = resultValueDouble; }); - return max.roundToDouble() ; + return minX.roundToDouble() ; } double getMinY() { - double min = timeSeries[0].sales; + minY = 0; timeSeries.forEach((element) { double resultValueDouble = element.sales; - if (resultValueDouble < min) min = resultValueDouble; + if (resultValueDouble < minY) minY = resultValueDouble; }); - int value = min.toInt(); + int value = minY.toInt(); return value.toDouble(); } @@ -202,7 +241,7 @@ class LineChartCurved extends StatelessWidget { spots: spots, isCurved: true, colors: [secondaryColor], - barWidth: 5, + barWidth: 3, isStrokeCapRound: true, dotData: FlDotData( show: false, diff --git a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart index fa177b1a..605e264a 100644 --- a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart @@ -178,8 +178,8 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), minX: 0, maxX: (timeSeries1.length - 1).toDouble(), - maxY: getMaxY() + 0.3, - minY: getMinY(), + maxY: getMaxY() + 15, + minY: getMinY()-15, lineBarsData: getData(context), ); } diff --git a/lib/pages/offers_categorise_page.dart b/lib/pages/offers_categorise_page.dart index 782ea018..f3875d1a 100644 --- a/lib/pages/offers_categorise_page.dart +++ b/lib/pages/offers_categorise_page.dart @@ -34,587 +34,675 @@ class _OffersCategorisePageState extends State { builder: (BuildContext context, OffersCategoriseViewModel model, Widget child) => PharmacyAppScaffold( - appBarTitle: 'Offers', - isShowAppBar: true, - backgroundColor: Colors.white, - isShowDecPage: false, - baseViewModel: model, - body: Container( - //height: MediaQuery.of(context).size.height * 0.57, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(10.0), - child: Container( - child: Texts( - 'Categories', - fontWeight: FontWeight.w800, - ), - ), - ), - Divider( - thickness: 1.0, - color: Colors.grey.shade400, - ), - //Expanded widget heree if nassery - Container( - height: MediaQuery.of(context).size.height * 0.20, - child: ListView.builder( - scrollDirection: Axis.horizontal, - itemCount: model.categorise.length, - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Row( - children: [ - InkWell( - child: Column( - children: [ - Container( - height: 60.0, - width: 65.0, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Colors.orange.shade200 - .withOpacity(0.45), - ), - child: Icon( - Icons.apps_sharp, - size: 32.0, - ), - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.2, - height: MediaQuery.of(context) - .size - .height * - 0.09, - child: Center( - child: Texts( - model.categorise[index].name, - fontWeight: FontWeight.w600, - fontSize: 13.8, - ), - ), - ), - ], - ), - onTap: () { - model.getOffersProducts( - i: model.categorise[index].id); - String ids = model.categorise[index].id; - - categoriseName = - model.categorise[index].name; - }), - ], - ), - ); - }), - ), - Divider( - thickness: 1.0, - color: Colors.grey.shade400, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: EdgeInsets.all(8.0), - child: Texts( - categoriseName, - fontWeight: FontWeight.w800, - ), - ), - Row( + appBarTitle: 'Offers', + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + baseViewModel: model, + body: model.categorise.length != 0 + ? Container( + //height: MediaQuery.of(context).size.height * 0.57, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - height: 44.0, - child: VerticalDivider( - color: Colors.black45, - thickness: 0.7, - //width: 0.3, - // indent: 0.0, - ), - ), Padding( - padding: EdgeInsets.all(8.0), - child: InkWell( - child: styleIcon, - onTap: () { - setState(() { - if (styleOne == true) { - styleOne = false; - styleTwo = true; - styleIcon = Icon( - Icons.auto_awesome_mosaic, - color: Colors.blue, - size: 29.0, - ); - } else { - styleOne = true; - styleTwo = false; - styleIcon = Icon( - Icons.widgets_sharp, - color: Colors.blue, - size: 29.0, - ); - } - }); - }, + padding: EdgeInsets.all(10.0), + child: Container( + child: Texts( + 'Categories', + fontWeight: FontWeight.w800, + ), ), ), - ], - ), - ], - ), - Divider( - thickness: 1.0, - color: Colors.grey.shade400, - ), - styleOne == true - ? Expanded( - child: Container( - height: MediaQuery.of(context).size.height * 0.50, - child: GridView.builder( - gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - crossAxisSpacing: 0.5, - mainAxisSpacing: 2.0, - childAspectRatio: 0.85, - ), - itemCount: model.products.length, - itemBuilder: (BuildContext context, int index) { - return NetworkBaseView( - baseViewModel: model, - child: Card( - color: model.products[index] - .discountName != - null - ? Color(0xffFFFF00) - : Colors.white, - elevation: 0, - shape: Border( - right: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - left: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - bottom: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - top: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - ), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Container( - height: 250.0, - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(110.0), - ), - color: Colors.white, - ), - padding: EdgeInsets.symmetric( - horizontal: 0), - width: MediaQuery.of(context) - .size - .width / - 3, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Stack( + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + //Expanded widget heree if nassery + Container( + height: MediaQuery.of(context).size.height * 0.20, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: model.categorise.length, + itemBuilder: + (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Row( + children: [ + InkWell( + child: Column( children: [ - if (model.products[index] - .discountName != - null) - RotatedBox( - quarterTurns: 4, - child: Container( - decoration: - BoxDecoration(), - child: Padding( - padding: - EdgeInsets.only( - right: 5.0, - top: 20.0, - bottom: 5.0, - ), - child: Texts( - 'offer' - .toUpperCase(), - color: Colors.red, - fontSize: 13.0, - fontWeight: - FontWeight.w900, - ), - ), - transform: new Matrix4 - .rotationZ( - 5.837200), - ), - ), Container( - margin: EdgeInsets.fromLTRB( - 0, 16, 0, 0), - alignment: Alignment.center, - child: Image.network( - model.products[index] - .images.isNotEmpty - ? model - .products[index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.cover, - height: 80, + height: 60.0, + width: 65.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors + .orange.shade200 + .withOpacity(0.45), + ), + child: Icon( + Icons.apps_sharp, + size: 32.0, ), ), Container( - width: model.products[index] - .rxMessage != - null - ? MediaQuery.of(context) + width: + MediaQuery.of(context) .size - .width / - 5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular(6)), - ), - child: Texts( - model.products[index] - .rxMessage != - null - ? model - .products[index] - .rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, + .width * + 0.2, + height: + MediaQuery.of(context) + .size + .height * + 0.09, + child: Center( + child: Texts( + model.categorise[index] + .name, + fontWeight: + FontWeight.w600, + fontSize: 13.8, + ), ), ), ], ), - Container( + onTap: () { + model.getOffersProducts( + i: model + .categorise[index].id); + String ids = + model.categorise[index].id; + + categoriseName = model + .categorise[index].name; + }), + ], + ), + ); + }), + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Texts( + categoriseName, + fontWeight: FontWeight.w800, + ), + ), + Row( + children: [ + Container( + height: 44.0, + child: VerticalDivider( + color: Colors.black45, + thickness: 0.7, + //width: 0.3, + // indent: 0.0, + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: styleIcon, + onTap: () { + setState(() { + if (styleOne == true) { + styleOne = false; + styleTwo = true; + styleIcon = Icon( + Icons.auto_awesome_mosaic, + color: Colors.blue, + size: 29.0, + ); + } else { + styleOne = true; + styleTwo = false; + styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + } + }); + }, + ), + ), + ], + ), + ], + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + styleOne == true + ? Expanded( + child: Container( + height: + MediaQuery.of(context).size.height * + 0.50, + child: GridView.builder( + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 0.85, + ), + itemCount: model.products.length, + itemBuilder: + (BuildContext context, int index) { + return NetworkBaseView( + baseViewModel: model, + child: Card( + color: model.products[index] + .discountName != + null + ? Color(0xffFFFF00) + : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + ), margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, + horizontal: 8, + vertical: 4, ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - if (model.products[index] - .discountName != - null) + child: Container( + height: 250.0, + decoration: BoxDecoration( + borderRadius: + BorderRadius.only( + topLeft: Radius.circular( + 110.0), + ), + color: Colors.white, + ), + padding: EdgeInsets.symmetric( + horizontal: 0), + width: MediaQuery.of(context) + .size + .width / + 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Stack( + children: [ + if (model + .products[ + index] + .discountName != + null) + RotatedBox( + quarterTurns: 4, + child: Container( + decoration: + BoxDecoration(), + child: Padding( + padding: + EdgeInsets + .only( + right: 5.0, + top: 20.0, + bottom: 5.0, + ), + child: Texts( + 'offer' + .toUpperCase(), + color: Colors + .red, + fontSize: + 13.0, + fontWeight: + FontWeight + .w900, + ), + ), + transform: new Matrix4 + .rotationZ( + 5.837200), + ), + ), + Container( + margin: EdgeInsets + .fromLTRB(0, 16, + 0, 0), + alignment: Alignment + .center, + child: + Image.network( + model + .products[ + index] + .images + .isNotEmpty + ? model + .products[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: model + .products[ + index] + .rxMessage != + null + ? MediaQuery.of( + context) + .size + .width / + 5 + : 0, + padding: + EdgeInsets.all( + 4), + decoration: + BoxDecoration( + color: Color( + 0xffb23838), + borderRadius: BorderRadius.only( + topLeft: Radius + .circular( + 6)), + ), + child: Texts( + model + .products[ + index] + .rxMessage != + null + ? model + .products[ + index] + .rxMessage + : "", + color: + Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight + .w400, + ), + ), + ], + ), Container( - width: double.infinity, - height: 22.0, - decoration: - BoxDecoration( - color: - Color(0xff5AB145), + margin: EdgeInsets + .symmetric( + horizontal: 6, + vertical: 0, ), - child: Center( - child: Texts( - model - .products[index] - .discountName, - regular: true, - color: Colors.white, - fontSize: 12.0, - fontWeight: - FontWeight.w700, - ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + if (model + .products[ + index] + .discountName != + null) + Container( + width: double + .infinity, + height: 22.0, + decoration: + BoxDecoration( + color: Color( + 0xff5AB145), + ), + child: Center( + child: Texts( + model + .products[ + index] + .discountName, + regular: + true, + color: Colors + .white, + fontSize: + 12.0, + fontWeight: + FontWeight + .w700, + ), + ), + ), + Texts( + model + .products[ + index] + .name, + regular: true, + fontSize: 12.58, + fontWeight: + FontWeight + .w600, + ), + Padding( + padding: + const EdgeInsets + .only( + top: 4, + bottom: + 4), + child: Texts( + "SAR ${model.products[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: model.products[index].approvedRatingSum > + 0 + ? (model.products[index].approvedRatingSum.toDouble() / model.products[index].approvedRatingSum.toDouble()) + .toDouble() + : 0, + forceStars: + true), + Texts( + "(${model.products[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight + .w400, + ) + ], + ), + ], ), ), - Texts( - model - .products[index].name, - regular: true, - fontSize: 12.58, - fontWeight: - FontWeight.w600, - ), - Padding( - padding: - const EdgeInsets.only( - top: 4, - bottom: 4), - child: Texts( - "SAR ${model.products[index].price}", - bold: true, - fontSize: 14, + ], + ), + ), + )); + }, + ), + ), + ) + : Expanded( + child: Container( + child: ListView.builder( + itemCount: model.products.length, + itemBuilder: (BuildContext context, + int index) { + return Card( + // color: + // model.products[index].discountName != + // null + // ? Color(0xffFFFF00) + // : Colors.white, + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + if (model + .products[ + index] + .discountName != + null) + Container( + decoration: + BoxDecoration(), + child: Padding( + padding: + EdgeInsets + .only( + left: 9.0, + top: 8.0, + right: 10.0, + ), + child: + Container( + color: Colors + .yellow, + height: 25.0, + width: 70.0, + child: Center( + child: + Texts( + 'offer' + .toUpperCase(), + color: Colors + .red, + fontSize: + 13.0, + fontWeight: + FontWeight + .w900, + ), + ), + ), + ), + transform: new Matrix4 + .rotationZ( + 6.15099), + ), + Container( + margin: EdgeInsets + .fromLTRB( + 0, 0, 0, 0), + alignment: Alignment + .center, + child: + Image.network( + model + .products[ + index] + .images + .isNotEmpty + ? model + .products[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + ], ), - ), - Row( - children: [ - StarRating( - totalAverage: model + Column( + children: [ + Container( + width: model .products[ index] - .approvedRatingSum > - 0 - ? (model.products[index].approvedRatingSum - .toDouble() / - model - .products[index] - .approvedRatingSum - .toDouble()) - .toDouble() + .rxMessage != + null + ? MediaQuery.of( + context) + .size + .width / + 5 : 0, - forceStars: true), - Texts( - "(${model.products[index].approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ) - ], - ), - ], - ), - ), - ], - ), - ), - )); - }, - ), - ), - ) - : Expanded( - child: Container( - child: ListView.builder( - itemCount: model.products.length, - itemBuilder: - (BuildContext context, int index) { - return Card( - // color: - // model.products[index].discountName != - // null - // ? Color(0xffFFFF00) - // : Colors.white, - child: Row( - children: [ - Stack( - children: [ - Column( - children: [ - if (model.products[index] - .discountName != - null) - Container( - decoration: - BoxDecoration(), - child: Padding( - padding: - EdgeInsets.only( - left: 9.0, - top: 8.0, - right: 10.0, - ), - child: Container( - color: Colors.yellow, - height: 25.0, - width: 70.0, - child: Center( + padding: + EdgeInsets.all( + 4), + decoration: + BoxDecoration( + color: Color( + 0xffb23838), + borderRadius: BorderRadius.only( + topLeft: Radius + .circular( + 6)), + ), child: Texts( - 'offer' - .toUpperCase(), - color: Colors.red, - fontSize: 13.0, + model + .products[ + index] + .rxMessage != + null + ? model + .products[ + index] + .rxMessage + : "", + color: + Colors.white, + regular: true, + fontSize: 10, fontWeight: FontWeight - .w900, + .w400, ), ), - ), + ], ), - transform: - new Matrix4.rotationZ( - 6.15099), - ), - Container( - margin: EdgeInsets.fromLTRB( - 0, 0, 0, 0), - alignment: Alignment.center, - child: Image.network( - model.products[index] - .images.isNotEmpty - ? model - .products[index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.cover, - height: 80, - ), + ], ), - ], - ), - Column( - children: [ Container( - width: model.products[index] - .rxMessage != - null - ? MediaQuery.of(context) - .size - .width / - 5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular(6)), + margin: + EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, ), - child: Texts( - model.products[index] - .rxMessage != - null - ? model - .products[index] - .rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + if (model + .products[index] + .discountName != + null) + Container( + width: 250.0, + height: 22.5, + decoration: + BoxDecoration( + color: Color( + 0xff5AB145), + ), + child: Padding( + padding: EdgeInsets + .symmetric( + horizontal: 5.5, + ), + child: Texts( + model + .products[ + index] + .discountName, + regular: true, + color: Colors + .white, + fontSize: 12.0, + fontWeight: + FontWeight + .w700, + ), + ), + ), + SizedBox( + height: 4.0, + ), + Texts( + model.products[index] + .name, + regular: true, + fontSize: 14.0, + fontWeight: + FontWeight.w600, + ), + SizedBox( + height: 8.0, + ), + Padding( + padding: + const EdgeInsets + .only( + top: 4, + bottom: 4), + child: Texts( + "SAR ${model.products[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: model + .products[ + index] + .approvedRatingSum > + 0 + ? (model.products[index].approvedRatingSum.toDouble() / + model.products[index].approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: + true), + Texts( + "(${model.products[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight + .w500, + ) + ], + ), + ], ), ), ], ), - ], - ), - Container( - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - if (model.products[index] - .discountName != - null) - Container( - width: 250.0, - height: 22.5, - decoration: BoxDecoration( - color: Color(0xff5AB145), - ), - child: Padding( - padding: - EdgeInsets.symmetric( - horizontal: 5.5, - ), - child: Texts( - model.products[index] - .discountName, - regular: true, - color: Colors.white, - fontSize: 12.0, - fontWeight: - FontWeight.w700, - ), - ), - ), - SizedBox( - height: 4.0, - ), - Texts( - model.products[index].name, - regular: true, - fontSize: 14.0, - fontWeight: FontWeight.w600, - ), - SizedBox( - height: 8.0, - ), - Padding( - padding: - const EdgeInsets.only( - top: 4, bottom: 4), - child: Texts( - "SAR ${model.products[index].price}", - bold: true, - fontSize: 14, - ), - ), - Row( - children: [ - StarRating( - totalAverage: model - .products[ - index] - .approvedRatingSum > - 0 - ? (model - .products[ - index] - .approvedRatingSum - .toDouble() / - model - .products[ - index] - .approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: true), - Texts( - "(${model.products[index].approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w500, - ) - ], - ), - ], - ), - ), - ], - ), - ); - }), - ), - ) - ], - ), - ), - )); + ); + }), + ), + ) + ], + ), + ) + : Center( + child: Texts( + "SORRY , there's no listed offers now :(", + color: Colors.green, + )))); } } diff --git a/lib/pages/packages_offers/CreateCustomerDailogPage.dart b/lib/pages/packages_offers/CreateCustomerDailogPage.dart index 4cf5fa5b..73e95d09 100644 --- a/lib/pages/packages_offers/CreateCustomerDailogPage.dart +++ b/lib/pages/packages_offers/CreateCustomerDailogPage.dart @@ -20,6 +20,7 @@ import 'package:diplomaticquarterapp/widgets/AnimatedTextFields.dart'; import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; import 'package:diplomaticquarterapp/widgets/LoadingButton.dart'; import 'package:diplomaticquarterapp/widgets/carousel_indicator/carousel_indicator.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -104,7 +105,10 @@ class _CreateCustomerDialogPageState extends State wit child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text("Create Guest Customer"), + Align( + alignment: Alignment.center, + child: Texts("Create Guest Customer", textAlign: TextAlign.center, fontSize: 18, fontWeight: FontWeight.bold,) + ), SizedBox(height: 30,), AnimatedTextFormField( enabled: _enableInput, @@ -158,18 +162,6 @@ class _CreateCustomerDialogPageState extends State wit }, ) - // RaisedButton( - // child: Text( - // TranslationBase.of(context).done, - // style: TextStyle(fontSize: 15, color: Colors.white, fontWeight: FontWeight.bold), - // ), - // padding: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0), - // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5), side: BorderSide(color: Theme.of(context).primaryColor, width: 0.5)), - // color: Theme.of(context).primaryColor, - // onPressed: (){ - // - // }, - // ) , ], ), diff --git a/lib/pages/packages_offers/OfferAndPackageDetailPage.dart b/lib/pages/packages_offers/OfferAndPackageDetailPage.dart index a6711ded..d0e69d14 100644 --- a/lib/pages/packages_offers/OfferAndPackageDetailPage.dart +++ b/lib/pages/packages_offers/OfferAndPackageDetailPage.dart @@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/ProductCheckTypeWidget.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -86,35 +87,29 @@ class OfferAndPackagesDetailState extends State{ child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + Texts( "Child Dental Offer", - style: TextStyle( - fontWeight: FontWeight.normal, - color: Colors.black, - fontSize: 25 - ) + fontSize: 25, + fontWeight: FontWeight.normal, + color: Colors.black, ), Stack( children: [ - Text( + Texts( "200 SAR", - style: TextStyle( fontWeight: FontWeight.normal, decoration: TextDecoration.lineThrough, color: Colors.grey, fontSize: 12 - ) ), Padding( padding: const EdgeInsets.only(top: 15), - child: Text( + child: Texts( "894.99 SAR", - style: TextStyle( - fontWeight: FontWeight.bold, - color: Colors.green, - fontSize: 18 - ) + fontWeight: FontWeight.bold, + color: Colors.green, + fontSize: 18 ), ), ], @@ -130,13 +125,11 @@ class OfferAndPackagesDetailState extends State{ SizedBox(height: 20,), - Text( + Texts( "Details", - style: TextStyle( - fontWeight: FontWeight.bold, - color: Colors.grey, - fontSize: 20 - ) + fontWeight: FontWeight.bold, + color: Colors.grey, + fontSize: 20 ), @@ -147,7 +140,7 @@ class OfferAndPackagesDetailState extends State{ color: Colors.grey[300], child: Padding( padding: const EdgeInsets.all(10), - child: Text("Detail of offers written here ss"), + child: Texts("Detail of offers written here"), ) ), ), @@ -181,9 +174,9 @@ class OfferAndPackagesDetailState extends State{ size: 25, color: Colors.white, ), - label: Text( + label: Texts( "Add to Cart", - style: TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.normal), + fontSize: 17, color: Colors.white, fontWeight: FontWeight.normal, ), onPressed: (){},), ), @@ -203,9 +196,9 @@ class OfferAndPackagesDetailState extends State{ size: 25, color: Colors.red, ), - label: Text( + label: Texts( "Add to Favorites", - style: TextStyle(fontSize: 17, color: Colors.red, fontWeight: FontWeight.normal), + fontSize: 17, color: Colors.red, fontWeight: FontWeight.normal ), onPressed: (){ diff --git a/lib/pages/packages_offers/OfferAndPackagesCartPage.dart b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart index 72a82d0a..d39f726d 100644 --- a/lib/pages/packages_offers/OfferAndPackagesCartPage.dart +++ b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart @@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; import 'package:diplomaticquarterapp/widgets/carousel_indicator/carousel_indicator.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesCartItemCard.dart'; @@ -163,12 +164,10 @@ class _PackagesCartPageState extends State with AfterLayoutMix color: Colors.white, child: Column( children: [ - Text( + Texts( TranslationBase.of(context).selectPaymentOption, - style: TextStyle( fontSize: 10, fontWeight: FontWeight.bold - ), ), Container(height: 0.25, width: 100, color: Colors.grey[300],), @@ -307,9 +306,9 @@ Widget _termsAndCondition(BuildContext context, {@required Function(bool) onSele Expanded( child: Padding( padding: const EdgeInsets.symmetric(horizontal: 8), - child: Text( + child: Texts( TranslationBase.of(context).pharmacyServiceTermsCondition, - style: TextStyle(height: 1, fontWeight: FontWeight.normal, fontSize: 13), + fontWeight: FontWeight.normal, fontSize: 13, ), )), InkWell( @@ -341,9 +340,9 @@ Widget _payNow(BuildContext context, {@required VoidCallback onPayNowClick}) { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('${TranslationBase.of(context).subtotal}: ${'999.9'} ${TranslationBase.of(context).sar}', - style: TextStyle(height: 1.5, fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 8)), - Text('${TranslationBase.of(context).vat}: ${'14.9'} ${TranslationBase.of(context).sar}', style: TextStyle(height: 1.5, fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 8)), + Texts('${TranslationBase.of(context).subtotal}: ${'999.9'} ${TranslationBase.of(context).sar}', + heightFactor: 1.5, fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 8), + Texts('${TranslationBase.of(context).vat}: ${'14.9'} ${TranslationBase.of(context).sar}', heightFactor: 1.5, fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 8), Padding( padding: const EdgeInsets.all(3), child: Container( @@ -352,16 +351,16 @@ Widget _payNow(BuildContext context, {@required VoidCallback onPayNowClick}) { color: Colors.grey[300], ), ), - Text(' ${TranslationBase.of(context).total}: 999.99 ${TranslationBase.of(context).sar}', - style: TextStyle(height: 1.5, fontWeight: FontWeight.bold, color: Colors.black54, fontSize: 15)) + Texts('${TranslationBase.of(context).total}: 999.99 ${TranslationBase.of(context).sar}', + heightFactor: 1.5, fontWeight: FontWeight.bold, color: Colors.black54, fontSize: 15) ], ), ), Expanded(child: Container()), RaisedButton( - child: Text( + child: Texts( TranslationBase.of(context).payNow, - style: TextStyle(fontSize: 15, color: Colors.white, fontWeight: FontWeight.bold), + fontSize: 15, color: Colors.white, fontWeight: FontWeight.bold, ), padding: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5), side: BorderSide(color: Theme.of(context).primaryColor, width: 0.5)), @@ -394,13 +393,11 @@ Widget _cartItemDeleteContainer() { borderRadius: BorderRadius.all(Radius.circular(5)), ), child: Center( - child: Text( + child: Texts( "Deleting...", - style: TextStyle( fontWeight: FontWeight.normal, fontSize: 15, color: Colors.white, - ), )), ), ), diff --git a/lib/pages/packages_offers/OfferAndPackagesPage.dart b/lib/pages/packages_offers/OfferAndPackagesPage.dart index c908cba4..c09e10ea 100644 --- a/lib/pages/packages_offers/OfferAndPackagesPage.dart +++ b/lib/pages/packages_offers/OfferAndPackagesPage.dart @@ -18,6 +18,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; import 'package:diplomaticquarterapp/widgets/carousel_indicator/carousel_indicator.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -157,13 +158,11 @@ class _PackagesHomePageState extends State with AfterLayoutMix SizedBox(height: 20,), // Horizontal Scrollable Cards - Text( + Texts( "Latest offers", - style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black87, fontSize: 20 - ), ), // Latest Offers Horizontal Scrollable List @@ -178,13 +177,11 @@ class _PackagesHomePageState extends State with AfterLayoutMix SizedBox(height: 10,), - Text( + Texts( "Best sellers", - style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black87, fontSize: 20 - ), ), diff --git a/lib/pages/packages_offers/PackageOrderCompletedPage.dart b/lib/pages/packages_offers/PackageOrderCompletedPage.dart index c0a7db46..73baca4b 100644 --- a/lib/pages/packages_offers/PackageOrderCompletedPage.dart +++ b/lib/pages/packages_offers/PackageOrderCompletedPage.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; @@ -82,40 +83,31 @@ class PackageOrderCompletedPage extends StatelessWidget{ ); } - Widget headingWidget(BuildContext context) => Text( + Widget headingWidget(BuildContext context) => Texts( heading, textAlign: TextAlign.center, maxLines: 1, - style: TextStyle( color: Theme.of(context).primaryColor, fontSize: 35.0, fontWeight: FontWeight.bold, - letterSpacing: 0.9 - ) ); - Widget titleWidget(BuildContext context) => Text( + Widget titleWidget(BuildContext context) => Texts( title, textAlign: TextAlign.center, maxLines: 2, - style: TextStyle( color: Theme.of(context).primaryColor, fontSize: 25.0, fontWeight: FontWeight.w200, - letterSpacing: 0.9 - ) ); - Widget subTitleWidget(BuildContext context) => Text( + Widget subTitleWidget(BuildContext context) => Texts( subTitle, textAlign: TextAlign.center, maxLines: 2, - style: TextStyle( color: Theme.of(context).primaryColor, fontSize: 15.0, fontWeight: FontWeight.normal, - letterSpacing: 0.9 - ) ); @@ -129,13 +121,11 @@ class PackageOrderCompletedPage extends StatelessWidget{ borderRadius: new BorderRadius.circular(buttonHeight/2), ) ), - child: Text( + child: Texts( actionTitle, - style: TextStyle( color: Colors.white, fontSize: 18.0, fontWeight: FontWeight.normal, - ) ), onPressed: (){ Navigator.of(context).pop(); diff --git a/lib/pages/parent_categorise_page.dart b/lib/pages/parent_categorise_page.dart index 414106b1..a7e43241 100644 --- a/lib/pages/parent_categorise_page.dart +++ b/lib/pages/parent_categorise_page.dart @@ -1,24 +1,28 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/pages/sub_categorise_page.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/entity_checkbox_list.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:giffy_dialog/giffy_dialog.dart'; import 'base/base_view.dart'; -import 'final_products_page.dart'; class ParentCategorisePage extends StatefulWidget { String id; String titleName; + ParentCategorisePage({this.id, this.titleName}); + @override _ParentCategorisePageState createState() => _ParentCategorisePageState(id: id, titleName: titleName); @@ -27,7 +31,9 @@ class ParentCategorisePage extends StatefulWidget { class _ParentCategorisePageState extends State { String id; String titleName; + _ParentCategorisePageState({this.id, this.titleName}); + Map values = {'huusam': false, 'ali': false, 'noor': false}; bool checkedBrands = false; bool checkedCategorise = false; @@ -39,8 +45,14 @@ class _ParentCategorisePageState extends State { color: Colors.blue, size: 29.0, ); + + List entityList = List(); + List entityListBrands = List(); + @override Widget build(BuildContext context) { + TextEditingController minField = TextEditingController(); + TextEditingController maxField = TextEditingController(); ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getCategoriseParent(i: id), @@ -53,959 +65,988 @@ class _ParentCategorisePageState extends State { backgroundColor: Colors.white, isShowDecPage: false, baseViewModel: model, - body: Container( - child: ListView( - scrollDirection: Axis.vertical, - children: [ - Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: Image.network( - id == '1' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089188_personal-care_2.png' - : id == '2' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089189_skin-care_2.png' - : id == '3' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089190_health-care_2.png' - : id == '4' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089191_sexual-health_2.png' - : id == '5' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089192_beauty_2.png' - : id == '6' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089193_baby-child_2.png' - : id == '7' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089194_vitamins-supplements_2.png' - : id == '8' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089195_diet-nutrition_2.png' - : id == '9' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089196_household_2.png' - : id == '10' - ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089197_home-care-appliances_2.png' - : '', - fit: BoxFit.fill, - height: 160.0, - width: double.infinity), - ), - if (model.categoriseParent.length > 8) - Column( - crossAxisAlignment: CrossAxisAlignment.start, + body: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Image.network( + id == '1' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089188_personal-care_2.png' + : id == '2' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089189_skin-care_2.png' + : id == '3' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089190_health-care_2.png' + : id == '4' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089191_sexual-health_2.png' + : id == '5' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089192_beauty_2.png' + : id == '6' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089193_baby-child_2.png' + : id == '7' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089194_vitamins-supplements_2.png' + : id == '8' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089195_diet-nutrition_2.png' + : id == '9' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089196_household_2.png' + : id == '10' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089197_home-care-appliances_2.png' + : '', + fit: BoxFit.fill, + height: 160.0, + width: double.infinity), + ), + if (model.categoriseParent.length > 8) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: EdgeInsets.all(10.0), - child: InkWell( - child: Container( - child: Texts( - 'View All Categories', - fontWeight: FontWeight.w300, - ), - ), - onTap: () { - showModalBottomSheet( - isScrollControlled: true, - context: context, - builder: (BuildContext context) { - return Container( - height: MediaQuery.of(context) - .size - .height * - 0.89, - color: Colors.white, - child: Center( - child: ListView.builder( - scrollDirection: - Axis.vertical, - itemCount: model - .categoriseParent - .length, - itemBuilder: - (BuildContext context, - int index) { - return Container( - child: Padding( - padding: - EdgeInsets.all( - 8.0), - child: InkWell( - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Texts(model - .categoriseParent[ - index] - .name), - Divider( - thickness: - 0.6, - color: Colors - .black12, - ) - ], - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: - (context) => - SubCategorisePage( - title: model.categoriseParent[index].name, - id: model.categoriseParent[index].id, - parentId: id, - )), - ); - }, - ), + Padding( + padding: EdgeInsets.all(10.0), + child: InkWell( + child: Container( + child: Texts( + 'View All Categories', + fontWeight: FontWeight.w300, + ), + ), + onTap: () { + showModalBottomSheet( + isScrollControlled: true, + context: context, + builder: (BuildContext context) { + return Container( + // height: MediaQuery.of(context) + // .size + // .height * + // 0.89, + color: Colors.white, + child: Center( + child: ListView.builder( + scrollDirection: + Axis.vertical, + itemCount: model + .categoriseParent.length, + itemBuilder: + (BuildContext context, + int index) { + return Container( + child: Padding( + padding: + EdgeInsets.all(4.0), + child: InkWell( + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Texts(model + .categoriseParent[ + index] + .name), + Divider( + thickness: 0.6, + color: Colors + .black12, + ) + ], ), - ); - }), - ), - ); - }, + onTap: () { + Navigator.push( + context, + FadePage( + page: + SubCategorisePage( + title: model + .categoriseParent[ + index] + .name, + id: model + .categoriseParent[ + index] + .id, + parentId: id, + )), + ); + }, + ), + ), + ); + }), + ), ); }, - ), - ), - Icon(Icons.arrow_forward) - ], - ), - Divider( - thickness: 1.0, - color: Colors.grey.shade400, + ); + }, + ), ), + Icon(Icons.arrow_forward) ], ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + ], + ), //Expanded widget heree if nassery - Padding( - padding: EdgeInsets.only(top: 35.0), - child: Container( - height: MediaQuery.of(context).size.height * 0.2, - child: Center( - child: ListView.builder( - scrollDirection: Axis.horizontal, - itemCount: model.categoriseParent.length > 8 - ? 8 - : model.categoriseParent.length, - itemBuilder: - (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.symmetric( - horizontal: 8.0), - child: InkWell( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.symmetric( - horizontal: 13.0), - child: Container( - height: 60.0, - width: 65.0, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Colors - .orange.shade200 - .withOpacity(0.45), - ), - child: Center( - child: Icon( - Icons.apps_sharp, - size: 32.0, - ), - ), - ), + Padding( + padding: EdgeInsets.only(top: 35.0), + child: Container( + height: MediaQuery.of(context).size.height * 0.2, + child: Center( + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: model.categoriseParent.length > 8 + ? 8 + : model.categoriseParent.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: + EdgeInsets.symmetric(horizontal: 8.0), + child: InkWell( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.symmetric( + horizontal: 13.0), + child: Container( + height: 60.0, + width: 65.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.orange.shade200 + .withOpacity(0.45), ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.197, - height: MediaQuery.of(context) - .size - .height * - 0.08, - child: Center( - child: Texts( - projectViewModel.isArabic - ? model - .categoriseParent[ - index] - .namen - : model - .categoriseParent[ - index] - .name, - fontSize: 13.4, - fontWeight: FontWeight.w600, - maxLines: 3, - ), + child: Center( + child: Icon( + Icons.apps_sharp, + size: 32.0, ), ), - ], + ), ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - SubCategorisePage( - title: model - .categoriseParent[ - index] - .name, - id: model - .categoriseParent[ - index] - .id, - parentId: id, - )), - ); - print(id); - }, - ), - ); - }), - ), - ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.197, + // height: MediaQuery.of(context) + // .size + // .height * + // 0.08, + child: Center( + child: Texts( + projectViewModel.isArabic + ? model + .categoriseParent[index] + .namen + : model + .categoriseParent[index] + .name, + fontSize: 13.4, + fontWeight: FontWeight.w600, + maxLines: 3, + ), + ), + ), + ], + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: SubCategorisePage( + title: model + .categoriseParent[index].name, + id: model + .categoriseParent[index].id, + parentId: id, + )), + ); + print(id); + }, + ), + ); + }), ), + ), + ), - Divider( - thickness: 1.0, - color: Colors.grey.shade400, - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 8.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - InkWell( - child: Row( - children: [ - Icon( - Icons.wrap_text, - ), - SizedBox( - width: 10.0, - ), - Texts( - 'Refine', - fontWeight: FontWeight.w600, - ), - ], + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + child: Row( + children: [ + Icon( + Icons.wrap_text, ), - onTap: () { - showModalBottomSheet( - isScrollControlled: true, - context: context, - builder: (BuildContext context) { - return DraggableScrollableSheet( - initialChildSize: 0.95, - maxChildSize: 0.95, - minChildSize: 0.9, - builder: (BuildContext context, - ScrollController - scrollController) { - return SingleChildScrollView( - controller: scrollController, - child: Container( - height: MediaQuery.of(context) - .size - .height * - 1.95, - child: Column( - children: [ - Padding( - padding: - EdgeInsets.all(8.0), - child: Row( - children: [ - Icon( - Icons.wrap_text, - ), - SizedBox( - width: 10.0, - ), - Texts( - 'Refine', - fontWeight: - FontWeight - .w600, - ), - SizedBox( - width: 250.0, - ), - InkWell( - child: Texts( - 'Close', - color: - Colors.red, - fontWeight: - FontWeight - .w600, - fontSize: 15.0, - ), - onTap: () { - Navigator.pop( - context); - }, - ), - ], + SizedBox( + width: 10.0, + ), + Texts( + 'Refine', + fontWeight: FontWeight.w600, + ), + ], + ), + onTap: () { + showModalBottomSheet( + isScrollControlled: true, + context: context, + builder: (BuildContext context) { + return DraggableScrollableSheet( + initialChildSize: 0.95, + maxChildSize: 0.95, + minChildSize: 0.9, + builder: (BuildContext context, + ScrollController scrollController) { + return SingleChildScrollView( + controller: scrollController, + child: Container( + color: Colors.white, + height: MediaQuery.of(context) + .size + .height * + 1.95, + child: Column( + children: [ + Padding( + padding: + EdgeInsets.all(8.0), + child: Row( + children: [ + Icon( + Icons.wrap_text, + ), + SizedBox( + width: 10.0, + ), + Texts( + 'Refine', + fontWeight: + FontWeight.w600, ), + SizedBox( + width: 250.0, + ), + InkWell( + child: Texts( + 'Close', + color: Colors.red, + fontWeight: + FontWeight.w600, + fontSize: 15.0, + ), + onTap: () { + Navigator.pop( + context); + }, + ), + ], + ), + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + Column( + children: [ + ExpansionTile( + title: + Texts('Categorise'), + children: [ + ProcedureListWidget( + model: model, + masterList: model + .categoriseParent, + removeHistory: + (item) { + setState(() { + entityList + .remove( + item); + }); + }, + addHistory: + (history) { + setState(() { + entityList.add( + history); + }); + }, + addSelectedHistories: + () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: + (master) => + isEntityListSelected( + master), + ) + ], ), Divider( thickness: 1.0, color: Colors.black12, ), - Column( + ExpansionTile( + title: Texts('Brands'), children: [ - ExpansionTile( - title: Texts( - 'Categorise'), - children: [ - Container( - height: 350, - child: ListView - .builder( - controller: - scrollController, - scrollDirection: - Axis - .vertical, - shrinkWrap: - true, - itemCount: model - .categoriseParent - .length, - itemBuilder: - (BuildContext context, - int index) { - return CheckboxListTile( - tristate: - true, - title: - Texts(model.categoriseParent[index].name), - controlAffinity: - ListTileControlAffinity.leading, - value: - checkedCategorise, - onChanged: - (bool value) { - setState(() { - checkedCategorise = value; - }); - }, - ); - }), - ) - ], - ), - Divider( - thickness: 1.0, - color: - Colors.black12, - ), - ExpansionTile( - title: - Texts('Brands'), - children: [ - Container( - height: 350, - child: ListView - .builder( - scrollDirection: - Axis - .vertical, - shrinkWrap: - true, - itemCount: model - .brandsList - .length, - itemBuilder: - (BuildContext context, - int index) { - return CheckboxListTile( - tristate: - true, - title: - Texts(model.brandsList[index].name), - controlAffinity: - ListTileControlAffinity.leading, - value: - checkedBrands, - onChanged: - (bool value) { - setState(() { - checkedBrands = value; - }); - }, - autofocus: - true, - ); - }), - ) - ], - ), - Divider( - thickness: 1.0, - color: - Colors.black12, - ), - ExpansionTile( - title: - Texts('Price'), - children: [ - Container( - color: Color( - 0xffEEEEEE), - child: Row( + ProcedureListWidget( + model: model, + masterList: model + .brandsList, + removeHistory: + (item) { + setState(() { + entityListBrands + .remove( + item); + }); + }, + addHistory: + (history) { + setState(() { + entityListBrands + .add( + history); + }); + }, + addSelectedHistories: + () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: + (master) => + isEntityListSelectedBrands( + master), + ) + ], + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + ExpansionTile( + title: Texts('Price'), + children: [ + Container( + color: Color( + 0xffEEEEEE), + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceAround, + children: [ + Column( mainAxisAlignment: MainAxisAlignment - .spaceAround, + .start, children: [ - Column( - mainAxisAlignment: - MainAxisAlignment - .start, - children: [ - Texts( - 'Min'), - Container( - color: - Colors.white, - width: - 200, - height: - 40, - child: - TextFormField( - decoration: - InputDecoration( - border: OutlineInputBorder(), - ), - ), + Texts( + 'Min'), + Container( + color: Colors + .white, + width: + 200, + height: + 40, + child: + TextFormField( + decoration: + InputDecoration( + border: + OutlineInputBorder(), ), - ], + controller: + minField, + ), ), - Column( - mainAxisAlignment: - MainAxisAlignment - .start, - children: [ - Texts( - 'Max'), - Container( - color: - Colors.white, - width: - 200, - height: - 40, - child: - TextFormField( - decoration: - InputDecoration( - border: OutlineInputBorder(), - ), - ), + ], + ), + Column( + mainAxisAlignment: + MainAxisAlignment + .start, + children: [ + Texts( + 'Max'), + Container( + color: Colors + .white, + width: + 200, + height: + 40, + child: + TextFormField( + decoration: + InputDecoration( + border: + OutlineInputBorder(), ), - ], + controller: + maxField, + ), ), ], ), - ) - ], - ), - Divider( - thickness: 1.0, - color: - Colors.black12, - ), - SizedBox( - height: MediaQuery.of( - context) - .size - .height * - 0.4, - ), - Padding( - padding: - EdgeInsets.all( - 8.0), - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceEvenly, - children: [ - Container( - width: 100, - child: Button( - label: - 'Reset', - backgroundColor: - Colors - .red, - ), - ), - SizedBox( - width: 30, - ), - Container( - width: 200, - child: Button( - label: - 'Apply', - backgroundColor: - Colors - .green, - ), - ), ], ), - ), + ) ], ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + SizedBox( + height: MediaQuery.of( + context) + .size + .height * + 0.4, + ), + Padding( + padding: + EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceEvenly, + children: [ + Container( + width: 100, + child: Button( + label: 'Reset', + backgroundColor: + Colors.red, + ), + ), + SizedBox( + width: 30, + ), + Container( + width: 200, + child: Button( + onTap: () { + String + categoriesId = + ""; + for (CategoriseParentModel category + in entityList) { + if (categoriesId == + "") { + categoriesId = + category + .id; + } else { + categoriesId = + "$categoriesId,${category.id}"; + } + } + String + brandIds = + ""; + for (CategoriseParentModel brand + in entityListBrands) { + if (brandIds == + "") { + brandIds = + brand + .id; + } else { + brandIds = + "$brandIds,${brand.id}"; + } + } + + model.getFilteredProducts( + min: minField + .text + .toString(), + max: maxField + .text + .toString(), + categoryId: + categoriesId, + brandId: + brandIds); + }, + label: 'Apply', + backgroundColor: + Colors + .green, + ), + ), + ], + ), + ), ], ), - ), - ); - }); - }, - ); + ], + ), + ), + ); + }); }, - ), - Row( - children: [ - Container( - height: 44.0, - child: VerticalDivider( - color: Colors.black45, - thickness: 1.0, + ); + }, + ), + Row( + children: [ + Container( + height: 44.0, + child: VerticalDivider( + color: Colors.black45, + thickness: 1.0, //width: 0.3, // indent: 0.0, - ), - ), - Padding( - padding: EdgeInsets.all(8.0), - child: InkWell( - child: styleIcon, - onTap: () { - setState(() { - if (styleOne == true) { - styleOne = false; - styleTwo = true; - styleIcon = Icon( - Icons.auto_awesome_mosaic, - color: Colors.blue, - size: 29.0, - ); - } else { - styleOne = true; - styleTwo = false; - styleIcon = Icon( - Icons.widgets_sharp, - color: Colors.blue, - size: 29.0, - ); - } - }); - }, - ), - ), - ], + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: styleIcon, + onTap: () { + setState(() { + if (styleOne == true) { + styleOne = false; + styleTwo = true; + styleIcon = Icon( + Icons.auto_awesome_mosaic, + color: Colors.blue, + size: 29.0, + ); + } else { + styleOne = true; + styleTwo = false; + styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + } + }); + }, + ), ), ], ), - ), - Divider( - thickness: 1.0, - color: Colors.grey.shade400, - ), - styleOne == true - ? Container( - height: SizeConfig.screenHeight * 7.8, - child: GridView.builder( - physics: NeverScrollableScrollPhysics(), - gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - crossAxisSpacing: 0.5, - mainAxisSpacing: 2.0, - childAspectRatio: 0.9, - ), - itemCount: model.parentProducts.length, - itemBuilder: - (BuildContext context, int index) { - return NetworkBaseView( - baseViewModel: model, - child: Card( - color: model.parentProducts[index] - .discountName != - null - ? Color(0xffFFFF00) - : Colors.white, - elevation: 0, - shape: Border( - right: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - left: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - bottom: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - top: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), + ], + ), + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + styleOne == true + ? Container( + height: model.parentProducts.length * + MediaQuery.of(context).size.height * + 0.15, + child: GridView.builder( + physics: NeverScrollableScrollPhysics(), + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 0.9, + ), + itemCount: model.parentProducts.length, + itemBuilder: (BuildContext context, int index) { + return NetworkBaseView( + baseViewModel: model, + child: InkWell( + child: Card( + color: model.parentProducts[index] + .discountName != + null + ? Color(0xffFFFF00) + : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, ), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, + left: BorderSide( + color: Colors.grey.shade300, + width: 1, ), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topLeft: - Radius.circular(110.0), - ), - color: Colors.white, + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), ), - padding: EdgeInsets.symmetric( - horizontal: 0), - width: MediaQuery.of(context) - .size - .width / - 3, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Stack( - children: [ - if (model - .parentProducts[ - index] - .discountName != - null) - RotatedBox( - quarterTurns: 4, - child: Container( - decoration: - BoxDecoration(), - child: Padding( - padding: - EdgeInsets - .only( - right: 5.0, - top: 20.0, - bottom: 5.0, - ), - child: Texts( - 'offer' - .toUpperCase(), - color: - Colors.red, - fontSize: 13.0, - fontWeight: - FontWeight - .w900, - ), + color: Colors.white, + ), + padding: EdgeInsets.symmetric( + horizontal: 0), + width: MediaQuery.of(context) + .size + .width / + 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Stack( + children: [ + if (model + .parentProducts[ + index] + .discountName != + null) + RotatedBox( + quarterTurns: 4, + child: Container( + decoration: + BoxDecoration(), + child: Padding( + padding: + EdgeInsets.only( + right: 5.0, + top: 20.0, + bottom: 5.0, + ), + child: Texts( + 'offer' + .toUpperCase(), + color: Colors.red, + fontSize: 13.0, + fontWeight: + FontWeight + .w900, ), - transform: new Matrix4 - .rotationZ( - 5.837200), ), + transform: new Matrix4 + .rotationZ( + 5.837200), ), - Container( - margin: - EdgeInsets.fromLTRB( - 0, 16, 0, 0), - alignment: - Alignment.center, - child: Image.network( - model - .parentProducts[ - index] - .images - .isNotEmpty - ? model + ), + Container( + margin: + EdgeInsets.fromLTRB( + 0, 16, 0, 0), + alignment: + Alignment.center, + child: Image.network( + model + .parentProducts[ + index] + .images + .isNotEmpty + ? model + .parentProducts[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: model .parentProducts[ index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.cover, - height: 80, - ), + .rxMessage != + null + ? MediaQuery.of( + context) + .size + .width / + 5 + : 0, + padding: + EdgeInsets.all(4), + decoration: BoxDecoration( + color: + Color(0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular( + 6)), ), - Container( - width: model + child: Texts( + model .parentProducts[ index] .rxMessage != null - ? MediaQuery.of( - context) - .size - .width / - 5 - : 0, - padding: - EdgeInsets.all(4), - decoration: - BoxDecoration( - color: - Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular( - 6)), - ), - child: Texts( - model - .parentProducts[ - index] - .rxMessage != - null - ? model - .parentProducts[ - index] - .rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ), - ), - ], - ), - Container( - margin: - EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - if (model + ? model .parentProducts[ index] - .discountName != - null) - Container( - width: - double.infinity, - height: 13.0, - decoration: - BoxDecoration( - color: Color( - 0xff5AB145), - ), - child: Center( - child: Texts( - model - .parentProducts[ - index] - .discountName, - regular: true, - color: Colors - .white, - fontSize: 10.4, - ), - ), - ), - Texts( - model + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ), + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + if (model .parentProducts[ index] - .name, - regular: true, - fontSize: 12, - fontWeight: - FontWeight.w700, - ), - Padding( - padding: - const EdgeInsets - .only( - top: 4, - bottom: 4), - child: Texts( - "SAR ${model.parentProducts[index].price}", - bold: true, - fontSize: 14, + .discountName != + null) + Container( + width: + double.infinity, + height: 13.0, + decoration: + BoxDecoration( + color: Color( + 0xff5AB145), ), - ), - Row( - children: [ - StarRating( - totalAverage: model - .parentProducts[ - index] - .approvedRatingSum > - 0 - ? (model.parentProducts[index].approvedRatingSum.toDouble() / - model.parentProducts[index].approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: - true), - Texts( - "(${model.parentProducts[index].approvedTotalReviews})", + child: Center( + child: Texts( + model + .parentProducts[ + index] + .discountName, regular: true, - fontSize: 10, - fontWeight: - FontWeight - .w400, - ) - ], + color: + Colors.white, + fontSize: 10.4, + ), + ), ), - ], - ), + Texts( + model + .parentProducts[ + index] + .name, + regular: true, + fontSize: 12, + fontWeight: + FontWeight.w700, + ), + Padding( + padding: + const EdgeInsets + .only( + top: 4, + bottom: 4), + child: Texts( + "SAR ${model.parentProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: model + .parentProducts[ + index] + .approvedRatingSum > + 0 + ? (model.parentProducts[index].approvedRatingSum + .toDouble() / + model + .parentProducts[index] + .approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${model.parentProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ) + ], + ), + ], ), - ], - ), + ), + ], ), - )); - }, - ), - ) - : Container( - height: - MediaQuery.of(context).size.height * 5.0, - child: ListView.builder( - physics: NeverScrollableScrollPhysics(), - itemCount: model.parentProducts.length, - itemBuilder: - (BuildContext context, int index) { - return Card( - child: Row( - children: [ - Stack( - children: [ - Column( - children: [ - Container( - decoration: - BoxDecoration(), - child: Padding( - padding: - EdgeInsets.only( - left: 9.0, - top: 8.0, - right: 10.0, - ), + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model + .parentProducts[index]), + )), + }, + )); + }, + ), + ) + : Container( + height: model.parentProducts.length * + MediaQuery.of(context).size.height * + 0.122, + child: ListView.builder( + physics: NeverScrollableScrollPhysics(), + itemCount: model.parentProducts.length, + itemBuilder: + (BuildContext context, int index) { + return InkWell( + child: Card( + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + Container( + decoration: + BoxDecoration(), + child: Padding( + padding: + EdgeInsets.only( + left: 9.0, + top: 8.0, + right: 10.0, ), ), - Container( - margin: - EdgeInsets.fromLTRB( - 0, 0, 0, 0), - alignment: - Alignment.center, - child: Image.network( - model - .parentProducts[ - index] - .images - .isNotEmpty - ? model + ), + Container( + margin: + EdgeInsets.fromLTRB( + 0, 0, 0, 0), + alignment: + Alignment.center, + child: Image.network( + model + .parentProducts[ + index] + .images + .isNotEmpty + ? model + .parentProducts[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.contain, + height: 80, + ), + ), + ], + ), + Column( + children: [ + Container( + width: model .parentProducts[ index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.contain, - height: 80, - ), + .rxMessage != + null + ? MediaQuery.of( + context) + .size + .width / + 5 + : 0, + padding: + EdgeInsets.all(4), + decoration: BoxDecoration( + color: + Color(0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular( + 6)), ), - ], - ), - Column( - children: [ - Container( - width: model + child: Texts( + model .parentProducts[ index] .rxMessage != null - ? MediaQuery.of( - context) - .size - .width / - 5 - : 0, - padding: - EdgeInsets.all(4), - decoration: - BoxDecoration( - color: - Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular( - 6)), - ), - child: Texts( - model - .parentProducts[ - index] - .rxMessage != - null - ? model - .parentProducts[ - index] - .rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ), + ? model + .parentProducts[ + index] + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, ), - ], - ), - ], - ), - Container( - height: 100.0, - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - mainAxisAlignment: - MainAxisAlignment - .spaceAround, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - SizedBox( - height: 4.0, ), - Texts( + ], + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + mainAxisAlignment: + MainAxisAlignment + .spaceAround, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 4.0, + ), + Container( + width: + MediaQuery.of(context) + .size + .width * + 0.65, + child: Texts( model .parentProducts[index] .name, @@ -1015,60 +1056,89 @@ class _ParentCategorisePageState extends State { FontWeight.w500, maxLines: 5, ), - SizedBox( - height: 8.0, - ), - Padding( - padding: - const EdgeInsets.only( - top: 4, - bottom: 4), - child: Texts( - "SAR ${model.parentProducts[index].price}", - bold: true, - fontSize: 14, - ), - ), - Row( - children: [ - StarRating( - totalAverage: model - .parentProducts[ - index] - .approvedRatingSum > - 0 - ? (model.parentProducts[index].approvedRatingSum - .toDouble() / - model - .parentProducts[index] - .approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: true), - Texts( - "(${model.parentProducts[index].approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ) - ], + ), + SizedBox( + height: 8.0, + ), + Padding( + padding: + const EdgeInsets.only( + top: 4, bottom: 4), + child: Texts( + "SAR ${model.parentProducts[index].price}", + bold: true, + fontSize: 14, ), - ], - ), + ), + Row( + children: [ + StarRating( + totalAverage: model + .parentProducts[ + index] + .approvedRatingSum > + 0 + ? (model + .parentProducts[ + index] + .approvedRatingSum + .toDouble() / + model + .parentProducts[ + index] + .approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${model.parentProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ) + ], + ), + ], ), - ], - ), - ); - }), - ) - ], - ), - ), - ], + ), + ], + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage( + model.parentProducts[index]), + )), + }, + ); + }), + ) + ], + ), ), ), )); } + + bool isEntityListSelected(CategoriseParentModel masterKey) { + Iterable history = + entityList.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } + + bool isEntityListSelectedBrands(CategoriseParentModel masterKey) { + Iterable history = + entityListBrands.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } } diff --git a/lib/pages/pharmacies/compare.dart b/lib/pages/pharmacies/compare.dart index d1872187..505533cb 100644 --- a/lib/pages/pharmacies/compare.dart +++ b/lib/pages/pharmacies/compare.dart @@ -196,7 +196,9 @@ class _slideDetailState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - text: widget.data[index].specifications[0].name, + text: widget.data[index].specifications != null ? + widget.data[index].specifications[0].name : + "No data", style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black, @@ -211,7 +213,9 @@ class _slideDetailState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - text: widget.data[index].specifications[1].name, + text: widget.data[index].specifications != null ? + widget.data[index].specifications[1].name : + "No data", style: TextStyle( color: Colors.black54, fontSize: 15, @@ -234,7 +238,9 @@ class _slideDetailState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - text: widget.data[index].specifications[2].name, + text:widget.data[index].specifications != null ? + widget.data[index].specifications[2].name : + "No data", style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black, @@ -249,7 +255,9 @@ class _slideDetailState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - text: widget.data[index].specifications[3].name, + text: widget.data[index].specifications != null ? + widget.data[index].specifications[3].name : + "No data", style: TextStyle( color: Colors.black54, fontSize: 15, @@ -272,7 +280,9 @@ class _slideDetailState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - text: widget.data[index].specifications[4].name, + text:widget.data[index].specifications != null ? + widget.data[index].specifications[4].name : + "No data", style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black, @@ -287,7 +297,9 @@ class _slideDetailState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - text: widget.data[index].specifications[5].name, + text:widget.data[index].specifications != null ? + widget.data[index].specifications[5].name : + "No data", style: TextStyle( color: Colors.black54, fontSize: 15, diff --git a/lib/pages/pharmacies/medicine_search_screen.dart b/lib/pages/pharmacies/medicine_search_screen.dart index 7a61dabe..5c31f2de 100644 --- a/lib/pages/pharmacies/medicine_search_screen.dart +++ b/lib/pages/pharmacies/medicine_search_screen.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; @@ -121,8 +122,8 @@ class MedicineSearch extends StatelessWidget { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => PharmaciesList( + FadePage( + page: PharmaciesList( medicineID: model.pharmacy[index].itemID, imageURL: model diff --git a/lib/pages/pharmacies/product-brands.dart b/lib/pages/pharmacies/product-brands.dart index b9e6db95..e2fefab0 100644 --- a/lib/pages/pharmacies/product-brands.dart +++ b/lib/pages/pharmacies/product-brands.dart @@ -1,14 +1,15 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/pages/final_products_page.dart'; import 'package:diplomaticquarterapp/pages/login/register-info.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/brand_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/search_brands_page.dart'; -import 'package:diplomaticquarterapp/pages/search_products_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/brand_view_model.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; class ProductBrandsPage extends StatefulWidget { @override @@ -16,8 +17,8 @@ class ProductBrandsPage extends StatefulWidget { } var languageID; -class _ProductBrandsPageState extends State { +class _ProductBrandsPageState extends State { @override void initState() { super.initState(); @@ -27,6 +28,7 @@ class _ProductBrandsPageState extends State { @override Widget build(BuildContext context) { return BaseView( + allowAny: true, onModelReady: (model) => model.getBrandsData(), builder: (_, model, wi) => AppScaffold( appBarTitle: 'Brands page', @@ -38,18 +40,11 @@ class _ProductBrandsPageState extends State { children: [ Container( color: Colors.white, - alignment: languageID == 'ar'? - Alignment.topRight : - Alignment.topLeft, - padding: languageID == 'ar' ? - EdgeInsets.only( - right: 10.0, - top: 10.0 - ): - EdgeInsets.only( - left: 10.0, - top: 10.0 - ), + alignment: + languageID == 'ar' ? Alignment.topRight : Alignment.topLeft, + padding: languageID == 'ar' + ? EdgeInsets.only(right: 10.0, top: 10.0) + : EdgeInsets.only(left: 10.0, top: 10.0), child: Text( TranslationBase.of(context).topBrands, style: TextStyle( @@ -61,7 +56,7 @@ class _ProductBrandsPageState extends State { height: 220, width: double.infinity, color: Colors.white, - child: topBrand(), + child: topBrand(context), ), SizedBox( height: 10, @@ -93,8 +88,7 @@ class _ProductBrandsPageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => SearchBrandsPage()), + FadePage(page: SearchBrandsPage()), ); }, ), @@ -103,7 +97,7 @@ class _ProductBrandsPageState extends State { height: 10, ), Container( - height: 230, + height: 290, width: double.infinity, color: Colors.white, child: ListView.builder( @@ -116,7 +110,9 @@ class _ProductBrandsPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - languageID == 'ar' ? Text(model.brandsListList[index].namen):Text(model.brandsListList[index].name), + languageID == 'ar' + ? Text(model.brandsListList[index].namen) + : Text(model.brandsListList[index].name), SizedBox( height: 3, ), @@ -124,8 +120,15 @@ class _ProductBrandsPageState extends State { ], ), ), - onTap: (){ - print("ENAD"); + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => FinalProductsPage( + id: model.brandsListList[index].id + .toString(), + )), + ); }, ); }), @@ -138,9 +141,9 @@ class _ProductBrandsPageState extends State { } } - -topBrand() { +topBrand(BuildContext context) { return BaseView( + allowAny: true, onModelReady: (model) => model.getTopBrandsData(), builder: (_, model, wi) => GridView.count( crossAxisCount: 4, @@ -156,31 +159,39 @@ topBrand() { child: Container( // padding: EdgeInsets.only(left: 5), child: Container( - padding: EdgeInsets.symmetric( - horizontal: 10.0, vertical: 10.0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - border: Border( - top: BorderSide(width: 1.0, color: Colors.grey), - left: BorderSide(width: 1.0, color: Colors.grey), - right: BorderSide(width: 1.0, color: Colors.grey), - bottom: BorderSide(width: 1.0, color: Colors.grey), + padding: EdgeInsets.symmetric( + horizontal: 10.0, vertical: 10.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border( + top: BorderSide(width: 1.0, color: Colors.grey), + left: BorderSide(width: 1.0, color: Colors.grey), + right: BorderSide(width: 1.0, color: Colors.grey), + bottom: + BorderSide(width: 1.0, color: Colors.grey), + ), + color: Colors.white, ), - color: Colors.white, - ), - child: model.topBrandsListList[index].image != null ?Image.network( - model.topBrandsListList[index].image.src, - fit: BoxFit.cover, - width: 60, - height: 40, - ): Text(model.topBrandsListList[index].name) - ), + child: model.topBrandsListList[index].image != null + ? Image.network( + model.topBrandsListList[index].image.src, + fit: BoxFit.cover, + width: 60, + height: 40, + ) + : Text(model.topBrandsListList[index].name)), ), ), ), ), - onTap: (){ - print("ENAD"); + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => FinalProductsPage( + id: model.topBrandsListList[index].id.toString(), + )), + ); }, ), ], diff --git a/lib/pages/pharmacies/product_detail.dart b/lib/pages/pharmacies/product_detail.dart index 6cd3a7d1..bd776355 100644 --- a/lib/pages/pharmacies/product_detail.dart +++ b/lib/pages/pharmacies/product_detail.dart @@ -1,32 +1,37 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/login/welcome.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scafold_detail_page.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + import 'screens/cart-order-page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart'; int price = 0; var languageID; bool isOverQuantity = false; bool isInWishlit = false; -var itemID; -var product; +String itemID; var customerId; CompareList compareItems = new CompareList(); PharmacyProduct specificationData; class ProductDetailPage extends StatefulWidget { final PharmacyProduct product; + ProductDetailPage(this.product); + @override __ProductDetailPageState createState() => __ProductDetailPageState(); } @@ -37,16 +42,51 @@ class __ProductDetailPageState extends State { bool isReviews = false; bool isAvailabilty = false; dynamic wishlistItems; + var model; + + // String ProductId="4561"; + String productId = ""; + + checkWishlist() async { + GifLoaderDialogUtils.showMyDialog(context); + ProductDetailViewModel x = new ProductDetailViewModel(); + await x.checkWishlistData(); + +// isInWishlit = x.wishListItems.map((e) => e.id.toString()).toList().contains(itemID); + + for (int i = 0; i < x.wishListItems.length; i++) { + if (itemID == x.wishListItems[i].product.id) { + isInWishlit = true; + break; + } else { + isInWishlit = false; + } + } + GifLoaderDialogUtils.hideDialog(context); + setState(() {}); + } void initState() { price = 1; specificationData = widget.product; - setState(() { - customerId = userInfo(widget.product.id, widget.product); - }); + userInfo(); super.initState(); } + void userInfo() async { + print(specificationData); + customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + if (customerId != null) { + itemID = widget.product.id; + checkWishlist(); +// getSpecificationData(itemID); + } + print("customerId:$customerId"); + + setState(() {}); +// getSpecificationData(itemID); + } + Widget build(BuildContext context) { return customerId != null ? DetailPageScafold( @@ -80,12 +120,18 @@ class __ProductDetailPageState extends State { alignment: Alignment.centerRight, child: languageID == 'ar' ? Text( - widget.product.discountDescriptionn, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17), + widget.product + .discountDescriptionn, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 17), ) : Text( - widget.product.discountDescription, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17), + widget.product + .discountDescription, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 17), ), ), ), @@ -96,7 +142,8 @@ class __ProductDetailPageState extends State { flex: 0, child: Container( child: Image( - image: AssetImage('assets/images/offer.png'), + image: AssetImage( + 'assets/images/offer.png'), ), ), ), @@ -153,7 +200,7 @@ class __ProductDetailPageState extends State { ), Container( width: 500, - margin: EdgeInsets.only(bottom: 100), + margin: EdgeInsets.only(bottom: 6), // height: 350, color: Colors.white, child: Column( @@ -174,7 +221,9 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).details, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold), ), color: Colors.white, ), @@ -202,7 +251,9 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).reviews, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold), ), color: Colors.white, ), @@ -230,7 +281,9 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).availability, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold), ), color: Colors.white, ), @@ -252,139 +305,247 @@ class __ProductDetailPageState extends State { ? Padding( padding: const EdgeInsets.all(8.0), child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: Text( - TranslationBase.of(context).description, - style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600), + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + child: Text( + TranslationBase.of(context) + .description, + style: TextStyle( + fontSize: 17, + color: Colors.grey, + fontWeight: FontWeight.w600), + ), ), - ), - SizedBox( - height: 10, - ), - Container( - child: Text( - languageID == 'ar' ? widget.product.shortDescriptionn : widget.product.shortDescription ?? "", - style: TextStyle(fontSize: 16, fontFamily: 'WorkSans-Regular'), + SizedBox( + height: 10, ), - ), - SizedBox( - height: 10, - ), - Container( - child: Text( - TranslationBase.of(context).howToUse, - style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600), + Divider(height: 1, color: Colors.grey), + SizedBox( + height: 15, ), - ), - SizedBox( - height: 10, - ), - Container( - child: Text( - languageID == 'ar' ? widget.product.fullDescriptionn : widget.product.fullDescription, - style: TextStyle(fontSize: 16, fontFamily: 'WorkSans-Regular'), + Container( + child: Text( + languageID == 'ar' + ? widget.product.fullDescriptionn + : widget.product + .fullDescription ?? + "", + style: TextStyle( + fontSize: 16, + fontFamily: 'WorkSans-Regular'), + ), ), - ), - ], - ), + SizedBox( + height: 20, + ), + ]), ) + +// Container( +// child: Text( +// languageID == 'ar' +// ? widget.product.fullDescriptionn +// : widget.product.fullDescription, +// style: TextStyle( +// fontSize: 16, +// fontFamily: 'WorkSans-Regular'), +// ), +// ), +// SizedBox( +// height: 10, +// ), +// Container( +// child: Text( +// TranslationBase.of(context).howToUse, +// style: TextStyle( +// fontSize: 17, +// color: Colors.grey, +// fontWeight: FontWeight.w600), +// ), +// ), +// SizedBox( +// height: 6, +// ), +// Divider( +// height: 2, +// color: Colors.grey), +// SizedBox( +// height: 10, +// ), +// Container( +// child: Text( +// languageID == 'ar' +// ? widget.product.shortDescriptionn +// : widget.product.shortDescription, +// style: TextStyle( +// fontSize: 16, +// fontFamily: 'WorkSans-Regular'), +// ), +// ), + // ], + // ), + // ) : isReviews ? BaseView( - onModelReady: (model) => model.getProductReviewsData(widget.product.id), - builder: (_, model, wi) => - model.productDetailService.length != 0 && model.productDetailService[0].reviews.length != 0 - ? ListView.builder( - physics: ScrollPhysics(), - itemCount: model.productDetailService[0].reviews.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: Row( - children: [ - Container( - child: Text( - model.productDetailService[0].reviews[index].customerId.toString(), - style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600), - ), - ), - Container( - margin: EdgeInsets.only(left: 210), - child: RatingBar.readOnly( - initialRating: model.productDetailService[0].reviews[index].rating.toDouble(), - size: 15.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - ), - ], + onModelReady: (model) => + model.getProductReviewsData( + widget.product.id), + builder: (_, model, wi) => model + .productDetailService + .length != + 0 && + model.productDetailService[0] + .reviews.length != + 0 + ? ListView.builder( + physics: ScrollPhysics(), + itemCount: model + .productDetailService[0] + .reviews + .length, + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemBuilder: (BuildContext context, + int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + child: Row( + children: [ + Container( + child: Text( + model + .productDetailService[ + 0] + .reviews[ + index] + .customerId + .toString(), + style: TextStyle( + fontSize: 17, + color: Colors + .grey, + fontWeight: + FontWeight + .w600), + ), ), - ), - SizedBox( - height: 10, - ), - Container( - child: Text( - model.productDetailService[0].reviews[index].reviewText, - style: TextStyle(fontSize: 20), + Container( + margin: + EdgeInsets.only( + left: 210), + child: RatingBar + .readOnly( + initialRating: model + .productDetailService[ + 0] + .reviews[ + index] + .rating + .toDouble(), + size: 15.0, + filledColor: + Colors.yellow[ + 700], + emptyColor: Colors + .grey[500], + isHalfAllowed: + true, + halfFilledIcon: + Icons + .star_half, + filledIcon: + Icons.star, + emptyIcon: + Icons.star, + ), ), - ), - SizedBox( - height: 50, - ), - Divider(height: 1, color: Colors.grey), - ], + ], + ), ), - ); - }, - ) - : Container( - padding: EdgeInsets.all(15), - alignment: Alignment.center, - child: Text('No Reviews Available'), - ), + SizedBox( + height: 10, + ), + Container( + child: Text( + model + .productDetailService[ + 0] + .reviews[index] + .reviewText, + style: TextStyle( + fontSize: 20), + ), + ), + SizedBox( + height: 50, + ), + Divider( + height: 1, + color: Colors.grey), + ], + ), + ); + }, + ) + : Container( + padding: EdgeInsets.all(15), + alignment: Alignment.center, + child: Text('No Reviews Available'), + ), ) : isAvailabilty ? BaseView( - onModelReady: (model) => model.getProductLocationData(), - builder: (_, model, wi) => model.productLocationService.length == 0 + onModelReady: (model) => + model.getProductLocationData(), + builder: (_, model, wi) => model + .productLocationService + .length == + 0 ? Container( padding: EdgeInsets.all(15), alignment: Alignment.center, - child: Text('No location Available'), + child: Text( + 'No location Available'), ) : ListView.builder( physics: ScrollPhysics(), scrollDirection: Axis.vertical, shrinkWrap: true, - itemCount: model.productLocationService.length, - itemBuilder: (BuildContext context, int index) { + itemCount: model + .productLocationService + .length, + itemBuilder: + (BuildContext context, + int index) { return Padding( - padding: EdgeInsets.all(8.0), + padding: + EdgeInsets.all(8.0), child: Column( // crossAxisAlignment: CrossAxisAlignment.start, // mainAxisAlignment: MainAxisAlignment.start, children: [ Row( // crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .start, children: [ Expanded( flex: 1, - child: Image.network(model.productLocationService[index].projectImageUrl), + child: Image.network(model + .productLocationService[ + index] + .projectImageUrl), ), SizedBox( width: 10, @@ -392,31 +553,48 @@ class __ProductDetailPageState extends State { Expanded( flex: 4, child: Text( - model.productLocationService[index].locationDescription + + model + .productLocationService[ + index] + .locationDescription + "\n" + - fixingString(model.productLocationService[0].cityName.toString()), - style: TextStyle(fontSize: 12), + fixingString(model + .productLocationService[ + 0] + .cityName + .toString()), + style: TextStyle( + fontSize: + 12), ), ), Expanded( flex: 1, child: IconButton( - icon: Icon(Icons.location_on), - color: Colors.red, - onPressed: () {}, + icon: Icon(Icons + .location_on), + color: + Colors.red, + onPressed: + () {}, ), ), Expanded( flex: 1, child: IconButton( - icon: Icon(Icons.phone), - color: Colors.red, - onPressed: () {}, + icon: Icon(Icons + .phone), + color: + Colors.red, + onPressed: + () {}, ), ), ], ), - Divider(height: 1.2, color: Colors.grey) + Divider( + height: 1.2, + color: Colors.grey) ], ), ); @@ -427,12 +605,300 @@ class __ProductDetailPageState extends State { ], ), ), -// ListView(scrollDirection: Axis.vertical, shrinkWrap: true, children: [Text('ENAD')]), + Row( + children: [ +// Container( +// width: 500, +// height: 100, +// margin: EdgeInsets.only(bottom: 100), +// color: Colors.white, +// child: Text("ENAD TEST"), +// ), + Container( + width: 410, + height: 50, + // margin: EdgeInsets.only(bottom: 5), + color: Colors.white, + child: Texts( + TranslationBase.of(context).recommended, + bold: true, + ), + ), + ], + ), + SingleChildScrollView( + child: Container( + color: Colors.white, + child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, +// mainAxisSize: MainAxisSize.min, + children: [ + Container( + color: Colors.white, + height: 210, + margin: EdgeInsets.only(bottom: 75), + padding: EdgeInsets.only(bottom: 5), + // margin: EdgeInsets.symmetric(horizontal: 6, vertical: 4), + child: BaseView( + onModelReady: (model) => + model.getRecommendedProducts( + widget.product.id.toString()), + builder: (_, model, wi) => Container( + child: +// Text(model.recommendedProductList[0].id), + model.recommendedProductList.length != + null + ? Expanded( + child: ListView.builder( + scrollDirection: + Axis.horizontal, + shrinkWrap: true, + physics: ScrollPhysics(), + // physics: NeverScrollableScrollPhysics(), + itemCount: model + .recommendedProductList + .length, + itemBuilder: + (context, index) { + return Card( + elevation: 2, + shape: RoundedRectangleBorder( + side: BorderSide( + color: Colors + .grey[ + 300], + width: 2), + borderRadius: + BorderRadius + .circular( + 10)), + margin: EdgeInsets + .symmetric( + horizontal: 8, + vertical: 0, + ), + child: Container( + decoration: + BoxDecoration( + borderRadius: + BorderRadius + .all( + Radius.circular( + 15), + ), + ), + padding: EdgeInsets + .symmetric( + horizontal: + 4), + width: MediaQuery.of( + context) + .size + .width / + 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Stack( + children: [ + Container( + child: Align( + alignment: Alignment.topRight, + child: //true + itemID.contains(model.recommendedProductList[index].id) + // !isInWishlist + ? IconButton( + icon: Icon(Icons.favorite_border), + color: Colors.grey, + iconSize: 30, + onPressed: () { + setState(() { + addToWishlistFunction(itemID); + }); + }, + ) + : IconButton( + icon: Icon(Icons.favorite), + color: Colors.red, + iconSize: 30, + onPressed: () { + setState(() { + deleteFromWishlistFunction(itemID); + }); + }, + ) +// + ), + ), + Container( + margin: EdgeInsets.fromLTRB( + 0, + 16, + 10, + 16), + alignment: + Alignment.center, +// padding: EdgeInsets.only(left: 25, bottom: 20), + child: (model.recommendedProductList[index].images != null && + model.recommendedProductList[index].images.length > 0) + ? Image.network( + model.recommendedProductList[index].images[0].src.toString(), +// item.images[0].src, + fit: BoxFit.cover, + height: 60, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 60, + ), + ), + Container( + width: model.recommendedProductList[index].rxMessage != + null + ? MediaQuery.of(context).size.width / + 5 + : 0, + padding: + EdgeInsets.all(4), + decoration: + BoxDecoration( + color: + Color(0xffb23838), + borderRadius: + BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: + Texts( + model.recommendedProductList[index].rxMessage != null + ? model.recommendedProductList[index].rxMessage + : "", + color: + Colors.white, + regular: + true, + fontSize: + 10, + fontWeight: + FontWeight.w400, + ), + ), + ]), + Container( + margin: EdgeInsets + .symmetric( + horizontal: + 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Text( + languageID == + "ar" + ? model.recommendedProductList[index].namen + : model.recommendedProductList[index].name, + style: + TextStyle( + color: + Colors.black, + fontSize: + 13.0, +// fontWeight: FontWeight.bold, + ), + ), + Padding( +// padding: const EdgeInsets.only(top: 15, bottom: 10), + padding: const EdgeInsets.only( + top: + 10, + bottom: + 5), + child: + Texts( + "SAR ${model.recommendedProductList[index].price}", + bold: + true, + fontSize: + 14, + ), + ), + ], + ), + ), + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: < + Widget>[ + Container( + padding: + EdgeInsets.only(right: 10), +// margin: EdgeInsets.only(left: 5), + child: + Align( + alignment: + Alignment.topLeft, + child: + RatingBar.readOnly( + initialRating: + model.recommendedProductList[index].approvedRatingSum.toDouble(), +// initialRating: productRate, + size: + 13.0, + filledColor: + Colors.yellow[700], + emptyColor: + Colors.grey[500], + isHalfAllowed: + true, + halfFilledIcon: + Icons.star_half, + filledIcon: + Icons.star, + emptyIcon: + Icons.star, + ), + ), + ), + Texts( + "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +// bold: true, + fontSize: + 12, + ), + ]), + ], + ), + ), + ); + }), + ) + : Container( +// child: Text("NO DATA"), + ), + )), + ), + ], + ), + ), + ) ], ), ), - bottomSheet: footerWidget(widget.product.stockAvailability != 'Out of stock', widget.product.orderMaximumQuantity, - widget.product.orderMinimumQuantity, widget.product.stockQuantity, widget.product), + bottomSheet: footerWidget( + widget.product.stockAvailability != 'Out of stock', + widget.product.orderMaximumQuantity, + widget.product.orderMinimumQuantity, + widget.product.stockQuantity, + widget.product), ) : AppScaffold( appBarTitle: 'product detail page', @@ -465,12 +931,18 @@ class __ProductDetailPageState extends State { alignment: Alignment.centerRight, child: languageID == 'ar' ? Text( - widget.product.discountDescriptionn, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17), + widget.product + .discountDescriptionn, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 17), ) : Text( - widget.product.discountDescription, - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17), + widget.product + .discountDescription, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 17), ), ), ), @@ -481,7 +953,8 @@ class __ProductDetailPageState extends State { flex: 0, child: Container( child: Image( - image: AssetImage('assets/images/offer.png'), + image: AssetImage( + 'assets/images/offer.png'), ), ), ), @@ -551,7 +1024,9 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).details, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold), ), color: Colors.white, ), @@ -579,7 +1054,9 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).reviews, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold), ), color: Colors.white, ), @@ -607,7 +1084,9 @@ class __ProductDetailPageState extends State { }, child: Text( TranslationBase.of(context).availability, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold), ), color: Colors.white, ), @@ -635,16 +1114,56 @@ class __ProductDetailPageState extends State { Container( child: Text( TranslationBase.of(context).description, - style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600), + style: TextStyle( + fontSize: 17, + color: Colors.grey, + fontWeight: FontWeight.w600), + ), + ), + SizedBox( + height: 6, + ), + Divider(height: 1, color: Colors.grey), + SizedBox( + height: 10, + ), + Container( + child: Text( + languageID == 'ar' + ? widget.product.shortDescriptionn + : widget.product.shortDescription, + style: TextStyle( + fontSize: 16, + fontFamily: 'WorkSans-Regular'), + ), + ), + SizedBox( + height: 10, + ), + Container( + child: Text( + TranslationBase.of(context).howToUse, + style: TextStyle( + fontSize: 17, + color: Colors.grey, + fontWeight: FontWeight.w600), ), ), + SizedBox( + height: 6, + ), + Divider(height: 2, color: Colors.grey), SizedBox( height: 10, ), Container( child: Text( - languageID == 'ar' ? widget.product.fullDescriptionn : widget.product.fullDescription, - style: TextStyle(fontSize: 16, fontFamily: 'WorkSans-Regular'), + languageID == 'ar' + ? widget.product.fullDescriptionn + : widget.product.fullDescription, + style: TextStyle( + fontSize: 16, + fontFamily: 'WorkSans-Regular'), ), ), ], @@ -652,79 +1171,132 @@ class __ProductDetailPageState extends State { ) : isReviews ? BaseView( - onModelReady: (model) => model.getProductReviewsData(widget.product.id), - builder: (_, model, wi) => - model.productDetailService.length != 0 && model.productDetailService[0].reviews.length != 0 - ? ListView.builder( - physics: ScrollPhysics(), - itemCount: model.productDetailService[0].reviews.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: Row( - children: [ - Container( - child: Text( - model.productDetailService[0].reviews[index].customerId.toString(), - style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600), - ), - ), - Container( - margin: EdgeInsets.only(left: 210), - child: RatingBar.readOnly( - initialRating: model.productDetailService[0].reviews[index].rating.toDouble(), - size: 15.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - ), - ], + onModelReady: (model) => + model.getProductReviewsData( + widget.product.id), + builder: (_, model, wi) => model + .productDetailService + .length != + 0 && + model.productDetailService[0] + .reviews.length != + 0 + ? ListView.builder( + physics: ScrollPhysics(), + itemCount: model + .productDetailService[0] + .reviews + .length, + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemBuilder: (BuildContext context, + int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + child: Row( + children: [ + Container( + child: Text( + model + .productDetailService[ + 0] + .reviews[ + index] + .customerId + .toString(), + style: TextStyle( + fontSize: 17, + color: Colors + .grey, + fontWeight: + FontWeight + .w600), + ), ), - ), - SizedBox( - height: 10, - ), - Container( - child: Text( - model.productDetailService[0].reviews[index].reviewText, - style: TextStyle(fontSize: 20), + Container( + margin: + EdgeInsets.only( + left: 210), + child: RatingBar + .readOnly( + initialRating: model + .productDetailService[ + 0] + .reviews[ + index] + .rating + .toDouble(), + size: 15.0, + filledColor: + Colors.yellow[ + 700], + emptyColor: Colors + .grey[500], + isHalfAllowed: + true, + halfFilledIcon: + Icons + .star_half, + filledIcon: + Icons.star, + emptyIcon: + Icons.star, + ), ), - ), - SizedBox( - height: 50, - ), - Divider(height: 1, color: Colors.grey), - ], + ], + ), ), - ); - }, - ) - : Container( - padding: EdgeInsets.all(15), - alignment: Alignment.center, - child: Text('No Reviews Available'), - ), + SizedBox( + height: 10, + ), + Container( + child: Text( + model + .productDetailService[ + 0] + .reviews[index] + .reviewText, + style: TextStyle( + fontSize: 20), + ), + ), + SizedBox( + height: 50, + ), + Divider( + height: 1, + color: Colors.grey), + ], + ), + ); + }, + ) + : Container( + padding: EdgeInsets.all(15), + alignment: Alignment.center, + child: Text('No Reviews Available'), + ), ) : isAvailabilty ? BaseView( - onModelReady: (model) => model.getProductLocationData(), - builder: (_, model, wi) => ListView.builder( + onModelReady: (model) => + model.getProductLocationData(), + builder: (_, model, wi) => + ListView.builder( physics: ScrollPhysics(), scrollDirection: Axis.vertical, shrinkWrap: true, - itemCount: model.productLocationService.length, - itemBuilder: (BuildContext context, int index) { + itemCount: model + .productLocationService.length, + itemBuilder: (BuildContext context, + int index) { return Padding( padding: EdgeInsets.all(8.0), child: Column( @@ -733,11 +1305,15 @@ class __ProductDetailPageState extends State { children: [ Row( // crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, children: [ Expanded( flex: 1, - child: Image.network(model.productLocationService[index].projectImageUrl), + child: Image.network(model + .productLocationService[ + index] + .projectImageUrl), ), SizedBox( width: 10, @@ -745,16 +1321,25 @@ class __ProductDetailPageState extends State { Expanded( flex: 4, child: Text( - model.productLocationService[index].locationDescription + + model + .productLocationService[ + index] + .locationDescription + "\n" + - fixingString(model.productLocationService[0].cityName.toString()), - style: TextStyle(fontSize: 12), + fixingString(model + .productLocationService[ + 0] + .cityName + .toString()), + style: TextStyle( + fontSize: 12), ), ), Expanded( flex: 1, child: IconButton( - icon: Icon(Icons.location_on), + icon: Icon(Icons + .location_on), color: Colors.red, onPressed: () {}, ), @@ -762,14 +1347,17 @@ class __ProductDetailPageState extends State { Expanded( flex: 1, child: IconButton( - icon: Icon(Icons.phone), + icon: + Icon(Icons.phone), color: Colors.red, onPressed: () {}, ), ), ], ), - Divider(height: 1.2, color: Colors.grey) + Divider( + height: 1.2, + color: Colors.grey) ], ), ); @@ -784,8 +1372,12 @@ class __ProductDetailPageState extends State { ], ), ), - bottomSheet: footerWidget(widget.product.stockAvailability != 'Out of stock', widget.product.orderMaximumQuantity, - widget.product.orderMinimumQuantity, widget.product.stockQuantity, widget.product), + bottomSheet: footerWidget( + widget.product.stockAvailability != 'Out of stock', + widget.product.orderMaximumQuantity, + widget.product.orderMinimumQuantity, + widget.product.stockQuantity, + widget.product), ); } } @@ -796,7 +1388,10 @@ class footerWidget extends StatefulWidget { final int minQuantity; final int quantityLimit; final PharmacyProduct item; - footerWidget(this.isAvailble, this.maxQuantity, this.minQuantity, this.quantityLimit, this.item); + + footerWidget(this.isAvailble, this.maxQuantity, this.minQuantity, + this.quantityLimit, this.item); + @override _footerWidgetState createState() => _footerWidgetState(); } @@ -804,6 +1399,7 @@ class footerWidget extends StatefulWidget { class _footerWidgetState extends State { double quantityUI = 70; bool showUI = false; + @override Widget build(BuildContext context) { return Container( @@ -826,7 +1422,8 @@ class _footerWidgetState extends State { padding: const EdgeInsets.all(8.0), child: Text( TranslationBase.of(context).quantity, - style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: 15, fontWeight: FontWeight.bold), ), ), // ListView( @@ -848,7 +1445,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '1', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -873,7 +1472,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '2', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -898,7 +1499,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '3', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -923,7 +1526,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '4', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -948,7 +1553,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '5', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -973,7 +1580,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '6', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -998,7 +1607,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '7', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -1023,7 +1634,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '8', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -1048,7 +1661,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '9', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -1073,7 +1688,9 @@ class _footerWidgetState extends State { color: Colors.white, child: Text( '10', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20), ), ), onTap: () { @@ -1094,7 +1711,8 @@ class _footerWidgetState extends State { Container( width: 50.0, child: TextField( - decoration: InputDecoration(labelText: 'quantity #'), + decoration: + InputDecoration(labelText: 'quantity #'), onChanged: (text) { print(price); print(widget.quantityLimit); @@ -1164,7 +1782,9 @@ class _footerWidgetState extends State { }, ), ), - !widget.isAvailble && price > 0 || price > widget.quantityLimit + !widget.isAvailble && price > 0 || + price > widget.quantityLimit || + widget.item.rxMessage != null ? Container( width: 190, height: 46, @@ -1173,13 +1793,16 @@ class _footerWidgetState extends State { alignment: Alignment.center, child: Text( TranslationBase.of(context).addToCart, - style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15), + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15), ), ), ) : InkWell( onTap: () { - addToCartFunction(price, widget.item.id); + addToCartFunction(price, widget.item.id, context); }, child: Container( alignment: Alignment.center, @@ -1188,14 +1811,19 @@ class _footerWidgetState extends State { color: Colors.green, child: Text( TranslationBase.of(context).addToCart, - style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15), + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15), ), ), ), SizedBox( width: 5, ), - !widget.isAvailble && price > 0 || price > widget.quantityLimit + !widget.isAvailble && price > 0 || + price > widget.quantityLimit || + widget.item.rxMessage != null ? Container( width: 120, height: 46, @@ -1204,17 +1832,20 @@ class _footerWidgetState extends State { alignment: Alignment.center, child: Text( TranslationBase.of(context).buyNow, - style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15), + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15), ), ), ) : InkWell( onTap: () { print('buy now'); - addToCartFunction(price, widget.item.id); + addToCartFunction(price, widget.item.id, context); Navigator.push( context, - MaterialPageRoute(builder: (context) => CartOrderPage()), + FadePage(page: CartOrderPage()), ); }, child: Container( @@ -1224,7 +1855,10 @@ class _footerWidgetState extends State { color: Colors.blue, child: Text( TranslationBase.of(context).buyNow, - style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15), + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15), ), ), ), @@ -1239,7 +1873,9 @@ class _footerWidgetState extends State { class productNameAndPrice extends StatefulWidget { BuildContext context; PharmacyProduct item; + productNameAndPrice(this.context, this.item); + @override _productNameAndPriceState createState() => _productNameAndPriceState(); } @@ -1255,7 +1891,7 @@ class _productNameAndPriceState extends State { child: Row( children: [ Text( - widget.item.price.toString(), + widget.item.price.toString() + " " + "SAR", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), ), SizedBox( @@ -1265,12 +1901,15 @@ class _productNameAndPriceState extends State { widget.item.stockAvailability, style: widget.item.stockAvailability == 'Out of stock' ? TextStyle(fontWeight: FontWeight.bold, color: Colors.red) - : TextStyle(fontWeight: FontWeight.bold, color: Colors.green), + : TextStyle( + fontWeight: FontWeight.bold, color: Colors.green), ), SizedBox(width: 20), - widget.item.stockAvailability == 'Out of stock' && customerId != null + widget.item.stockAvailability == 'Out of stock' && + customerId != null ? InkWell( - onTap: () => notifyMeWhenAvailable(context, widget.item.id), + onTap: () => + notifyMeWhenAvailable(context, widget.item.id), child: Row(children: [ Text( TranslationBase.of(context).notifyMe, @@ -1288,34 +1927,33 @@ class _productNameAndPriceState extends State { ]), ) : Container( - margin: languageID == 'ar' ? EdgeInsets.only(right: 25) : EdgeInsets.only(left: 25), + margin: languageID == 'ar' + ? EdgeInsets.only(right: 25) + : EdgeInsets.only(left: 25), width: 40, height: 40, decoration: BoxDecoration( color: Colors.grey, borderRadius: BorderRadius.circular(30), ), - child: !isInWishlit - ? IconButton( - icon: Icon(Icons.favorite_border), - color: Colors.white, - onPressed: () { - setState(() { - addToWishlistFunction(widget.item.id); - }); -// MyStatelessWidget(); - }, - ) - : IconButton( - icon: Icon(Icons.favorite), - color: Colors.red, - onPressed: () { - setState(() { - deleteFromWishlistFunction(widget.item.id); - }); -// MyStatelessWidget(); - }, - )), + child: IconButton( + icon: Icon(!isInWishlit + ? Icons.favorite_border + : Icons.favorite), + color: !isInWishlit ? Colors.white : Colors.red, + onPressed: () async { + if (customerId != null) { + if (!isInWishlit) { + await addToWishlistFunction(widget.item.id); + } else { + await deleteFromWishlistFunction(widget.item.id); + } + } else { + return; + } + setState(() {}); + }, + )), ], ), ), @@ -1324,9 +1962,12 @@ class _productNameAndPriceState extends State { child: Container( margin: EdgeInsets.only(left: 5), child: Align( - alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft, + alignment: + languageID == 'ar' ? Alignment.topRight : Alignment.topLeft, child: Text( - languageID == 'ar' ? widget.item.fullDescriptionn : widget.item.fullDescription, + languageID == 'ar' + ? widget.item.fullDescriptionn + : widget.item.fullDescription, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15), ), ), @@ -1358,7 +1999,9 @@ class _productNameAndPriceState extends State { child: Container( child: widget.item.rxMessage != null ? Text( - languageID == 'ar' ? widget.item.rxMessagen.toString() : widget.item.rxMessage.toString(), + languageID == 'ar' + ? widget.item.rxMessagen.toString() + : widget.item.rxMessage.toString(), style: TextStyle(color: Colors.red, fontSize: 10), ) : Container()), @@ -1377,135 +2020,6 @@ class _productNameAndPriceState extends State { } } -//productNameAndPrice(BuildContext context, item) { -// return Column( -// mainAxisAlignment: MainAxisAlignment.start, -// children: [ -// Padding( -// padding: const EdgeInsets.all(8.0), -// child: Row( -// children: [ -// Text( -// item.price.toString(), -// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), -// ), -// SizedBox( -// width: 40, -// ), -// Text( -// item.stockAvailability, -// style: item.stockAvailability == 'Out of stock' -// ? TextStyle(fontWeight: FontWeight.bold, color: Colors.red) -// : TextStyle(fontWeight: FontWeight.bold, color: Colors.green), -// ), -// SizedBox(width: 20), -// item.stockAvailability == 'Out of stock' -// ? Text( -// TranslationBase.of(context).notifyMe, -// style: TextStyle( -// color: Colors.blue, -// decoration: TextDecoration.underline, -// ), -// ) -// : Container(), -// item.stockAvailability == 'Out of stock' -// ? Icon( -// FontAwesomeIcons.bell, -// color: Colors.blue, -// size: 15.0, -// ) -// : Container(), -// -// Container( -// margin: languageID=='ar' ? EdgeInsets.only(right: 25) : EdgeInsets.only(left: 25), -// width: 40, -// height: 40, -// decoration: BoxDecoration( -// color: Colors.grey, -// borderRadius: BorderRadius.circular(30), -// ), -// child: !isInWishlit ?IconButton( -// icon: Icon(Icons.favorite_border), -// color: Colors.white, -// onPressed: () { -// addToWishlistFunction(item.id); -//// MyStatelessWidget(); -// -// }, -// ):IconButton( -// icon: Icon(Icons.favorite), -// color: Colors.red, -// onPressed: () { -// deleteFromWishlistFunction(item.id); -//// MyStatelessWidget(); -// -// }, -// ) -// ), -// -// ], -// ), -// ), -// Padding( -// padding: const EdgeInsets.all(8.0), -// child: Container( -// margin: EdgeInsets.only(left: 5), -// child: Align( -// alignment: -// languageID == 'ar' ? Alignment.topRight : Alignment.topLeft, -// child: Text( -// languageID == 'ar' ? item.fullDescriptionn : item.fullDescription, -// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15), -// ), -// ), -// ), -// ), -// Row( -// children: [ -// Expanded( -// flex: 2, -// child: Container( -// margin: EdgeInsets.only(right: 150), -// child: Align( -// alignment: Alignment.bottomLeft, -// child: RatingBar.readOnly( -// initialRating: 3, -// size: 15.0, -// filledColor: Colors.yellow[700], -// emptyColor: Colors.grey[500], -// isHalfAllowed: true, -// halfFilledIcon: Icons.star_half, -// filledIcon: Icons.star, -// emptyIcon: Icons.star, -// ), -// ), -// ), -// ), -// Expanded( -// flex: 1, -// child: Container( -// child: item.rxMessage != null -// ? Text( -// languageID == 'ar' -// ? item.rxMessagen.toString() -// : item.rxMessage.toString(), -// style: TextStyle(color: Colors.red, fontSize: 10), -// ) -// : Container()), -// ), -// item.rxMessage != null -// ? Icon( -// FontAwesomeIcons.questionCircle, -// color: Colors.red, -// size: 15.0, -// ) -// : Container(), -// ], -// ), -// ], -// ); -//} - slideDetail() { return Row( mainAxisAlignment: MainAxisAlignment.start, @@ -1524,7 +2038,9 @@ slideDetail() { ), color: Colors.white, ), - child: const Text('1', textAlign: TextAlign.center, style: TextStyle(color: Color(0xFF000000))), + child: const Text('1', + textAlign: TextAlign.center, + style: TextStyle(color: Color(0xFF000000))), ), ) ], @@ -1549,9 +2065,12 @@ getSpecificationData(itemID) async { specificationData = await x.productSpecificationData(itemID); } -addToCartFunction(quantity, itemID) async { +addToCartFunction(quantity, itemID, BuildContext context) async { + GifLoaderDialogUtils.showMyDialog(context); ProductDetailViewModel x = new ProductDetailViewModel(); - await x.addToCartData(quantity, itemID); + await x.addToCartData(quantity, itemID).then((value) { + GifLoaderDialogUtils.hideDialog(context); + }); } notifyMeWhenAvailable(context, itemId) async { @@ -1568,22 +2087,21 @@ addToWishlistFunction(itemID) async { deleteFromWishlistFunction(itemID) async { ProductDetailViewModel x = new ProductDetailViewModel(); isInWishlit = false; - await x.addToWishlistData(itemID); + await x.deletWishlistData(itemID); } checkWishlist() async { ProductDetailViewModel x = new ProductDetailViewModel(); await x.checkWishlistData(); + +// isInWishlit = x.wishListItems.map((e) => e.id.toString()).toList().contains(itemID); + for (int i = 0; i < x.wishListItems.length; i++) { -// print(itemID); -// print(x.wishListItems[i].product.id); if (itemID == x.wishListItems[i].product.id) { isInWishlit = true; -// print('in wishlist'); break; } else { isInWishlit = false; -// print('not in wishlist'); } } } @@ -1603,21 +2121,28 @@ settingModalBottomSheet(context) { child: new Wrap( children: [ new ListTile( - leading: new Icon(Icons.shopping_cart), - title: new Text('Add to cart'), + leading: Icon(Icons.shopping_cart), + title: Text('Add to cart'), onTap: () => { - if (price > 0) {addToCartFunction(price, itemID)} else {AppToast.showErrorToast(message: "you should add quantity")} + if (price > 0) + {addToCartFunction(price, itemID, context)} + else + { + AppToast.showErrorToast( + message: "you should add quantity") + } }), - new ListTile( - leading: new Icon(Icons.favorite_border), - title: new Text('Add to wishlist'), + ListTile( + leading: Icon(Icons.favorite_border), + title: Text('Add to wishlist'), onTap: () => {addToWishlistFunction(itemID)}, ), - new ListTile( - leading: new Icon(Icons.compare), - title: new Text('Compare'), + ListTile( + leading: Icon(Icons.compare), + title: Text('Compare'), onTap: () => { - Provider.of(context, listen: false).addItem(specificationData), + Provider.of(context, listen: false) + .addItem(specificationData), }, ), ], @@ -1625,15 +2150,3 @@ settingModalBottomSheet(context) { ); }); } - -Future userInfo(id, product) async { - customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); - if (customerId != null) { - itemID = id; - product = product; - checkWishlist(); - } - print("customerId:$customerId"); - return customerId; -// getSpecificationData(itemID); -} diff --git a/lib/pages/pharmacies/screens/cart-order-page.dart b/lib/pages/pharmacies/screens/cart-order-page.dart index 6926f9f4..f672cc66 100644 --- a/lib/pages/pharmacies/screens/cart-order-page.dart +++ b/lib/pages/pharmacies/screens/cart-order-page.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCartResponse.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; @@ -7,6 +8,7 @@ import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-preview import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductOrderItem.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/GestureIconButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -27,12 +29,12 @@ class CartOrderPage extends StatelessWidget { value: model.cartResponse, child: AppScaffold( appBarTitle: TranslationBase.of(context).shoppingCart, - isShowAppBar: false, + isShowAppBar: true, isPharmacy: true, baseViewModel: model, backgroundColor: Colors.white, body: !(model.cartResponse.shoppingCarts == null || - model.cartResponse.shoppingCarts.length == 0) + model.cartResponse.shoppingCarts.length == 0) ? Container( height: height * 0.85, width: double.infinity, @@ -70,8 +72,16 @@ class CartOrderPage extends StatelessWidget { cart.shoppingCarts[index], () { print(cart.shoppingCarts[index] .quantity); - model.changeProductQuantity( - cart.shoppingCarts[index]); + model + .changeProductQuantity( + cart.shoppingCarts[index]) + .then((value) { + if (model.state == + ViewState.ErrorLocal) { + Utils.showErrorToast( + model.error); + } + }); }, () => model.deleteProduct( cart.shoppingCarts[index]))) @@ -246,64 +256,62 @@ class _OrderBottomWidgetState extends State { height: widget.height * 0.070, color: Color(0xffe6ffe0), padding: EdgeInsets.symmetric(horizontal: 4), - child: Expanded( - child: Row( - children: [ - InkWell( - onTap: () { - setState(() { - isAgree = !isAgree; - }); - }, - child: Container( - width: 25.0, - height: widget.height * 0.070, - decoration: new BoxDecoration( - color: !isAgree - ? Color(0xffeeeeee) - : Colors.green, - shape: BoxShape.circle, + child: Row( + children: [ + InkWell( + onTap: () { + setState(() { + isAgree = !isAgree; + }); + }, + child: Container( + width: 25.0, + height: widget.height * 0.070, + decoration: new BoxDecoration( + color: !isAgree + ? Color(0xffeeeeee) + : Colors.green, + shape: BoxShape.circle, + ), + child: !isAgree + ? null + : Padding( + padding: const EdgeInsets.all(0.0), + child: Icon( + Icons.check, + color: Colors.white, + size: 25, ), - child: !isAgree - ? null - : Padding( - padding: const EdgeInsets.all(0.0), - child: Icon( - Icons.check, - color: Colors.white, - size: 25, - ), - ), ), ), - Expanded( - child: Container( - padding: EdgeInsets.symmetric(horizontal: 4), - margin: const EdgeInsets.symmetric(vertical: 4), - child: Texts( - TranslationBase.of(context) - .pharmacyServiceTermsCondition, - fontSize: 13, - color: Colors.grey.shade800, - fontWeight: FontWeight.normal, - ), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 4), + margin: const EdgeInsets.symmetric(vertical: 4), + child: Texts( + TranslationBase.of(context) + .pharmacyServiceTermsCondition, + fontSize: 13, + color: Colors.grey.shade800, + fontWeight: FontWeight.normal, ), ), - InkWell( - onTap: () => { - Navigator.push(context, - FadePage(page: PharmacyTermsConditions())) - }, - child: Container( - child: Icon( - Icons.info, - size: 25, - color: Color(0xff005aff), - ), + ), + InkWell( + onTap: () => { + Navigator.push(context, + FadePage(page: PharmacyTermsConditions())) + }, + child: Container( + child: Icon( + Icons.info, + size: 25, + color: Color(0xff005aff), ), ), - ], - ), + ), + ], ), ), Container( diff --git a/lib/pages/pharmacies/screens/cart-order-preview.dart b/lib/pages/pharmacies/screens/cart-order-preview.dart index 9d819c1c..5d271a1a 100644 --- a/lib/pages/pharmacies/screens/cart-order-preview.dart +++ b/lib/pages/pharmacies/screens/cart-order-preview.dart @@ -1,33 +1,35 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/address-select-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/payment-method-select-page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductOrderPreviewItem.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:flutter/scheduler.dart'; class OrderPreviewPage extends StatelessWidget { final List addresses; OrderPreviewPage(this.addresses); + MyInAppBrowser browser; + @override Widget build(BuildContext context) { final mediaQuery = MediaQuery.of(context); - final height = mediaQuery.size.height - - 60 - - mediaQuery.padding.top; + final height = mediaQuery.size.height - 60 - mediaQuery.padding.top; return BaseView( onModelReady: (model) => model.getShoppingCart(), @@ -57,18 +59,18 @@ class OrderPreviewPage extends StatelessWidget { ), Consumer( builder: (ctx, paymentData, _) => - paymentData.lacumInformation != null - ? Container( - child: Column( - children: [ - LakumWidget(model), - SizedBox( - height: 10, - ), - ], - ), - ) - : Container()), + paymentData.lacumInformation != null + ? Container( + child: Column( + children: [ + LakumWidget(model), + SizedBox( + height: 10, + ), + ], + ), + ) + : Container()), Container( color: Colors.white, width: double.infinity, @@ -77,7 +79,9 @@ class OrderPreviewPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - TranslationBase.of(context).reviewOrder, + TranslationBase + .of(context) + .reviewOrder, fontSize: 14, fontWeight: FontWeight.bold, color: Colors.black, @@ -86,8 +90,10 @@ class OrderPreviewPage extends StatelessWidget { model.cartResponse.shoppingCarts != null ? model.cartResponse.shoppingCarts.length : 0, - (index) => ProductOrderPreviewItem( - model.cartResponse.shoppingCarts[index]), + (index) => + ProductOrderPreviewItem( + model.cartResponse + .shoppingCarts[index]), ), ], ), @@ -97,117 +103,140 @@ class OrderPreviewPage extends StatelessWidget { padding: EdgeInsets.all(8), child: model.cartResponse.subtotal != null ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context) - .orderSummary, - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - SizedBox( - height: 20, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Texts( - "${TranslationBase.of(context).subtotal}", - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.w500, - ), - Texts( - "${TranslationBase.of(context).sar} ${(model.cartResponse.subtotal).toStringAsFixed(2)}", - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.w500, - ), - ], - ), - const Divider( - color: Color(0xFFD6D6D6), - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Texts( - "${TranslationBase.of(context).shipping}", - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.w500, - ), - Texts( - "${TranslationBase.of(context).sar} ${(model.totalAdditionalShippingCharge).toStringAsFixed(2)}", - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.w500, - ), - ], - ), - const Divider( - color: Color(0xFFD6D6D6), - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Texts( - "${TranslationBase.of(context).vat}", - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.w500, - ), - Texts( - "${TranslationBase.of(context).sar} ${(model.cartResponse.subtotalVatAmount).toStringAsFixed(2)}", - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.w500, - ), - ], - ), - const Divider( - color: Color(0xFFD6D6D6), - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Texts( - TranslationBase.of(context).total, - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - Texts( - "${TranslationBase.of(context).sar} ${(model.cartResponse.subtotal).toStringAsFixed(2)}", - fontSize: 14, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - ], - ), - SizedBox( - height: 10, - ), - ], - ) + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase + .of(context) + .orderSummary, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase + .of(context) + .subtotal}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase + .of(context) + .sar} ${(model.cartResponse.subtotal) + .toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase + .of(context) + .shipping}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase + .of(context) + .sar} ${(model + .totalAdditionalShippingCharge) + .toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase + .of(context) + .vat}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase + .of(context) + .sar} ${(model.cartResponse + .subtotalVatAmount).toStringAsFixed( + 2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase + .of(context) + .total, + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + Texts( + "${TranslationBase + .of(context) + .sar} ${(model.cartResponse.subtotal) + .toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ) : Container(), ) ], @@ -270,161 +299,172 @@ class _SelectAddressWidgetState extends State { @override Widget build(BuildContext context) { return Consumer( - builder: (ctx, paymentData, _) => Container( - color: Colors.white, - child: address == null - ? InkWell( - onTap: () => {_navigateToAddressPage()}, - child: Container( - margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), - child: Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/ic_shipping_address.png", - width: 30.0, - height: 30.0, - fit: BoxFit.scaleDown, + builder: (ctx, paymentData, _) => + Container( + color: Colors.white, + child: address == null + ? InkWell( + onTap: () => {_navigateToAddressPage()}, + child: Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_shipping_address.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Expanded( + child: Container( + padding: + EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + TranslationBase + .of(context) + .selectAddress, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff0000ff), + ), ), - Expanded( - child: Container( - padding: - EdgeInsets.symmetric(vertical: 0, horizontal: 6), + ), + Icon( + Icons.arrow_forward_ios, + size: 20, + color: Colors.grey.shade400, + ), + ], + ), + ), + ) + : Container( + child: Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_shipping_mark.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric( + vertical: 0, horizontal: 6), + child: Texts( + TranslationBase + .of(context) + .shippingAddress, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + InkWell( + onTap: () => {_navigateToAddressPage()}, child: Texts( - TranslationBase.of(context).selectAddress, - fontSize: 14, - fontWeight: FontWeight.bold, + TranslationBase + .of(context) + .changeAddress, + fontSize: 12, + fontWeight: FontWeight.normal, color: Color(0xff0000ff), ), ), + ], + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Texts( + "${address.firstName} ${address.lastName}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, ), - Icon( - Icons.arrow_forward_ios, - size: 20, - color: Colors.grey.shade400, + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Texts( + "${address.address1} ${address.address2} ${address + .address2},, ${address.city}, ${address + .country} ${address.zipPostalCode}", + fontSize: 12, + fontWeight: FontWeight.normal, + color: Colors.grey.shade500, ), - ], - ), - ), - ) - : Container( - child: Container( - margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/ic_shipping_mark.png", - width: 30.0, - height: 30.0, - fit: BoxFit.scaleDown, - ), - Expanded( - child: Container( - padding: EdgeInsets.symmetric( - vertical: 0, horizontal: 6), - child: Texts( - TranslationBase.of(context).shippingAddress, - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - ), - ), - InkWell( - onTap: () => {_navigateToAddressPage()}, - child: Texts( - TranslationBase.of(context).changeAddress, - fontSize: 12, - fontWeight: FontWeight.normal, - color: Color(0xff0000ff), - ), + ), + Row( + children: [ + Container( + margin: const EdgeInsets.only(right: 8), + child: Icon( + Icons.phone, + size: 20, + color: Colors.black, ), - ], - ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - child: Texts( - "${address.firstName} ${address.lastName}", + ), + Texts( + "${address.phoneNumber}", fontSize: 14, fontWeight: FontWeight.bold, - color: Colors.black, + color: Colors.grey, ), - ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - child: Texts( - "${address.address1} ${address.address2} ${address.address2},, ${address.city}, ${address.country} ${address.zipPostalCode}", - fontSize: 12, - fontWeight: FontWeight.normal, - color: Colors.grey.shade500, + ], + ), + Container( + margin: EdgeInsets.symmetric(vertical: 8), + child: SizedBox( + height: 2, + width: double.infinity, + child: Container( + color: Color(0xffefefef), ), ), - Row( - children: [ - Container( - margin: const EdgeInsets.only(right: 8), - child: Icon( - Icons.phone, - size: 20, - color: Colors.black, - ), - ), - Texts( - "${address.phoneNumber}", - fontSize: 14, + ), + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_shipping_truck.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Container( + padding: EdgeInsets.symmetric( + vertical: 0, horizontal: 6), + child: Texts( + "${TranslationBase + .of(context) + .shipBy}", + fontSize: 12, fontWeight: FontWeight.bold, - color: Colors.grey, - ), - ], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 8), - child: SizedBox( - height: 2, - width: double.infinity, - child: Container( - color: Color(0xffefefef), + color: Colors.black, ), ), - ), - Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/ic_shipping_truck.png", - width: 30.0, - height: 30.0, - fit: BoxFit.scaleDown, - ), - Container( - padding: EdgeInsets.symmetric( - vertical: 0, horizontal: 6), - child: Texts( - "${TranslationBase.of(context).shipBy}", - fontSize: 12, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - ), - Container( - child: Image.asset( - paymentData.shippingOption - .shippingRateComputationMethodSystemName == - "Shipping.FixedOrByWeight" - ? "assets/images/pharmacy_module/payment/hmg_shipping_logo.png" - : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", - fit: BoxFit.contain, - ), - margin: EdgeInsets.symmetric(horizontal: 8), + Container( + child: Image.asset( + paymentData.shippingOption + .shippingRateComputationMethodSystemName == + "Shipping.FixedOrByWeight" + ? "assets/images/pharmacy_module/payment/hmg_shipping_logo.png" + : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", + fit: BoxFit.contain, ), - ], - ), - ], - ), + margin: EdgeInsets.symmetric(horizontal: 8), + ), + ], + ), + ], ), - ), // ic_shipping_mark.png - ), + ), + ), // ic_shipping_mark.png + ), ); } } @@ -444,16 +484,17 @@ class _SelectPaymentOptionWidgetState extends State { _navigateToPaymentOption() { Navigator.push(context, FadePage(page: PaymentMethodSelectPage())) - .then((result) => { - setState(() { - if (result != null) { - paymentOption = result; - widget.model.paymentCheckoutData.paymentOption = - paymentOption; - widget.model.paymentCheckoutData.updateData(); - } - }) - }); + .then((result) => + { + setState(() { + if (result != null) { + paymentOption = result; + widget.model.paymentCheckoutData.paymentOption = + paymentOption; + widget.model.paymentCheckoutData.updateData(); + } + }) + }); } @override @@ -470,85 +511,89 @@ class _SelectPaymentOptionWidgetState extends State { color: Colors.white, child: paymentOption == null ? InkWell( - onTap: () => {_navigateToPaymentOption()}, - child: Container( - margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), - child: Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/ic_payment_option.png", - width: 30.0, - height: 30.0, - fit: BoxFit.scaleDown, - ), - Expanded( - child: Container( - padding: - EdgeInsets.symmetric(vertical: 0, horizontal: 6), - child: Texts( - TranslationBase.of(context).selectPaymentOption, - fontSize: 14, - fontWeight: FontWeight.bold, - color: Color(0xff0000ff), - ), - ), - ), - Icon( - Icons.arrow_forward_ios, - size: 20, - color: Colors.grey.shade400, - ), - ], + onTap: () => {_navigateToPaymentOption()}, + child: Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_payment_option.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Expanded( + child: Container( + padding: + EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + TranslationBase + .of(context) + .selectPaymentOption, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff0000ff), + ), ), ), - ) + Icon( + Icons.arrow_forward_ios, + size: 20, + color: Colors.grey.shade400, + ), + ], + ), + ), + ) : Container( - margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), - child: Row( - children: [ - Image.asset( - "assets/images/pharmacy_module/ic_payment_option.png", - width: 30.0, - height: 30.0, - fit: BoxFit.scaleDown, - ), - Container( - margin: EdgeInsets.symmetric(horizontal: 8), - padding: EdgeInsets.symmetric(horizontal: 4, vertical: 0), - decoration: new BoxDecoration( - color: Colors.grey.shade100, - shape: BoxShape.rectangle, - ), - child: Image.asset( - widget.model.getPaymentOptionImage(paymentOption), - width: 30.0, - height: 30.0, - fit: BoxFit.scaleDown, - ), - ), - Expanded( - child: Container( - padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6), - child: Texts( - widget.model.getPaymentOptionName(paymentOption), - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - ), - ), - InkWell( - onTap: () => {_navigateToPaymentOption()}, - child: Texts( - TranslationBase.of(context).changeMethod, - fontSize: 12, - fontWeight: FontWeight.normal, - color: Color(0xff0000ff), - ), - ), - ], + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_payment_option.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + padding: EdgeInsets.symmetric(horizontal: 4, vertical: 0), + decoration: new BoxDecoration( + color: Colors.grey.shade100, + shape: BoxShape.rectangle, + ), + child: Image.asset( + widget.model.getPaymentOptionImage(paymentOption), + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, ), ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + widget.model.getPaymentOptionName(paymentOption), + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + InkWell( + onTap: () => {_navigateToPaymentOption()}, + child: Texts( + TranslationBase + .of(context) + .changeMethod, + fontSize: 12, + fontWeight: FontWeight.normal, + color: Color(0xff0000ff), + ), + ), + ], + ), + ), ); } } @@ -586,12 +631,15 @@ class _LakumWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - "${TranslationBase.of(context).lakumPoints}", + "${TranslationBase + .of(context) + .lakumPoints}", fontSize: 12, fontWeight: FontWeight.bold, ), Texts( - "${widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount}", + "${widget.model.paymentCheckoutData.lacumInformation + .lakumInquiryInformationObjVersion.pointsBalanceAmount}", fontSize: 12, fontWeight: FontWeight.normal, ), @@ -606,7 +654,9 @@ class _LakumWidgetState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ Texts( - "${TranslationBase.of(context).riyal}", + "${TranslationBase + .of(context) + .riyal}", fontSize: 12, fontWeight: FontWeight.bold, ), @@ -620,19 +670,19 @@ class _LakumWidgetState extends State { decoration: InputDecoration( border: OutlineInputBorder( borderSide: - BorderSide(color: Colors.black, width: 0.2), + BorderSide(color: Colors.black, width: 0.2), gapPadding: 0, borderRadius: projectProvider.isArabic ? BorderRadius.only( - topRight: Radius.circular(8), - bottomRight: Radius.circular(8)) + topRight: Radius.circular(8), + bottomRight: Radius.circular(8)) : BorderRadius.only( - topLeft: Radius.circular(8), - bottomLeft: Radius.circular(8)), + topLeft: Radius.circular(8), + bottomLeft: Radius.circular(8)), ), disabledBorder: OutlineInputBorder( borderSide: - BorderSide(color: Colors.black, width: 0.4), + BorderSide(color: Colors.black, width: 0.4), gapPadding: 0, borderRadius: BorderRadius.only( topLeft: Radius.circular(8), @@ -644,22 +694,22 @@ class _LakumWidgetState extends State { style: TextStyle( fontSize: 14, color: widget - .model - .paymentCheckoutData - .lacumInformation - .lakumInquiryInformationObjVersion - .pointsBalanceAmount > - 0 + .model + .paymentCheckoutData + .lacumInformation + .lakumInquiryInformationObjVersion + .pointsBalanceAmount > + 0 ? Colors.black : Colors.grey, ), enabled: widget - .model - .paymentCheckoutData - .lacumInformation - .lakumInquiryInformationObjVersion - .pointsBalanceAmount == - 0 + .model + .paymentCheckoutData + .lacumInformation + .lakumInquiryInformationObjVersion + .pointsBalanceAmount == + 0 ? false : true, onChanged: (val) { @@ -678,7 +728,7 @@ class _LakumWidgetState extends State { widget.model.paymentCheckoutData.usedLakumPoints = 0; } _pointsController.text = - "${widget.model.paymentCheckoutData.usedLakumPoints}"; + "${widget.model.paymentCheckoutData.usedLakumPoints}"; }, ), ), @@ -690,18 +740,20 @@ class _LakumWidgetState extends State { shape: BoxShape.rectangle, borderRadius: projectProvider.isArabic ? BorderRadius.only( - topLeft: Radius.circular(6), - bottomLeft: Radius.circular(6)) + topLeft: Radius.circular(6), + bottomLeft: Radius.circular(6)) : BorderRadius.only( - topRight: Radius.circular(6), - bottomRight: Radius.circular(6)), + topRight: Radius.circular(6), + bottomRight: Radius.circular(6)), border: Border.fromBorderSide(BorderSide( color: Color(0xff3666E0), width: 0.8, )), ), child: Texts( - "${TranslationBase.of(context).use}", + "${TranslationBase + .of(context) + .use}", fontSize: 12, color: Colors.white, fontWeight: FontWeight.bold, @@ -720,113 +772,176 @@ class _LakumWidgetState extends State { class PaymentBottomWidget extends StatelessWidget { final OrderPreviewViewModel model; + BuildContext context; + MyInAppBrowser browser; + PaymentBottomWidget(this.model); @override Widget build(BuildContext context) { final scaffold = Scaffold.of(context); + this.context = context; return Container( margin: EdgeInsets.symmetric(horizontal: 10, vertical: 0), child: Consumer( - builder: (ctx, paymentData, _) => paymentData.cartDataVisible + builder: (ctx, paymentData, _) => + paymentData.cartDataVisible ? Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + margin: + EdgeInsets.symmetric(horizontal: 0, vertical: 4), + child: Row( children: [ - Container( - margin: - EdgeInsets.symmetric(horizontal: 0, vertical: 4), - child: Row( - children: [ - Texts( - "${TranslationBase.of(context).sar} ${(model.cartResponse.subtotal).toStringAsFixed(2)}", - fontSize: 14, - fontWeight: FontWeight.bold, - color: Color(0xff929295), - ), - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 4), - child: Texts( - "${TranslationBase.of(context).inclusiveVat}", - fontSize: 8, - color: Color(0xff929295), - fontWeight: FontWeight.w600, - ), - ), - ], - ), - ), Texts( - "${model.cartResponse.quantityCount} ${TranslationBase.of(context).items}", - fontSize: 10, - color: Colors.grey, + "${TranslationBase + .of(context) + .sar} ${(model.cartResponse.subtotal) + .toStringAsFixed(2)}", + fontSize: 14, fontWeight: FontWeight.bold, + color: Color(0xff929295), ), - ], - ), - Container( - child: RaisedButton( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - side: BorderSide( + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 4), + child: Texts( + "${TranslationBase + .of(context) + .inclusiveVat}", + fontSize: 8, color: Color(0xff929295), - width: 1, + fontWeight: FontWeight.w600, ), ), - onPressed: (paymentData.address != null && - paymentData.paymentOption != null) - ? () => { - model.makeOrder().then((_) { - if (model.state != ViewState.Idle) { - SnackBar snackBar = SnackBar( - content: Text( - 'Order has been placed successfully!!')); - scaffold.showSnackBar(snackBar); - } - - // Navigator.pushAndRemoveUntil( - // context, - // MaterialPageRoute( - // builder: (context) => - // PharmacyPage()), - // (Route r) => false); - }) - } - : null, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 16), - child: new Text( - "${TranslationBase.of(context).proceedPay}", - style: new TextStyle( - color: (paymentData.address != null && - paymentData.paymentOption != null) - ? Colors.white - : Colors.grey.shade400, - fontWeight: FontWeight.bold, - fontSize: 12), - ), - ), - color: (paymentData.address != null && - paymentData.paymentOption != null) - ? Colors.green - : Color(0xff929295), - disabledColor: (paymentData.address != null && - paymentData.paymentOption != null) - ? Colors.green - : Color(0xff929295), - ), + ], ), - ], + ), + Texts( + "${model.cartResponse.quantityCount} ${TranslationBase + .of(context) + .items}", + fontSize: 10, + color: Colors.grey, + fontWeight: FontWeight.bold, + ), + ], + ), + Container( + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + side: BorderSide( + color: Color(0xff929295), + width: 1, + ), + ), + onPressed: (paymentData.address != null && + paymentData.paymentOption != null) + ? () async { + await model.makeOrder(); + if (model.state == ViewState.Idle) { + AppToast.showSuccessToast( + message: "Order has been placed successfully!!"); + openPayment(model.orderListModel[0], model.user); + } else { + AppToast.showErrorToast(message: model.error); + } + Navigator.pop(context); + Navigator.pop(context); + } + : null, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: new Text( + "${TranslationBase + .of(context) + .proceedPay}", + style: new TextStyle( + color: (paymentData.address != null && + paymentData.paymentOption != null) + ? Colors.white + : Colors.grey.shade400, + fontWeight: FontWeight.bold, + fontSize: 12), + ), + ), + color: (paymentData.address != null && + paymentData.paymentOption != null) + ? Colors.green + : Color(0xff929295), + disabledColor: (paymentData.address != null && + paymentData.paymentOption != null) + ? Colors.green + : Color(0xff929295), ), - ) + ), + ], + ), + ) : Container(), ), ); } + + openPayment(OrderDetailModel order, + AuthenticatedUser authenticatedUser,) { + browser = new MyInAppBrowser( + onExitCallback: onBrowserExit, onLoadStartCallback: onBrowserLoadStart); + + browser.openPharmacyPaymentBrowser( + order, + order.orderTotal, + 'ePharmacy Order', + order.id, + order.billingAddress.email, + order.customValuesXml, + "${authenticatedUser.firstName} ${authenticatedUser + .middleName} ${authenticatedUser.lastName}", + authenticatedUser.patientID, + authenticatedUser, + browser); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (isPaymentMade) { + AppToast.showSuccessToast( + message: "شكراً\nPayment status for your order is Paid"); + Navigator.pop(context); + Navigator.pop(context); + } else { + AppToast.showErrorToast( + message: + "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration"); + } + } } diff --git a/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart b/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart index fc1270c0..9e281694 100644 --- a/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart +++ b/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart @@ -20,8 +20,9 @@ class LakumActivationVidaPage extends StatelessWidget { return BaseView( builder: (_, model, wi) => AppScaffold( - title: "Acount Activation", + appBarTitle: TranslationBase.of(context).accountActivation, isShowAppBar: true, + isPharmacy: true, isShowDecPage: false, backgroundColor: Colors.white, baseViewModel: model, @@ -35,7 +36,7 @@ class LakumActivationVidaPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Texts( - " This service allows you to activate your LAKUM account after registering through the Vida system. ", + TranslationBase.of(context).accountActivationDesc, fontSize: 14, ), Padding( @@ -43,8 +44,10 @@ class LakumActivationVidaPage extends StatelessWidget { child: TextField( controller: _identificationNumberController, decoration: new InputDecoration( - hintText: 'Enter Identification Number', + hintText: TranslationBase.of(context) + .enterIdentificationNumber, ), + keyboardType: TextInputType.number, style: TextStyle( fontSize: 16, color: Colors.grey.shade700, @@ -89,7 +92,7 @@ class LakumActivationVidaPage extends StatelessWidget { } }); } - : null, + : () {}, ), ), ], diff --git a/lib/pages/pharmacies/screens/lacum-setting-page.dart b/lib/pages/pharmacies/screens/lacum-setting-page.dart index 861279f3..4f7f5fd6 100644 --- a/lib/pages/pharmacies/screens/lacum-setting-page.dart +++ b/lib/pages/pharmacies/screens/lacum-setting-page.dart @@ -1,7 +1,10 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -44,6 +47,7 @@ class _LakumSettingPageState extends State { appBarTitle: "${TranslationBase.of(context).lakum}", isShowAppBar: true, isShowDecPage: false, + isPharmacy: true, backgroundColor: Colors.white, baseViewModel: model, body: Container( @@ -220,13 +224,18 @@ class _LakumSettingPageState extends State { hPadding: 8, vPadding: 12, handler: canUpdate - ? () { - model.createLakumAccount(_nameController.text, _phoneController.text).then((status) => { - if (status == 200) {Navigator.pop(context, "")} - // back to previous page - }); + ? () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.createLakumAccount(_nameController.text, _phoneController.text); + GifLoaderDialogUtils.hideDialog(context); + if(model.state == ViewState.Idle){ + AppToast.showSuccessToast(message: model.successMsg); + Navigator.pop(context, ""); + } else if(model.state == ViewState.ErrorLocal){ + AppToast.showErrorToast(message: model.error); + } } - : null, + : (){}, ), ) ], diff --git a/lib/pages/pharmacies/screens/lacum-transfer-page.dart b/lib/pages/pharmacies/screens/lacum-transfer-page.dart index 9103b646..f05c6da4 100644 --- a/lib/pages/pharmacies/screens/lacum-transfer-page.dart +++ b/lib/pages/pharmacies/screens/lacum-transfer-page.dart @@ -37,8 +37,9 @@ class _LacumTransferPageState extends State { onModelReady: (model) => model.setLakumData( widget.lacumInformation, widget.lacumGroupInformation), builder: (_, model, wi) => AppScaffold( - appBarTitle: "${TranslationBase.of(context).lakum}", + appBarTitle: "${TranslationBase.of(context).lakumTransfer}", isShowAppBar: true, + isPharmacy: true, isShowDecPage: false, backgroundColor: Colors.white, baseViewModel: model, @@ -83,7 +84,7 @@ class _LacumTransferPageState extends State { children: [ Container( child: Texts( - "Point Balance", + "${TranslationBase.of(context).point} ${TranslationBase.of(context).balance}", fontSize: 14, fontWeight: FontWeight.bold, color: Colors.white, @@ -143,7 +144,7 @@ class _LacumTransferPageState extends State { children: [ Container( child: Texts( - "Riyal Balance", + "${TranslationBase.of(context).riyal} ${TranslationBase.of(context).balance}", fontSize: 14, fontWeight: FontWeight.bold, color: Colors.white, @@ -182,7 +183,7 @@ class _LacumTransferPageState extends State { child: TextField( controller: _beneficieryAccountController, decoration: new InputDecoration( - hintText: 'Enter Beneficiary Account No.', + hintText: TranslationBase.of(context).enterBeneficiaryAccountNo, ), style: TextStyle( fontSize: 16, @@ -209,7 +210,7 @@ class _LacumTransferPageState extends State { _beneficieryAccountController .text); } - : null, + : (){}, ), ), (model.lacumReceiverInformation != null && @@ -250,7 +251,7 @@ class _LacumTransferPageState extends State { width: double.infinity, ), Texts( - "Point's to Transfer :", + TranslationBase.of(context).pointsToTransfer, color: Colors.black, ), Padding( @@ -284,7 +285,7 @@ class _LacumTransferPageState extends State { Container( margin: EdgeInsets.all(8), child: BorderedButton( - "LACUM TRANSFER", + TranslationBase.of(context).lakumTransfer, backgroundColor: Color(0xff339933), textColor: Colors.white, fontSize: 18, diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index adbb07c2..fdf3cc78 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -22,7 +22,7 @@ class LakumMainPage extends StatelessWidget { return BaseView( onModelReady: (model) => model.getLacumData(), builder: (_, model, wi) => AppScaffold( - title: "Lakum", + appBarTitle: TranslationBase.of(context).lakum, isShowAppBar: true, isPharmacy: true, isShowDecPage: false, @@ -346,7 +346,7 @@ class LakumHomeButtons extends StatelessWidget { child: Container( padding: EdgeInsets.symmetric(horizontal: 16), child: Texts( - "Account Activation", + TranslationBase.of(context).accountActivation, fontSize: 14, fontWeight: FontWeight.bold, ), @@ -394,7 +394,7 @@ class LakumHomeButtons extends StatelessWidget { child: Container( padding: EdgeInsets.symmetric(horizontal: 16), child: Texts( - "Lakum Transfer", + TranslationBase.of(context).lakumTransfer, fontSize: 14, fontWeight: FontWeight.bold, ), diff --git a/lib/pages/pharmacies/screens/pharmacy_module_page.dart b/lib/pages/pharmacies/screens/pharmacy_module_page.dart index b41c1804..e4830583 100644 --- a/lib/pages/pharmacies/screens/pharmacy_module_page.dart +++ b/lib/pages/pharmacies/screens/pharmacy_module_page.dart @@ -1,34 +1,73 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/offers_categorise_page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product-brands.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-activitaion-vida-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/recommended-product-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/BannerPager.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/manufacturerItem.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/product-brands.dart'; - +import '../../final_products_page.dart'; import 'lacum-activitaion-vida-page.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; -class PharmacyPage extends StatelessWidget { +bool isInWishlist = false; +int price = 0; +var itemID; +var product; +var customerId; +var item; +dynamic languageID; +List wishlistData; + +class PharmacyPage extends StatefulWidget { +// final PharmacyProduct product; +// PharmacyPage(this.product); + + @override + _PharmacyPageState createState() => _PharmacyPageState(); +} + +class _PharmacyPageState extends State { +// dynamic wishlistVar; + + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + List recommendedProductList = []; + List wishList = []; + + var model; +// String ProductId="4561"; + //String id ="3608"; + String productId = ""; + String id = ""; @override void initState() { -// print("model prescription " + model.prescriptionsList.length); -// cancelOrderDetail(order) + checkWishlist(); + // userInfo(widget.product.id, widget.product); + userInfo(id, product); + print("-------------this--------------"); + print(itemID); } @override @@ -48,8 +87,8 @@ class PharmacyPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - BannerPager(model), - // GridViewButtons(model), + BannerPager(model), + // GridViewButtons(model), Container( margin: EdgeInsets.fromLTRB(10, 10, 10, 10), child: Row( @@ -68,224 +107,475 @@ class PharmacyPage extends StatelessWidget { hPadding: 4, handler: () { Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - HomePrescriptionsPage())); + context, FadePage(page: HomePrescriptionsPage())); }, ), ], ), ), - Container( - padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 24.0), - height: MediaQuery.of(context).size.height * 0.30, + height: model.prescriptionsList.length > 0 + ? MediaQuery.of(context).size.height * 0.28 + : 0, + padding: + EdgeInsets.symmetric(horizontal: 18.0, vertical: 14.0), +// height: MediaQuery.of(context).size.height * 0.28, // width: 200.0, // height: MediaQuery.of(context).size.height / 4 + 20, margin: EdgeInsets.only(left: 10), child: BaseView( - onModelReady: (model) => model.getPrescription(), - builder: (_, model, wi) => model.prescriptionsList.length != 0 + onModelReady: (model) => model.getPrescription(), + builder: (_, model, wi) => model.prescriptionsList.length != + 0 // model.getPrescription(); ? ListView.builder( - scrollDirection: Axis.horizontal, - shrinkWrap: true, - physics: ScrollPhysics(), - // physics: NeverScrollableScrollPhysics(), - // itemCount: 4, - itemCount: model.prescriptionsList.length, - itemBuilder: (context, index) { - return Container( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + physics: ScrollPhysics(), + // physics: NeverScrollableScrollPhysics(), + itemCount: model.prescriptionsList.length, + itemBuilder: (context, index) { + return Container( // width: 160.0, - height: MediaQuery.of(context).size.height * 0.6, - padding: EdgeInsets.only(bottom: 5.0, left: 5.0), - margin: EdgeInsets.only(right: 10.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.grey, - style: BorderStyle.solid, - width: 1.0, - ), - color: Colors.white, - borderRadius: BorderRadius.circular(10.0)), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( + height: + MediaQuery.of(context).size.height * 0.6, + padding: EdgeInsets.only( + bottom: 5.0, left: 5.0, right: 8.0), + margin: EdgeInsets.only(right: 10.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + style: BorderStyle.solid, + width: 1.0, + ), + color: Colors.white, + borderRadius: BorderRadius.circular(10.0)), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - Column(children: [ - Container( - padding: EdgeInsets.only( - top: 10.0, - left: 10.0, - right: 3.0, - bottom: 15.0, - ), - child: Image.network( - model.prescriptionsList[index] - .doctorImageURL, - width: 60, - height: 60, - ), - ), - ]), - Column( -// crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - margin: EdgeInsets.only(left: 1), + Row( + children: [ + Column(children: [ + Container( padding: EdgeInsets.only( - left: 15.0, right: 15.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.green, - style: BorderStyle.solid, - width: 4.0, + top: 10.0, + left: 10.0, + right: 10.0, + bottom: 15.0, + ), + child: CircleAvatar( + radius: 30, + backgroundColor: + Colors.transparent, + child: Image.network( + model.prescriptionsList[index] + .doctorImageURL, + width: 60, + height: 60, + ), + ), + ), + ]), +// Column( +// // crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Container( +// margin: EdgeInsets.only(left: 1), +// padding: EdgeInsets.only( +// top: 10.0, +// left: 10.0, +// right: 3.0, +// bottom: 15.0, +// ), +// child: Image.network( +// model.prescriptionsList[index] +// .doctorImageURL, +// width: 60, +// height: 60, +// ), +// ), +// ]), + Column( +// crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: + EdgeInsets.only(left: 1), + padding: EdgeInsets.only( + left: 15.0, right: 15.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.green, + style: + BorderStyle.solid, + width: 4.0, + ), + color: Colors.green, + borderRadius: + BorderRadius.circular( + 30.0)), + child: Text( + languageID == "ar" + ? model + .prescriptionsList[ + index] + .isInOutPatientDescriptionN + .toString() + : model + .prescriptionsList[ + index] + .isInOutPatientDescription + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, +// fontWeight: FontWeight.bold, + ), + )), + Row(children: [ + Image.asset( + 'assets/images/Icon-awesome-calendar.png', + width: 30, + height: 30, + ), + Text( + DateUtil.convertStringToDate( + model + .prescriptionsList[ + index] + .appointmentDate + .toString()) + .toString() + .substring(0, 10), + style: TextStyle( + color: Colors.black, + fontSize: 15.0, +// fontWeight: FontWeight.bold, ), - color: Colors.green, - borderRadius: - BorderRadius.circular( - 30.0)), - child: Text( + ) + ]), + ], + ), + ], + ), + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: Row(children: [ + Text( model.prescriptionsList[index] - .isInOutPatientDescription + .doctorTitle .toString(), style: TextStyle( - color: Colors.white, + color: Colors.black, fontSize: 15.0, -// fontWeight: FontWeight.bold, + fontWeight: FontWeight.bold, ), - )), - Row(children: [ - Image.asset( - 'assets/images/Icon-awesome-calendar.png', - width: 30, - height: 30, - ), - Text( + ), + Text( + model.prescriptionsList[index] + .doctorName + .toString(), + style: TextStyle( + color: Colors.black, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ]), + ), + ], + ), + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: Text( model.prescriptionsList[index] - .appointmentDate + .clinicDescription .toString(), style: TextStyle( - color: Colors.black, + color: Colors.green, fontSize: 15.0, -// fontWeight: FontWeight.bold, +// fontWeight: FontWeight.bold, ), - ) - ]), - ], - ), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Row(children: [ - Text( - model.prescriptionsList[index] - .doctorTitle - .toString(), - style: TextStyle( - color: Colors.black, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ), - Text( - model.prescriptionsList[index] - .doctorName - .toString(), - style: TextStyle( - color: Colors.black, - fontSize: 15.0, - fontWeight: FontWeight.bold, ), ), - ]), - ), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Text( - model.prescriptionsList[index] - .clinicDescription - .toString(), - style: TextStyle( - color: Colors.green, - fontSize: 15.0, -// fontWeight: FontWeight.bold, - ), - ), + ], ), - ], - ), - Row( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Align( - alignment: Alignment.topLeft, - child: RatingBar.readOnly( + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: Align( + alignment: Alignment.topLeft, + child: RatingBar.readOnly( + initialRating: model + .prescriptionsList[index] + .actualDoctorRate + .toDouble(), // initialRating: productRate, - size: 15.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - ), - ) - ]), - ]), - ); - }) - : Container(), - ), - ), - Container( - margin: EdgeInsets.fromLTRB(10, 10, 10, 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts( - TranslationBase.of(context).recommended, - bold: true, - ), - BorderedButton( - TranslationBase.of(context).viewAll, - hasBorder: true, - borderColor: Colors.green, - textColor: Colors.green, - vPadding: 6, - hPadding: 4, - handler: () {}, - ), - ], - ), - ), - Container( - height: MediaQuery.of(context).size.height / 4 + 20, - child: ListView.builder( - itemBuilder: (ctx, i) => - ProductTileItem(model.bestSellerProduct[i]), - scrollDirection: Axis.horizontal, - itemCount: model.bestSellerProduct.length, + size: 15.0, + filledColor: + Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: + Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, + ), + ), + ) + ]), + ]), + ); + }) + : Container(), ), ), - +// Container( +// margin: EdgeInsets.fromLTRB(10, 10, 10, 10), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Texts( +// TranslationBase.of(context).recommended, +// bold: true, +// ), +// BorderedButton( +// TranslationBase.of(context).viewAll, +// hasBorder: true, +// borderColor: Colors.green, +// textColor: Colors.green, +// vPadding: 6, +// hPadding: 4, +// handler: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// RecommendedProductPage(productId : "2316"))); +// }, +// ), +// ], +// ), +// ), +// Container( +// height: model.recommendedProductList.length > 0 +// ? MediaQuery.of(context).size.height * 0.32 +// : 0, +// margin: EdgeInsets.symmetric(horizontal: 6, vertical: 4), +//// padding: EdgeInsets.symmetric(horizontal: 5.0, vertical: 22.0), +//// margin: EdgeInsets.only(left: 10), +// child: BaseView( +// onModelReady: (model) => +// model.getRecommendedProducts(productId), +// builder: (_, model, wi) => model +// .recommendedProductList.length != +// null +// ? ListView.builder( +// scrollDirection: Axis.horizontal, +// shrinkWrap: true, +// physics: ScrollPhysics(), +// // physics: NeverScrollableScrollPhysics(), +// itemCount: model.recommendedProductList.length, +// itemBuilder: (context, index) { +// return Card( +// elevation: 2, +// shape: RoundedRectangleBorder( +// side: BorderSide( +// color: Colors.grey[300], width: 2), +// borderRadius: BorderRadius.circular(10)), +// margin: EdgeInsets.symmetric( +// horizontal: 8, +// vertical: 0, +// ), +// child: Container( +// decoration: BoxDecoration( +// borderRadius: BorderRadius.all( +// Radius.circular(15), +// ), +// ), +// padding: EdgeInsets.symmetric(horizontal: 4), +// width: MediaQuery.of(context).size.width / 3, +// child: Column( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Stack(children: [ +// Container( +// child: Align( +// alignment: Alignment.topRight, +// child: //true +// itemID.contains(model.recommendedProductList[index].id) +// // !isInWishlist +// ? IconButton( +// icon: Icon(Icons +// .favorite_border), +// color: Colors.grey, +// iconSize: 30, +// onPressed: () { +// setState(() { +// addToWishlistFunction( +// itemID); +// }); +// }, +// ) +// : IconButton( +// icon: Icon( +// Icons.favorite), +// color: Colors.red, +// iconSize: 30, +// onPressed: () { +// setState(() { +// deleteFromWishlistFunction( +// itemID); +// }); +// }, +// ) +//// +// ), +// ), +// Container( +// margin: EdgeInsets.fromLTRB( +// 0, 16, 10, 16), +// alignment: Alignment.center, +//// padding: EdgeInsets.only(left: 25, bottom: 20), +// child: (model.recommendedProductList[index].images != null && +// model.recommendedProductList[index].images.length > 0) +// ? Image.network( +// model.recommendedProductList[index].images[0].src.toString(), +//// item.images[0].src, +// fit: BoxFit.cover, +// height: 60, +// ) +// : Image.asset( +// "assets/images/no_image.png", +// fit: BoxFit.cover, +// height: 60, +// ), +// ), +// Container( +// width: model +// .recommendedProductList[ +// index] +// .rxMessage != +// null +// ? MediaQuery.of(context) +// .size +// .width / +// 5 +// : 0, +// padding: EdgeInsets.all(4), +// decoration: BoxDecoration( +// color: Color(0xffb23838), +// borderRadius: BorderRadius.only( +// topLeft: Radius.circular(6)), +// ), +// child: Texts( +// model.recommendedProductList[index] +// .rxMessage != +// null +// ? model +// .recommendedProductList[ +// index] +// .rxMessage +// : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), +// ), +// ]), +// Container( +// margin: EdgeInsets.symmetric( +// horizontal: 6, +// vertical: 0, +// ), +// child: Column( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Text( +// languageID == "ar" +// ? model.recommendedProductList[index].namen +// : model.recommendedProductList[index].name, +// style: TextStyle( +// color: Colors.black, +// fontSize: 13.0, +//// fontWeight: FontWeight.bold, +// ), +// ), +// Padding( +//// padding: const EdgeInsets.only(top: 15, bottom: 10), +// padding: const EdgeInsets.only( +// top: 10, bottom: 5), +// child: Texts( +// "SAR ${model.recommendedProductList[index].price}", +// bold: true, +// fontSize: 14, +// ), +// ), +// ], +// ), +// ), +// Row( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Container( +// padding: +// EdgeInsets.only(right: 10), +//// margin: EdgeInsets.only(left: 5), +// child: Align( +// alignment: Alignment.topLeft, +// child: RatingBar.readOnly( +// initialRating: model +// .recommendedProductList[ +// index] +// .approvedRatingSum +// .toDouble(), +//// initialRating: productRate, +// size: 13.0, +// filledColor: +// Colors.yellow[700], +// emptyColor: Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: +// Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts( +// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +//// bold: true, +// fontSize: 12, +// ), +// ]), +// ], +// ), +// ), +// ); +// }) +// : Container( +//// child: Text("NO DATA"), +// ), +// ), +// ), Container( - margin: EdgeInsets.fromLTRB(10, 0, 10, 0), + margin: EdgeInsets.fromLTRB(10, 10, 10, 0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -333,7 +623,17 @@ class PharmacyPage extends StatelessWidget { hPadding: 4, borderColor: Colors.green, textColor: Colors.green, - handler: () {}, + handler: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 3, + ), + ), + ); + }, ), ], ), @@ -367,7 +667,14 @@ class PharmacyPage extends StatelessWidget { hPadding: 4, handler: () => { Navigator.push( - context, FadePage(page: ProductBrandsPage())), + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 4, + ), + ), + ), }, ), ], @@ -389,6 +696,49 @@ class PharmacyPage extends StatelessWidget { ), ); } + + addToWishlistFunction(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + isInWishlist = true; + await x.addToWishlistData(itemID); + } + + deleteFromWishlistFunction(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + isInWishlist = false; + await x.addToWishlistData(itemID); + } + + checkWishlist() async { + ProductDetailViewModel x = new ProductDetailViewModel(); + await x.checkWishlistData(); + for (int i = 0; i < x.wishListItems.length; i++) { + // itemID = x.wishListItems[i].id; + print("-------------wishlist---------------"); + print(itemID); +// print(product.id); + print(x.wishListItems[i].productId); + if (itemID == x.wishListItems[i].productId) { + isInWishlist = true; +// print('in wishlist'); + break; + } else { + isInWishlist = false; +// print('not in wishlist'); + } + } + } + + Future userInfo(id, product) async { + customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + if (customerId != null) { + itemID = id; + product = product; + checkWishlist(); + } + print("customerId:$customerId"); + return customerId; + } } class GridViewButtons extends StatelessWidget { @@ -522,4 +872,41 @@ class GridViewCard extends StatelessWidget { ), ); } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString(); + } +} + +class test extends StatefulWidget { + @override + _testState createState() => _testState(); +} + +class _testState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } } +//addWishlistData() async { +// ProductDetailViewModel x = new ProductDetailViewModel(); +// await wishlistData.add(x.checkWishlistData()); +// print("-------------testWishlist---------------"); +// +//} + +// checkWishlist() async { +// ProductDetailViewModel x = new ProductDetailViewModel(); +// wishlistVar = await x.checkWishlistData(); +// print("wishlistVar>>>>>>>>>>>>>>>"); +// print(wishlistVar); +// +// } diff --git a/lib/pages/pharmacies/screens/recommended-product-page.dart b/lib/pages/pharmacies/screens/recommended-product-page.dart new file mode 100644 index 00000000..28e3cce3 --- /dev/null +++ b/lib/pages/pharmacies/screens/recommended-product-page.dart @@ -0,0 +1,997 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:rating_bar/rating_bar.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; + +dynamic languageID; +bool isInWishlist = false; +int price = 0; +var itemID; +var product; +var customerId; + +class RecommendedProductPage extends StatefulWidget { + String productId ; + RecommendedProductPage({this.productId}); + + @override + _RecommendedProductPageState createState() => _RecommendedProductPageState(productId: productId); +} + +class _RecommendedProductPageState extends State + with SingleTickerProviderStateMixin { + List recommendedProductList = []; + String productId; + _RecommendedProductPageState({this.productId}); + String id = ""; + bool styleOne = true; + bool styleTwo = false; + Icon styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + // String productId = "4561"; + // String productId = ""; + + @override + void initState() { + checkWishlist(); + userInfo(id, product); + print("-------------this--------------"); + print(itemID); + } + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.80) / 2; + final double itemWidth = size.width / 2; + return BaseView( + onModelReady: (model) => model.getRecommendedProducts(productId), + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).recommended, + baseViewModel: model, + isShowAppBar: true, + isPharmacy: true, + backgroundColor: Colors.white, + body: SingleChildScrollView( + child: Column(children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only( + top: 8, + bottom: 10, + left: 10, + ), + child: Text( + model.recommendedProductList.length.toString(), + style: TextStyle( + color: Colors.black, + fontSize: 14.0, + ), + ), + ), + Container( + padding: EdgeInsets.only(top: 8, bottom: 10, left: 8), + child: Text( + TranslationBase.of(context).result, + style: TextStyle( + color: Colors.black, + fontSize: 14.0, + ), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: SizedBox( + child: Container( + width: 1, + color: Colors.grey, + ), + ), + ), + Container( + child: Image.asset( + 'assets/images/pharmacy/sort.png', + width: 20, + height: 20, +// color: Colors.red, + ), + ), + Container( + child: Text( + TranslationBase.of(context).sort, + style: TextStyle( + color: Colors.black, + fontSize: 14.0, + ), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: SizedBox( + child: Container( + width: 1, + color: Colors.grey, + ), + ), + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: styleIcon, + onTap: () { + setState(() { + if (styleOne == true) { + styleOne = false; + styleTwo = true; + styleIcon = Icon( + Icons.auto_awesome_mosaic, + color: Colors.blue, + size: 29.0, + ); + } else { + styleOne = true; + styleTwo = false; + styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + } + }); + }, + ), + ), + ], + ), + ]), + SizedBox( + height: 2, + ), + Divider( + color: Colors.grey[350], + height: 10, + thickness: 6, + indent: 0, + endIndent: 0, + ), + styleOne == true + ? Container( + margin: EdgeInsets.all(5.0), + child: model.recommendedProductList.length != null + ? CustomScrollView( + primary: false, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + slivers: [ + SliverPadding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), + sliver: SliverGrid.count( + crossAxisCount: 2, + childAspectRatio: (itemWidth / itemHeight), + children: model.recommendedProductList + .map((e) => Card( + elevation: 2, + shape: RoundedRectangleBorder( + side: BorderSide( + color: Colors.grey[300], + width: 2), + borderRadius: + BorderRadius.circular( + 10)), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 11, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: + BorderRadius.all( + Radius.circular(15), + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 4), + width: MediaQuery.of(context) + .size.width / 3, +// + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Stack(children: [ + Container( + child: Align( + alignment: + Alignment + .topRight, + child: + itemID.contains(e.id) + // !isInWishlist + ? IconButton( + icon: + Icon(Icons.favorite_border), + color: + Colors.grey, + iconSize: + 30, + onPressed: + () { + setState(() { + addToWishlistFunction(itemID); + }); + }, + ) + : + IconButton( + icon: + Icon(Icons.favorite), + color: + Colors.red, + iconSize: + 30, + onPressed: + () { + setState(() { + deleteFromWishlistFunction(itemID); + }); + }, + ) +// + ), + ), + Container( + margin: EdgeInsets + .fromLTRB(0, 16, + 10, 16), + alignment: + Alignment.center, +// padding: EdgeInsets.only(left: 25, bottom: 20), + child: (e.images != + null && + e.images.length > + 0) + ? Image.network( + e.images[0] + .src + .toString(), +// item.images[0].src, + fit: BoxFit + .cover, + height: 60, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit + .cover, + height: 60, + ), + ), + Container( + width: e.rxMessage != + null + ? MediaQuery.of( + context) + .size + .width / + 5 + : 0, + padding: + EdgeInsets.all(4), + decoration: + BoxDecoration( + color: Color( + 0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular( + 6)), + ), + child: Texts( + e.rxMessage != null + ? e.rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ), + ), + ]), + Container( + margin: EdgeInsets + .symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Text( + languageID == "ar" + ? e.namen + : e.name, + style: TextStyle( + color: Colors + .black, + fontSize: 13.0, +// fontWeight: FontWeight.bold, + ), + ), + Padding( +// padding: const EdgeInsets.only(top: 15, bottom: 10), + padding: + const EdgeInsets + .only( + top: 10, + bottom: + 5), + child: Texts( + "SAR ${e.price}", + bold: true, + fontSize: 14, + ), + ), + ], + ), + ), + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Container( + padding: EdgeInsets + .only( + right: + 10), +// margin: EdgeInsets.only(left: 5), + child: Align( + alignment: + Alignment + .topLeft, + child: RatingBar + .readOnly( + initialRating: e + .approvedRatingSum + .toDouble(), +// initialRating: productRate, + size: 13.0, + filledColor: + Colors.yellow[ + 700], + emptyColor: + Colors.grey[ + 500], + isHalfAllowed: + true, + halfFilledIcon: + Icons + .star_half, + filledIcon: + Icons + .star, + emptyIcon: + Icons + .star, + ), + ), + ), + Texts( + "(${e.approvedTotalReviews.toString()})", +// bold: true, + fontSize: 12, + ), + ]), + ], + ), + ), + ) +// Column( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Container( +// child: Align( +// alignment: Alignment.topRight, +// child: !isInWishlist +// ? IconButton( +// icon: Icon(Icons.favorite_border), +// color: Colors.grey, +// iconSize: 30, +// onPressed: () { +// setState(() { +// addToWishlistFunction(itemID); +// }); +// }, +// ) +// : IconButton( +// icon: Icon(Icons.favorite), +// color: Colors.red, +// iconSize: 30, +// onPressed: () { +// setState(() { +// deleteFromWishlistFunction(itemID); +// }); +// }, +// ) +//// +// ),), +// Container( +// padding: EdgeInsets.only( +// left: 25, bottom: 20), +//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0), +//// alignment: Alignment.centerLeft, +// child: (e.images != null && +// e.images.length > 0) +// ? Image.network( +// e.images[0].src +// .toString(), +//// item.images[0].src, +// fit: BoxFit.cover, +// height: 80, +// ) +// : Image.asset( +// "assets/images/no_image.png", +// fit: BoxFit.cover, +// height: 80, +// ), +// ), +// Text( +// e.name, +//// model.recommendedProduct[0].products[index].shortDescription +//// .toString(), +// style: TextStyle( +// color: Colors.black, +// fontSize: 15.0, +//// fontWeight: FontWeight.bold, +// ), +// ), +// Padding( +// padding: const EdgeInsets.only( +// top: 15, bottom: 10), +// child: Texts( +// "SAR ${e.price}", +// bold: true, +// fontSize: 14, +// ), +// ), +// Row( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only( +// right: 10), +//// margin: EdgeInsets.only(left: 5), +// child: Align( +// alignment: +// Alignment.topLeft, +// child: RatingBar.readOnly( +// initialRating: e +// .approvedRatingSum +// .toDouble(), +//// initialRating: productRate, +// size: 15.0, +// filledColor: +// Colors.yellow[700], +// emptyColor: +// Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: +// Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts( +// "(${e.approvedTotalReviews.toString()})", +//// bold: true, +// fontSize: 12, +// ), +// ]), +// ], +// ), + ) + .toList(), +// children:[ +// ListView.builder( +// scrollDirection: Axis.vertical, +// shrinkWrap: true, +// physics: ScrollPhysics(), +// itemCount: model.recommendedProductList.length, +// itemBuilder: (context, index) { +// return Container( +// height: 30, +// padding: EdgeInsets.only( left: 15.0, top: 10, right: 10), +// margin: EdgeInsets.only(right: 10.0), +// decoration: BoxDecoration( +// border: Border.all( +// color: Colors.grey, +// style: BorderStyle.solid, +// width: 1.0, +// ), +// color: Colors.white, +// borderRadius: BorderRadius.circular(10.0)), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// child: Align( +// alignment: Alignment.topRight, +// child:!isInWishlist +// ? InkWell( +// onTap: () { +// }, +// child: SvgPicture.asset( +// 'assets/images/pharmacy/heart-empty.svg', +// width: 20, +// height: 20, +// color: Colors.grey, +// ), +// ) +// : InkWell( +// onTap: () { +// }, +// child: SvgPicture.asset( +// 'assets/images/pharmacy/Redheart.svg', +// width: 20, +// height: 20, +//// color: Colors.red, +// ), +// ) +// ), +// ), +// Container( +// padding: EdgeInsets.only(left: 25, bottom: 20), +//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0), +//// alignment: Alignment.centerLeft, +// child: (model.recommendedProductList[index].images != null && +// model.recommendedProductList[index].images.length > 0) +// ? Image.network( +// model.recommendedProductList[index].images[0].src.toString(), +//// item.images[0].src, +// fit: BoxFit.cover, +// height: 80, +// ) +// : Image.asset( +// "assets/images/no_image.png", +// fit: BoxFit.cover, +// height: 80, +// ), +// ), +// Text( +// model.recommendedProductList[index].name, +//// model.recommendedProduct[0].products[index].shortDescription +//// .toString(), +// style: TextStyle( +// color: Colors.black, +// fontSize: 15.0, +//// fontWeight: FontWeight.bold, +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(top: 15, bottom: 10), +// child: Texts( +// "SAR ${model.recommendedProductList[index].price}", +// bold: true, +// fontSize: 14, +// ), +// ), +// Row( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only(right: 10), +//// margin: EdgeInsets.only(left: 5), +// child: Align( +// alignment: Alignment.topLeft, +// child: RatingBar.readOnly( +// initialRating: +// model.recommendedProductList[index].approvedRatingSum.toDouble(), +//// initialRating: productRate, +// size: 15.0, +// filledColor: Colors.yellow[700], +// emptyColor: Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts( +// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +//// bold: true, +// fontSize: 12, +// ), +// ]), +// ], +// ), +// ); +// } +// ), +// ] + ), + ), + ]) + : Container(), + ) + : Container( + height: model.recommendedProductList.length > 0 + ? MediaQuery.of(context).size.height * 0.60 + : 0, + child: ListView.builder( + physics: ScrollPhysics(), +// physics: NeverScrollableScrollPhysics(), + itemCount: model.recommendedProductList.length, + itemBuilder: (context, index) { + return Card( + elevation: 2, + shape: RoundedRectangleBorder( + side: + BorderSide(color: Colors.grey[300], width: 2), + borderRadius: BorderRadius.circular(10)), +// + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(15), + ), + ), + padding: EdgeInsets.symmetric(horizontal: 5), + width: MediaQuery.of(context).size.width / 3, +// + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack(children: [ + Container( + child: Align( + alignment: Alignment.topRight, + child: //true + //wishlistVar[index].id.contains(model.recommendedProductList[index].id) + !isInWishlist + ? IconButton( + icon: Icon( + Icons.favorite_border), + color: Colors.grey, + iconSize: 30, + onPressed: () { + setState(() { + addToWishlistFunction( + itemID); + }); + }, + ) + : IconButton( + icon: Icon(Icons.favorite), + color: Colors.red, + iconSize: 30, + onPressed: () { + setState(() { + deleteFromWishlistFunction( + itemID); + }); + }, + ) +// + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 16, 10, 16), + alignment: Alignment.center, +// padding: EdgeInsets.only(left: 25, bottom: 20), + child: (model.recommendedProductList[index] + .images != + null && + model.recommendedProductList[index] + .images.length > + 0) + ? Image.network( + model.recommendedProductList[index] + .images[0].src + .toString(), +// item.images[0].src, + fit: BoxFit.cover, + height: 60, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 60, + ), + ), + Container( + width: model.recommendedProductList[index] + .rxMessage != + null + ? MediaQuery.of(context).size.width / 5 + : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(6)), + ), + child: Texts( + model.recommendedProductList[index] + .rxMessage != + null + ? model.recommendedProductList[index] + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ), + ), + ]), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 2, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + model + .recommendedProductList[index].name, + style: TextStyle( + color: Colors.black, + fontSize: 13.0, +// fontWeight: FontWeight.bold, + ), + ), + Padding( +// padding: const EdgeInsets.only(top: 15, bottom: 10), + padding: const EdgeInsets.only( + top: 10, bottom: 5), + child: Texts( + "SAR ${model.recommendedProductList[index].price}", + bold: true, + fontSize: 14, + ), + ), + ], + ), + ), + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only( + right: 10, bottom: 10), +// margin: EdgeInsets.only(left: 5), + child: Align( + alignment: Alignment.topLeft, + child: RatingBar.readOnly( + initialRating: model + .recommendedProductList[index] + .approvedRatingSum + .toDouble(), +// initialRating: productRate, + size: 13.0, + filledColor: Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, + ), + ), + ), + Texts( + "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +// bold: true, + fontSize: 12, + ), + ]), + ], + ), + ), + ); +// Container( +// height: 30, +// padding: EdgeInsets.only( left: 10.0, top: 10, right: 10), +//// margin: EdgeInsets.only(right: 10.0), +// decoration: BoxDecoration( +// border: Border.all( +// color: Colors.grey, +// style: BorderStyle.solid, +// width: 1.0, +// ), +// color: Colors.white, +// borderRadius: BorderRadius.circular(10.0)), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// child: Align( +// alignment: Alignment.topRight, +// child:!isInWishlist +// ? InkWell( +// onTap: () { +// }, +// child: SvgPicture.asset( +// 'assets/images/pharmacy/heart-empty.svg', +// width: 20, +// height: 20, +// color: Colors.grey, +// ), +// ) +// : InkWell( +// onTap: () { +// }, +// child: SvgPicture.asset( +// 'assets/images/pharmacy/Redheart.svg', +// width: 20, +// height: 20, +//// color: Colors.red, +// ), +// ) +// ), +// ), +// Container( +// padding: EdgeInsets.only(left: 25, bottom: 20), +//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0), +//// alignment: Alignment.centerLeft, +// child: (model.recommendedProductList[index].images != null && +// model.recommendedProductList[index].images.length > 0) +// ? Image.network( +// model.recommendedProductList[index].images[0].src.toString(), +//// item.images[0].src, +// fit: BoxFit.cover, +// height: 80, +// ) +// : Image.asset( +// "assets/images/no_image.png", +// fit: BoxFit.cover, +// height: 80, +// ), +// ), +// Text( +// model.recommendedProductList[index].name, +//// model.recommendedProduct[0].products[index].shortDescription +//// .toString(), +// style: TextStyle( +// color: Colors.black, +// fontSize: 15.0, +//// fontWeight: FontWeight.bold, +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(top: 15, bottom: 10), +// child: Texts( +// "SAR ${model.recommendedProductList[index].price}", +// bold: true, +// fontSize: 14, +// ), +// ), +// Row( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only(right: 10), +//// margin: EdgeInsets.only(left: 5), +// child: Align( +// alignment: Alignment.topLeft, +// child: RatingBar.readOnly( +// initialRating: +// model.recommendedProductList[index].approvedRatingSum.toDouble(), +//// initialRating: productRate, +// size: 15.0, +// filledColor: Colors.yellow[700], +// emptyColor: Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts( +// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +//// bold: true, +// fontSize: 12, +// ), +// ]), +// ], +// ), +// ); + }), + ), + ]), + ), + ), + ); + } + checkWishlist() async { + ProductDetailViewModel x = new ProductDetailViewModel(); + await x.checkWishlistData(); + for (int i = 0; i < x.wishListItems.length; i++) { + // itemID = x.wishListItems[i].id; + print("-------------wishlist---------------"); + print(itemID); +// print(product.id); + print(x.wishListItems[i].productId); + if (itemID == x.wishListItems[i].productId) { + isInWishlist = true; +// print('in wishlist'); + break; + } else { + isInWishlist = false; +// print('not in wishlist'); + } + } + } + + Future userInfo(id, product) async { + customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + if (customerId != null) { + itemID = id; + product = product; + checkWishlist(); + } + print("customerId:$customerId"); + return customerId; + } + + + addToWishlistFunction(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + isInWishlist = true; + await x.addToWishlistData(itemID); + } + + deleteFromWishlistFunction(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + isInWishlist = false; + await x.addToWishlistData(itemID); + } +} + diff --git a/lib/pages/pharmacies/widgets/ProductOrderItem.dart b/lib/pages/pharmacies/widgets/ProductOrderItem.dart index 92e2c39d..d7a82cc6 100644 --- a/lib/pages/pharmacies/widgets/ProductOrderItem.dart +++ b/lib/pages/pharmacies/widgets/ProductOrderItem.dart @@ -72,7 +72,7 @@ class _ProductOrderItemState extends State { child: Texts( projectProvider.isArabic ? widget.item.product.namen - : widget.item.product.name, + : "${widget.item.product.name}", regular: true, textAlign: TextAlign.justify, fontSize: 12, @@ -88,91 +88,90 @@ class _ProductOrderItemState extends State { ), margin: const EdgeInsets.only(bottom: 4), ), - Row( - children: [ - InkWell( - onTap: () => - {_quantityOnChangeClick(Operation.dec)}, - child: Container( - width: 25, - height: 25, - child: Center( - child: Texts( - "-", - color: Colors.grey.shade400, - )), - decoration: BoxDecoration( - border: Border.all( - color: Colors.grey.shade400, - width: 1.0, + Container( + margin: EdgeInsets.symmetric(vertical: 4), + child: Row( + children: [ + InkWell( + onTap: () => + {_quantityOnChangeClick(Operation.dec)}, + child: Container( + width: 25, + height: 25, + child: Icon( + Icons.remove, color: Colors.grey.shade400, size: 20, + ), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 1.0, + ), ), ), ), - ), - Container( - margin: - const EdgeInsets.symmetric(horizontal: 4), - width: 25, - height: 25, - color: Colors.grey.shade300, - child: Center( - child: TextField( - cursorColor: Colors.black, - keyboardType: TextInputType.number, - controller: _quantityController, - textAlign: TextAlign.center, - onChanged: (text) { - setState(() { - var value = int.tryParse(text); - if (value == null) { - widget.item.quantity = 0; - } else { - widget.item.quantity = int.parse(text); - } - _totalPrice = - "${(widget.item.product.price * widget.item.quantity).toStringAsFixed(2)}"; - }); - }, - )), - ), - InkWell( - onTap: () => - {_quantityOnChangeClick(Operation.inc)}, - child: Container( + Container( + margin: + const EdgeInsets.symmetric(horizontal: 4), width: 25, height: 25, + color: Colors.grey.shade300, child: Center( - child: Texts( - "+", - color: Colors.grey.shade400, + child: TextField( + cursorColor: Colors.black, + keyboardType: TextInputType.number, + controller: _quantityController, + textAlign: TextAlign.center, + onChanged: (text) { + setState(() { + var value = int.tryParse(text); + if (value == null) { + widget.item.quantity = 0; + } else { + widget.item.quantity = int.parse(text); + } + _totalPrice = + "${(widget.item.product.price * widget.item.quantity).toStringAsFixed(2)}"; + }); + }, )), - decoration: BoxDecoration( - border: Border.all( - color: Colors.grey.shade400, - width: 1.0, - ), - ), ), - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Texts( - TranslationBase.of(context).total, - color: Colors.grey.shade500, - fontWeight: FontWeight.bold, - fontSize: 12, + InkWell( + onTap: () => + {_quantityOnChangeClick(Operation.inc)}, + child: Container( + width: 25, + height: 25, + child: Icon( + Icons.add, color: Colors.grey.shade400, size: 20, + ), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 1.0, + ), ), - Texts( - "$_totalPrice ${projectProvider.isArabic ? widget.item.currencyn : widget.item.currency}", - fontSize: 12, - fontWeight: FontWeight.bold, - ) - ], + ), ), - ) - ], + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Texts( + TranslationBase.of(context).total, + color: Colors.grey.shade500, + fontWeight: FontWeight.bold, + fontSize: 12, + ), + Texts( + "$_totalPrice ${projectProvider.isArabic ? widget.item.currencyn : widget.item.currency}", + fontSize: 12, + fontWeight: FontWeight.bold, + ) + ], + ), + ) + ], + ), ) ], ), diff --git a/lib/pages/pharmacies/widgets/manufacturerItem.dart b/lib/pages/pharmacies/widgets/manufacturerItem.dart index 7ffa3d89..574c37c5 100644 --- a/lib/pages/pharmacies/widgets/manufacturerItem.dart +++ b/lib/pages/pharmacies/widgets/manufacturerItem.dart @@ -1,6 +1,9 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; +import '../../final_products_page.dart'; + class ManufacturerItem extends StatelessWidget { final Manufacturer item; @@ -8,25 +11,38 @@ class ManufacturerItem extends StatelessWidget { @override Widget build(BuildContext context) { - return Card( - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Container( - decoration: BoxDecoration( - border: Border( - right: BorderSide(color: Colors.grey.shade300, width: 1), - bottom: BorderSide(color: Colors.grey.shade300, width: 1), - left: BorderSide(color: Colors.grey.shade300, width: 1), - top: BorderSide(color: Colors.grey.shade300, width: 1)), + return InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: item.id, + productType: 2, + ), + ), + ); + }, + child: Card( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, ), - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 8), - child: Image.network( - item.image.src, - fit: BoxFit.cover, + child: Container( + decoration: BoxDecoration( + border: Border( + right: BorderSide(color: Colors.grey.shade300, width: 1), + bottom: BorderSide(color: Colors.grey.shade300, width: 1), + left: BorderSide(color: Colors.grey.shade300, width: 1), + top: BorderSide(color: Colors.grey.shade300, width: 1)), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Image.network( + item.image.src, + fit: BoxFit.cover, + ), ), ), ), diff --git a/lib/pages/pharmacies/wishlist.dart b/lib/pages/pharmacies/wishlist.dart index 822dfe89..000e8404 100644 --- a/lib/pages/pharmacies/wishlist.dart +++ b/lib/pages/pharmacies/wishlist.dart @@ -5,6 +5,8 @@ import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; class WishlistPage extends StatefulWidget { + bool showBar; + WishlistPage(this.showBar); @override _WishlistPageState createState() => _WishlistPageState(); } @@ -17,9 +19,9 @@ class _WishlistPageState extends State { onModelReady: (model) => model.getWishlistData(), builder: (_, model, wi) => AppScaffold( appBarTitle: 'Wishlist page', - isShowAppBar: false, + isShowAppBar: widget.showBar, isShowDecPage: false, - isPharmacy: false, + isPharmacy: true, baseViewModel: model, body: model.wishListList.length == 0 ? Container( diff --git a/lib/pages/pharmacy/order/Order.dart b/lib/pages/pharmacy/order/Order.dart index 4ef14389..2ba92674 100644 --- a/lib/pages/pharmacy/order/Order.dart +++ b/lib/pages/pharmacy/order/Order.dart @@ -1,21 +1,17 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; -import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/order/OrderDetails.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; -import 'package:diplomaticquarterapp/pages/pharmacy/order/OrderDetails.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; dynamic languageID; -class OrderPage extends StatefulWidget { +class OrderPage extends StatefulWidget { // orderList({this.customerId, this.pageId}); String customerID; @@ -26,19 +22,22 @@ class OrderPage extends StatefulWidget { _OrderPageState createState() => _OrderPageState(); } -class _OrderPageState extends State with SingleTickerProviderStateMixin{ - - String pageID= "1"; +class _OrderPageState extends State + with SingleTickerProviderStateMixin { + String pageID = "1"; String customerId = ""; - String order =""; + String order = ""; - List orderList = [] ; - List deliveredOrderList = [] ; - List processingOrderList = []; - List cancelledOrderList = []; - List pendingOrderList = []; + List orderList = []; + + List deliveredOrderList = []; + + List processingOrderList = []; + List cancelledOrderList = []; + List pendingOrderList = []; TabController _tabController; + // AppSharedPreferences sharedPref = AppSharedPreferences(); getLanguageID() async { languageID = await sharedPref.getString(APP_LANGUAGE); @@ -49,28 +48,30 @@ class _OrderPageState extends State with SingleTickerProviderStateMix getLanguageID(); super.initState(); - - _tabController = new TabController(length: 4, vsync: this,); + _tabController = new TabController( + length: 4, + vsync: this, + ); } @override Widget build(BuildContext context) { - print( "customerID" + widget.customerID); + print("customerID" + widget.customerID); return BaseView( onModelReady: (model) => model.getOrder(widget.customerID, pageID), - builder: (_,model, wi )=> AppScaffold( - appBarTitle:TranslationBase.of(context).order, + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).order, baseViewModel: model, - isShowAppBar: true, - isPharmacy:true , + isShowAppBar: true, + isPharmacy: true, body: Container( child: Column( children: [ TabBar( - labelPadding: - EdgeInsets.only(left: 3.0, right: 3.0), + labelPadding: EdgeInsets.only(left: 3.0, right: 3.0), + labelColor: Colors.black, tabs: [ - Tab(text: TranslationBase.of(context).delivered), + Tab(text: TranslationBase.of(context).delivered), Tab(text: TranslationBase.of(context).processing), Tab(text: TranslationBase.of(context).pending), Tab(text: TranslationBase.of(context).cancelled), @@ -103,226 +104,277 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ); } - - - Widget getDeliveredOrder(OrderModelViewModel model){ - for(int i=0 ; i< model.orders.length; i++){ - if( model.orders[i].orderStatusId == 30 || model.orders[i].orderStatusId == 997 - || model.orders[i].orderStatusId == 994 - ){ + Widget getDeliveredOrder(OrderModelViewModel model) { + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 30 || + model.orders[i].orderStatusId == 997 || + model.orders[i].orderStatusId == 994) { deliveredOrderList.add(model.orders[i]); } } return Container( width: MediaQuery.of(context).size.width, child: model.orders.length != 0 - ? SingleChildScrollView( - child: Column( - children: [ - ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - itemCount: deliveredOrderList.length, - itemBuilder: (context, index){ - return Container( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderNumber, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), - ), - ), - Container( - child: Text(deliveredOrderList[index].id.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + ? SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: deliveredOrderList.length, + itemBuilder: (context, index) { + return Container( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: Text( + deliveredOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderDate, - style: TextStyle(fontSize: 14.0, - ), + SizedBox( + height: 5, ), - ), - Container( - child: Text(deliveredOrderList[index].createdOnUtc.toString().substring(0,10), - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + deliveredOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + deliveredOrderList[ + index]), + )); + }, + child: SvgPicture.asset( + languageID == "ar" + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', + height: 20, + width: 20, ), - ], + ), ), ], ), - ), - Container( - margin: EdgeInsets.all(8.0), - child: InkWell( - onTap: () { - Navigator.push(context, - MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel: deliveredOrderList[index]),)); - }, - child: SvgPicture.asset( - languageID == "ar" - ? 'assets/images/pharmacy/arrow_left.svg' - :'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20,), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - padding: EdgeInsets.only(left: 13.0, right: 13.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.blue[700], - style: BorderStyle.solid, - width: 5.0, - ), - color: Colors.blue[700], - borderRadius: BorderRadius.circular(30.0) - ), - child: deliveredOrderList[index].orderStatusId == 30 - ? Text( + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.blue[700], + style: BorderStyle.solid, + width: 5.0, + ), + color: Colors.blue[700], + borderRadius: + BorderRadius.circular(30.0)), + child: deliveredOrderList[index] + .orderStatusId == + 30 + ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).deliveredOrder, - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - : Text( - languageID == "ar" - ? deliveredOrderList[index].orderStatusn.toString(): - deliveredOrderList[index].orderStatus.toString(), - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - ), - Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - child: Column( + TranslationBase.of(context) + .deliveredOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? deliveredOrderList[index] + .orderStatusn + .toString() + : deliveredOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + child: Column( // crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Text(deliveredOrderList[index].orderTotal.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), - ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + children: [ + Row( + children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + deliveredOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - child: Text(deliveredOrderList[index].productCount.toString(), - style: TextStyle(fontSize: 14.0, - ), + SizedBox( + height: 5, ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).itemsNo, - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + child: Text( + deliveredOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), - ), - ], + ], + ), ), ], ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 8, - indent: 0, - endIndent: 0, - ), - ], - ), - ); - } + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + }) + ], + ), ) - ], - ), - ) : Container( - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SvgPicture.asset( - 'assets/images/pharmacy/empty_box.svg'), - Container( - margin: EdgeInsets.only(top: 10.0), - child: Text(TranslationBase.of(context).noOrder, - style: TextStyle( - fontSize: 16.0, - )), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), ), - ], - ), - ), - ), + ), ); } - Widget getProcessingOrder(OrderModelViewModel model){ - for(int i=0 ; i< model.orders.length; i++){ - if( model.orders[i].orderStatusId == 20 || model.orders[i].orderStatusId == 995 || - model.orders[i].orderStatusId == 998 || model.orders[i].orderStatusId == 999){ + Widget getProcessingOrder(OrderModelViewModel model) { + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 20 || + model.orders[i].orderStatusId == 995 || + model.orders[i].orderStatusId == 998 || + model.orders[i].orderStatusId == 999) { processingOrderList.add(model.orders[i]); } } @@ -330,206 +382,255 @@ class _OrderPageState extends State with SingleTickerProviderStateMix width: MediaQuery.of(context).size.width, child: model.orders.length != 0 ? SingleChildScrollView( - child: Column( - children: [ - ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - itemCount: processingOrderList.length, - itemBuilder: (context, index){ - return Container( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderNumber, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), - ), - ), - Container( - child: Text(processingOrderList[index].id.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: processingOrderList.length, + itemBuilder: (context, index) { + return Container( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: Text( + processingOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderDate, - style: TextStyle(fontSize: 14.0, - ), + SizedBox( + height: 5, ), - ), - Container( - child: Text(processingOrderList[index].createdOnUtc.toString().substring(0,10), - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + processingOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + processingOrderList[ + index]))); + }, + child: SvgPicture.asset( + languageID == "ar" + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', + height: 20, + width: 20, ), - ], + ), ), ], ), - ), - Container( - margin: EdgeInsets.all(8.0), - child: InkWell( - onTap: () { - Navigator.push(context, - MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel :processingOrderList[index]))); - - }, - child: SvgPicture.asset( - languageID == "ar" - ? 'assets/images/pharmacy/arrow_left.svg' - :'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20,), - ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - padding: EdgeInsets.only(left: 13.0, right: 13.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.green, - style: BorderStyle.solid, - width: 5.0, - ), - color: Colors.green, - borderRadius: BorderRadius.circular(30.0) + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, ), - child: processingOrderList[index].orderStatusId == 20 - ? Text( + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.green, + style: BorderStyle.solid, + width: 5.0, + ), + color: Colors.green, + borderRadius: + BorderRadius.circular(30.0)), + child: processingOrderList[index] + .orderStatusId == + 20 + ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).processingOrder, - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - : Text( - languageID == "ar" - ? processingOrderList[index].orderStatusn.toString(): - processingOrderList[index].orderStatus.toString(), - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - ), - Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - child: Column( + TranslationBase.of(context) + .processingOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? processingOrderList[index] + .orderStatusn + .toString() + : processingOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + child: Column( // crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Text(processingOrderList[index].orderTotal.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), - ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + children: [ + Row( + children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + processingOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - child: Text(processingOrderList[index].productCount.toString(), - style: TextStyle(fontSize: 14.0, - ), + SizedBox( + height: 5, ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).itemsNo, - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + child: Text( + processingOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), - ), - ], + ], + ), ), ], ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 8, - indent: 0, - endIndent: 0, - ), - ], - ), - ); - } + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + }) + ], + ), ) - ], - ), - ) : Container( - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SvgPicture.asset( - 'assets/images/pharmacy/empty_box.svg'), - Container( - margin: EdgeInsets.only(top: 10.0), - child: Text(TranslationBase.of(context).noOrder, - style: TextStyle( - fontSize: 16.0, - )), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), ), - ], - ), - ), - ), + ), ); // return Container( // child: model.order.length != 0 @@ -589,7 +690,7 @@ class _OrderPageState extends State with SingleTickerProviderStateMix // child: InkWell( // onTap: () { // Navigator.push(context, -// MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel:processingOrderList[0]))); +// FadePage(page: OrderDetailsPage(orderModel:processingOrderList[0]))); // }, // child: SvgPicture.asset( // 'assets/images/pharmacy/arrow_right.svg', @@ -712,447 +813,552 @@ class _OrderPageState extends State with SingleTickerProviderStateMix // ); } - Widget getPendingOrder(OrderModelViewModel model){ - for(int i=0 ; i< model.orders.length; i++){ - if( model.orders[i].orderStatusId == 10){ + Widget getPendingOrder(OrderModelViewModel model) { + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 10) { pendingOrderList.add(model.orders[i]); } } return Container( child: model.orders.length != 0 - ? SingleChildScrollView( - child: Column( - children: [ - ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - itemCount: pendingOrderList.length , - itemBuilder: (context, index){ - return Container( - child: SingleChildScrollView( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderNumber, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + ? SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: pendingOrderList.length, + itemBuilder: (context, index) { + return Container( + child: SingleChildScrollView( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: Text( + pendingOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - Container( - child: Text(pendingOrderList[index].id.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + SizedBox( + height: 5, ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderDate, - style: TextStyle(fontSize: 14.0, - ), - ), - ), - Container( - child: Text(pendingOrderList[index].createdOnUtc.toString().substring(0,10), - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + pendingOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + pendingOrderList[ + index]))); + }, + child: SvgPicture.asset( + languageID == "ar" + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', + height: 20, + width: 20, ), - ], + ), ), ], ), - ), - Container( - margin: EdgeInsets.all( 8.0), - child: InkWell( - onTap: () { - Navigator.push(context, - MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel:pendingOrderList[index]))); - - }, - child: SvgPicture.asset( - languageID == "ar" - ? 'assets/images/pharmacy/arrow_left.svg' - :'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20,), - ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.all(8.0), - padding: EdgeInsets.only(left: 13.0, right: 13.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.orange[300], - style: BorderStyle.solid, - width: 5.0, - ), - color: Colors.orange[300], - borderRadius: BorderRadius.circular(30.0) + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, ), - child: pendingOrderList[index].orderStatusId == 10 - ? Text( + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.orange[300], + style: BorderStyle.solid, + width: 5.0, + ), + color: Colors.orange[300], + borderRadius: + BorderRadius.circular(30.0)), + child: pendingOrderList[index] + .orderStatusId == + 10 + ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).pendingOrder, - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - : Text( - languageID == "ar" - ? pendingOrderList[index].orderStatusn.toString(): - pendingOrderList[index].orderStatus.toString(), - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - ), - Container( - margin: EdgeInsets.all(8.0), - child: Column( + TranslationBase.of(context) + .pendingOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? pendingOrderList[index] + .orderStatusn + .toString() + : pendingOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.all(8.0), + child: Column( // crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Text(pendingOrderList[index].orderTotal.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + pendingOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + SizedBox( + height: 5, ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - child: Text(pendingOrderList[index].productCount.toString(), - style: TextStyle(fontSize: 14.0, - ), - ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).itemsNo, - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + child: Text( + pendingOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), - ), - ], + ], + ), ), ], ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 8, - indent: 0, - endIndent: 0, + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), ), - ], - ), - ), - - ); - } + ); + }) + ], + ), ) - ], - ), - ) : Container( - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SvgPicture.asset( - 'assets/images/pharmacy/empty_box.svg'), - Container( - margin: EdgeInsets.only(top: 10.0), - child: Text(TranslationBase.of(context).noOrder, - style: TextStyle( - fontSize: 16.0, - )), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), ), - ], - ), - ), - ), - + ), ); } - Widget getCancelledOrder(OrderModelViewModel model){ - for(int i=0 ; i< model.orders.length; i++){ - if( model.orders[i].orderStatusId == 40 || model.orders[i].orderStatus == 996 - || model.orders[i].orderStatusId == 200){ + Widget getCancelledOrder(OrderModelViewModel model) { + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 40 || + model.orders[i].orderStatus == 996 || + model.orders[i].orderStatusId == 200) { cancelledOrderList.add(model.orders[i]); } } return Container( child: model.orders.length != 0 - ? SingleChildScrollView( - child: Column( - children: [ - ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - itemCount: cancelledOrderList.length, - itemBuilder: (context, index){ - return Container( - child: SingleChildScrollView( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.all( 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderNumber, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + ? SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: cancelledOrderList.length, + itemBuilder: (context, index) { + return Container( + child: SingleChildScrollView( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: Text( + cancelledOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - Container( - child: Text(cancelledOrderList[index].id.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + SizedBox( + height: 5, ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 5), - child: Text(TranslationBase.of(context).orderDate, - style: TextStyle(fontSize: 14.0, - ), - ), - ), - Container( - child: Text(cancelledOrderList[index].createdOnUtc.toString().substring(0,10), - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + cancelledOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + cancelledOrderList[ + index]))); + }, + child: SvgPicture.asset( + languageID == "ar" + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', + height: 20, + width: 20, ), - ], + ), ), ], ), - ), - Container( - margin: EdgeInsets.all(8.0), - child: InkWell( - onTap: () { - Navigator.push(context, - MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel: cancelledOrderList[index]))); - - }, - child: SvgPicture.asset( - languageID == "ar" - ? 'assets/images/pharmacy/arrow_left.svg' - :'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20,), - ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - padding: EdgeInsets.only(left: 10.0, right: 10.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.red[900], - style: BorderStyle.solid, - width: 5.0, - ), - color: Colors.red[900], - borderRadius: BorderRadius.circular(30.0) + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, ), - child: cancelledOrderList[index].orderStatusId == 40 - ? Text( + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only( + left: 8, + right: 8, + top: 1, + bottom: 8), + padding: EdgeInsets.only( + left: 10.0, right: 10.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.red[900], + style: BorderStyle.solid, + width: 5.0, + ), + color: Colors.red[900], + borderRadius: + BorderRadius.circular(30.0)), + child: cancelledOrderList[index] + .orderStatusId == + 40 + ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).cancelledOrder, - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - : Text( - languageID == "ar" - ? cancelledOrderList[index].orderStatusn.toString(): - cancelledOrderList[index].orderStatus.toString(), - style: TextStyle( - color: Colors.white, - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ) - ), - Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - child: Column( + TranslationBase.of(context) + .cancelledOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? cancelledOrderList[index] + .orderStatusn + .toString() + : cancelledOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + child: Column( // crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Text(cancelledOrderList[index].orderTotal.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), - ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + cancelledOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - ], - ), - SizedBox( - height: 5,), - Row( - children: [ - Container( - child: Text(cancelledOrderList[index].productCount.toString(), - style: TextStyle(fontSize: 14.0, - ), + SizedBox( + height: 5, ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).itemsNo, - style: TextStyle(fontSize: 14.0, - ), + Row( + children: [ + Container( + child: Text( + cancelledOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], ), - ), - ], + ], + ), ), ], ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 8, - indent: 0, - endIndent: 0, + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), ), - ], - ), - ), - - ); - } + ); + }) + ], + ), ) - ], - ), - ) : Container( - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SvgPicture.asset( - 'assets/images/pharmacy/empty_box.svg'), - Container( - margin: EdgeInsets.only(top: 10.0), - child: Text(TranslationBase.of(context).noOrder, - style: TextStyle( - fontSize: 16.0, - )), - ), - ], - ), - ), - ), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), + ), + ), ); int test = Test()["1"]; } - } -class Test{ - static const values = { - "1":1, - "2":2, - "3":3 - }; +class Test { + static const values = {"1": 1, "2": 2, "3": 3}; + int operator [](String key) => values[key]; -} \ No newline at end of file +} diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart index f3ee5447..2f113e50 100644 --- a/lib/pages/pharmacy/order/OrderDetails.dart +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -1,28 +1,27 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; -import 'package:diplomaticquarterapp/pages/pharmacy/order/TrackDriver.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets//pharmacy/product_tile.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:diplomaticquarterapp/widgets//pharmacy/product_tile.dart'; -import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:flutter/src/widgets/image.dart' as flutterImage; - -import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; -import 'package:provider/provider.dart'; +import 'package:flutter_svg/flutter_svg.dart'; dynamic languageID; class OrderDetailsPage extends StatefulWidget { Orders orderModel; + OrderDetailsPage({@required this.orderModel}); // Orders orderModel; @@ -40,9 +39,9 @@ class _OrderDetailsPageState extends State { // AppSharedPreferences sharedPref = AppSharedPreferences(); String customerId; - List ordersList = []; + List ordersList = []; - List cancelledOrderList = []; + List cancelledOrderList = []; // String orderId="3516"; var model; @@ -51,6 +50,9 @@ class _OrderDetailsPageState extends State { var isActiveDelivery = false; var dataIsCancel; var dataIsRefund; + BuildContext context; + + MyInAppBrowser browser; @override void initState() { @@ -65,11 +67,13 @@ class _OrderDetailsPageState extends State { @override Widget build(BuildContext context) { + this.context = context; return BaseView( - onModelReady: (model){ - model.getOrderDetails(widget.orderModel.id).then((value){ + onModelReady: (model) { + model.getOrderDetails(widget.orderModel.id).then((value) { setState(() { - isActiveDelivery = (value.orderStatusId == 995 && (value.driverID != null && value.driverID.isNotEmpty)); + isActiveDelivery = (value.orderStatusId == 995 && + (value.driverID != null && value.driverID.isNotEmpty)); }); }); }, @@ -77,183 +81,179 @@ class _OrderDetailsPageState extends State { appBarTitle: TranslationBase.of(context).orderDetail, isShowAppBar: true, isPharmacy: true, - body: Container( - color: Colors.white, - child: SingleChildScrollView( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.fromLTRB(10.0, 15.0, 1.0, 5.0), - child: Row( + baseViewModel: model, + body: model.orderListModel.length > 0 + ? Container( + color: Colors.white, + child: SingleChildScrollView( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - SvgPicture.asset( - 'assets/images/pharmacy/shipping_mark_icon.svg', - width: 28, - height: 28, + Container( + margin: EdgeInsets.fromLTRB(10.0, 15.0, 1.0, 5.0), + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/shipping_mark_icon.svg', + width: 28, + height: 28, + ), + Text( + TranslationBase.of(context).shippingAddress, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), ), - Text( - TranslationBase.of(context).shippingAddress, - style: TextStyle( - fontSize: 13.0, - fontWeight: FontWeight.bold, + Container( + margin: EdgeInsets.only(top: 15.0, right: 10.0), + padding: EdgeInsets.only(left: 11.0, right: 11.0), + decoration: BoxDecoration( + border: Border.all( + color: getStatusBackgroundColor(), + style: BorderStyle.solid, + width: 5.0, + ), + color: getStatusBackgroundColor(), + borderRadius: BorderRadius.circular(30.0)), + child: Text( + languageID == "ar" + ? model.orderListModel[0].orderStatusn + : model.orderListModel[0].orderStatus, +// TranslationBase.of(context).delivered, + style: TextStyle( + color: Colors.white, + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), ), ), ], ), - ), - Container( - margin: EdgeInsets.only(top: 15.0, right: 10.0), - padding: EdgeInsets.only(left: 11.0, right: 11.0), - decoration: BoxDecoration( - border: Border.all( - color: getStatusBackgroundColor(), - style: BorderStyle.solid, - width: 5.0, - ), - color: getStatusBackgroundColor(), - borderRadius: BorderRadius.circular(30.0)), - child: Text( - languageID == "ar" - ? model.orderListModel[0].orderStatusn.toString() - : model.orderListModel[0].orderStatus - .toString() - .substring(12), -// TranslationBase.of(context).delivered, - style: TextStyle( - color: Colors.white, - fontSize: 13.0, - fontWeight: FontWeight.bold, - ), + Container( + margin: EdgeInsets.only(left: 10.0, top: 13.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "${model.orderListModel[0].shippingAddress.firstName} ${model.orderListModel[0].shippingAddress.lastName}", + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ]), ), - ), - ], - ), - Container( - margin: EdgeInsets.only(left: 10.0, top: 13.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - model.orderListModel[0].shippingAddress.firstName - .toString() - .substring(10) + - ' ' + - model.orderListModel[0].shippingAddress.lastName - .toString() - .substring(9), - style: TextStyle( - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ), - ]), - ), - Container( - margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - model.orderListModel[0].shippingAddress.address1 - .toString() - .substring(9), - style: TextStyle( - fontSize: 10.0, - fontWeight: FontWeight.bold, - color: Colors.grey, - ), - ), - ]), - ), - Container( - margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - model.orderListModel[0].shippingAddress.address2 - .toString() - .substring(9) + - ' ' + - model.orderListModel[0].shippingAddress.country - .toString() + - ' ' + - model.orderListModel[0].shippingAddress - .zipPostalCode - .toString(), - style: TextStyle( - fontSize: 10.0, - fontWeight: FontWeight.bold, - color: Colors.grey, - ), - ), - ]), - ), - Container( - child: Row( - children: [ Container( - margin: EdgeInsets.fromLTRB(10.0, 5.0, 8.0, 5.0), - child: SvgPicture.asset( - 'assets/images/pharmacy/mobile_number_icon.svg', - height: 13, - ), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.orderListModel[0].shippingAddress.address1 + .toString() + , + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ), + ]), ), Container( - margin: EdgeInsets.only(top: 5.0, bottom: 5.0), - child: Text( - model.orderListModel[0].shippingAddress.phoneNumber - .toString(), - style: TextStyle( - fontSize: 15.0, - ), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.orderListModel[0].shippingAddress.address2 + .toString() + + + ' ' + + model.orderListModel[0].shippingAddress + .country + .toString() + + ' ' + + model.orderListModel[0].shippingAddress + .zipPostalCode + .toString(), + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ), + ]), + ), + Container( + child: Row( + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 8.0, 5.0), + child: SvgPicture.asset( + 'assets/images/pharmacy/mobile_number_icon.svg', + height: 13, + ), + ), + Container( + margin: EdgeInsets.only(top: 5.0, bottom: 5.0), + child: Text( + model.orderListModel[0].shippingAddress + .phoneNumber + .toString(), + style: TextStyle( + fontSize: 15.0, + ), + ), + ), + ], ), ), - ], - ), - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - children: [ - Container( - margin: EdgeInsets.fromLTRB(10.0, 10.0, 5.0, 10.0), - child: SvgPicture.asset( - 'assets/images/pharmacy/shipping_truck_icon.svg', + Divider( + color: Colors.grey[350], height: 20, - width: 20, + thickness: 1, + indent: 0, + endIndent: 0, ), - ), - Container( - margin: EdgeInsets.all(10.0), - child: Text( - TranslationBase.of(context).shippedMethod, - style: TextStyle( - fontSize: 13.0, - fontWeight: FontWeight.bold, - ), - ), - ), - Container( - child: flutterImage.Image.asset( - model.orderListModel[0] - .shippingRateComputationMethodSystemName != - "Shipping.Aramex" - ? "assets/images/pharmacy_module/payment/LogoParmacyGreen.png" - : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", - fit: BoxFit.contain, + Row( + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 10.0, 5.0, 10.0), + child: SvgPicture.asset( + 'assets/images/pharmacy/shipping_truck_icon.svg', + height: 20, + width: 20, + ), + ), + Container( + margin: EdgeInsets.all(10.0), + child: Text( + TranslationBase.of(context).shippedMethod, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: flutterImage.Image.asset( + model.orderListModel[0] + .shippingRateComputationMethodSystemName != + "Shipping.Aramex" + ? "assets/images/pharmacy_module/payment/LogoParmacyGreen.png" + : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", + fit: BoxFit.contain, // height: 100, - width: 100, - ), - ), + width: 100, + ), + ), // Container( // child: widget.orderModel // .shippingRateComputationMethodSystemName == @@ -275,357 +275,348 @@ class _OrderDetailsPageState extends State { // ), // ), // ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 8, - indent: 0, - endIndent: 0, - ), - Row( - children: [ - Container( - margin: EdgeInsets.all(10.0), - child: SvgPicture.asset( - 'assets/images/pharmacy/credit_card_icon.svg', + ], + ), + Divider( + color: Colors.grey[350], height: 20, - width: 20, + thickness: 8, + indent: 0, + endIndent: 0, ), - ), - Container( - margin: EdgeInsets.only(bottom: 10.0, top: 10.0), - child: Text( - model.orderListModel[0].paymentName - .toString() - .substring(12), - style: TextStyle( - fontSize: 13.0, - fontWeight: FontWeight.bold, - ), + Row( + children: [ + Container( + margin: EdgeInsets.all(10.0), + child: SvgPicture.asset( + 'assets/images/pharmacy/credit_card_icon.svg', + height: 20, + width: 20, + ), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0, top: 10.0), + child: Text( + model.orderListModel[0].paymentName + .toString() + .substring(12), + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - ), - ], - ), - Divider( - color: Colors.grey[350], - height: 20, - thickness: 8, - indent: 0, - endIndent: 0, - ), - Container( - padding: EdgeInsets.only(bottom: 15.0), - margin: EdgeInsets.only(left: 10.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - TranslationBase.of(context).orderDetail, - style: TextStyle( - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, ), - ], - ), - ), - ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - itemCount: model.orderListModel[0].orderItems.length, - itemBuilder: (context, index) { - return Container( - child: productTile( - productName: model - .orderListModel[0].orderItems[index].product.name - .toString(), - productPrice: model - .orderListModel[0].orderItems[index].product.price - .toString(), - productRate: model.orderListModel[0].orderItems[index] - .product.approvedRatingSum - .toDouble(), - productReviews: model.orderListModel[0] - .orderItems[index].product.approvedTotalReviews, - totalPrice: - "${(model.orderListModel[0].orderItems[index].product.price * model.orderListModel[0].orderItems[index].quantity).toStringAsFixed(2)}", - qyt: model - .orderListModel[0].orderItems[index].quantity - .toString(), - isOrderDetails: true, - imgs: model.orderListModel[0].orderItems[index] - .product.images != - null && - model.orderListModel[0].orderItems[index] - .product.images.length != - 0 - ? model.orderListModel[0].orderItems[index] - .product.images[0].src - .toString() - : null, - status: model.orderListModel[0].orderStatusId, - product: - model.orderListModel[0].orderItems[index].product, - ), - ); - }), - - Container( - padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.only(left: 10.0, top: 5.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - TranslationBase.of(context).orderSummary, - style: TextStyle( - fontSize: 15.0, - fontWeight: FontWeight.bold, + Container( + padding: EdgeInsets.only(bottom: 15.0), + margin: EdgeInsets.only(left: 10.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).orderDetail, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ], ), ), - ], - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.only(top: 5.0, left: 10.0), - child: Text( - TranslationBase.of(context).subtotal, - style: TextStyle( - fontSize: 13.0, + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: model.orderListModel[0].orderItems.length, + itemBuilder: (context, index) { + return Container( + child: productTile( + productName: model.orderListModel[0].orderItems[index].product.name.toString(), + productPrice: model.orderListModel[0].orderItems[index].product.price.toString(), + productRate: model.orderListModel[0].orderItems[index].product.approvedRatingSum.toDouble(), + productReviews: model.orderListModel[0].orderItems[index].product.approvedTotalReviews, + totalPrice: "${(model.orderListModel[0].orderItems[index].product.price * model.orderListModel[0].orderItems[index].quantity).toStringAsFixed(2)}", + qyt: model.orderListModel[0].orderItems[index].quantity.toString(), + isOrderDetails: true, + imgs: model.orderListModel[0].orderItems[index].product.images != null && + model.orderListModel[0].orderItems[index].product.images.length != 0 + ? model.orderListModel[0].orderItems[index].product.images[0].src.toString() : null, + status: model.orderListModel[0].orderStatusId, + product: model.orderListModel[0].orderItems[index].product, + ), + ); + }), + + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(left: 10.0, top: 5.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).orderSummary, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ], ), ), - ), - Container( - padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), - child: Row( + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - margin: EdgeInsets.only(right: 5.0), + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( - TranslationBase.of(context).sar, + TranslationBase.of(context).subtotal, style: TextStyle( fontSize: 13.0, ), ), ), - Text( - model.orderListModel[0].orderSubtotalExclTax - .toString(), - style: TextStyle( - fontSize: 13.0, + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Text( + model.orderListModel[0].orderSubtotalExclTax + .toString(), + style: TextStyle( + fontSize: 13.0, + ), + ), + ], ), ), ], ), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.only(top: 5.0, left: 10.0), - child: Text( - TranslationBase.of(context).shipping, - style: TextStyle( - fontSize: 13.0, - ), - ), - ), - Container( - padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), - child: Row( + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - margin: EdgeInsets.only(right: 5.0), + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( - TranslationBase.of(context).sar, + TranslationBase.of(context).shipping, style: TextStyle( fontSize: 13.0, ), ), ), - Text( - model.orderListModel[0].orderShippingExclTax - .toString(), - style: TextStyle( - fontSize: 13.0, + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Text( + model.orderListModel[0].orderShippingExclTax + .toString(), + style: TextStyle( + fontSize: 13.0, + ), + ), + ], ), ), ], ), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.only(top: 5.0, left: 10.0), - child: Text( - TranslationBase.of(context).vat, - style: TextStyle( - fontSize: 13.0, - ), - ), - ), - Container( - padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), - child: Row( + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - margin: EdgeInsets.only(right: 5.0), + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( - TranslationBase.of(context).sar, + TranslationBase.of(context).vat, style: TextStyle( fontSize: 13.0, ), ), ), - Text( - model.orderListModel[0].orderTax.toString(), - style: TextStyle( - fontSize: 13.0, + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Text( + model.orderListModel[0].orderTax.toString(), + style: TextStyle( + fontSize: 13.0, + ), + ), + ], ), ), ], ), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.only(top: 5.0, left: 10.0), - child: Text( - TranslationBase.of(context).total, - style: TextStyle( - fontSize: 15.0, - fontWeight: FontWeight.bold, - ), - ), - ), - Container( - margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), - child: Row( + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - margin: EdgeInsets.only(right: 5.0), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( - TranslationBase.of(context).sar, + TranslationBase.of(context).total, style: TextStyle( fontSize: 15.0, fontWeight: FontWeight.bold, ), ), ), - Text( - model.orderListModel[0].orderTotal.toString(), - style: TextStyle( - fontSize: 15.0, - fontWeight: FontWeight.bold, + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Text( + model.orderListModel[0].orderTotal.toString(), + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ], ), ), ], ), - ), - ], - ), - model.orderListModel[0].orderStatusId == 10 - ? InkWell( - onTap: () { - model.makeOrder(); - }, - child: Container( + model.orderListModel[0].orderStatusId == 10 + ? InkWell( + onTap: () { + print(widget.orderModel.toString()); + print(model.orderListModel.toString()); + print("calc = ${5.9 * 3}"); + // TODO MOSA + openPayment( + model.orderListModel[0], model.user); + }, + child: Container( // margin: EdgeInsets.only(top: 20.0), - height: 50.0, - color: Colors.transparent, - child: Container( - padding: EdgeInsets.only(left: 130.0, right: 130.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.green, - style: BorderStyle.solid, - width: 4.0), - color: Colors.green, - borderRadius: BorderRadius.circular(5.0)), - child: Center( - child: Text( - TranslationBase.of(context).payOnline, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, + height: 50.0, + color: Colors.transparent, + child: Container( + padding: EdgeInsets.only( + left: 130.0, right: 130.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.green, + style: BorderStyle.solid, + width: 4.0), + color: Colors.green, + borderRadius: BorderRadius.circular(5.0)), + child: Center( + child: Text( + TranslationBase.of(context).payOnline, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + ), ), ), - ), - ), - ), - ) - : Container(), + ) + : Container(), // getCancelOrder(canCancel, canRefund), - isCancel - ? InkWell( - onTap: () { - presentConfirmDialog(model, widget.orderModel.id); - // model.orderListModel[0].id//(widget.orderModel.id)); + isCancel + ? InkWell( + onTap: () { + presentConfirmDialog( + model, widget.orderModel.id); + // model.orderListModel[0].id//(widget.orderModel.id)); // - }, - child: Container( + }, + child: Container( // padding: EdgeInsets.only(left: 13.0, right: 13.0, top: 5.0), - height: 50.0, - color: Colors.transparent, - child: Center( - child: Text( - TranslationBase.of(context).cancelOrder, - style: TextStyle( - color: Colors.red[900], - fontWeight: FontWeight.bold, - decoration: TextDecoration.underline), - ), - ), - ), - ) - : Container(), - isActiveDelivery - ? InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => TrackDriver(order: model.orderListModel.first), - )); - }, - child: Container( - height: 50.0, - color: Colors.transparent, - child: Center( - child: Text( - TranslationBase.of(context).trackDeliveryDriver, - style: TextStyle( - color: Colors.green[900], - fontWeight: FontWeight.normal, - decoration: TextDecoration.none), - ), - ), - ), - ) - : Container(), - ], - ), - ), - ), + height: 50.0, + color: Colors.transparent, + child: Center( + child: Text( + TranslationBase.of(context).cancelOrder, + style: TextStyle( + color: Colors.red[900], + fontWeight: FontWeight.bold, + decoration: TextDecoration.underline), + ), + ), + ), + ) + : Container(), + isActiveDelivery + ? InkWell( + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute(builder: (context) => TrackDriver(order: widget.orderModel), + // )); + }, + child: Container( + height: 50.0, + color: Colors.transparent, + child: Center( + child: Text( + TranslationBase.of(context) + .trackDeliveryDriver, + style: TextStyle( + color: Colors.green[900], + fontWeight: FontWeight.normal, + decoration: TextDecoration.none), + ), + ), + ), + ) + : Container(), + ], + ), + ), + ) + : Container(), ), ); } @@ -687,8 +678,8 @@ class _OrderDetailsPageState extends State { // Navigator.pop(context); Navigator.push( context, - MaterialPageRoute( - builder: (context) => OrderPage( + FadePage( + page: OrderPage( // customerID: model.ordersList[0].customerId.toString() customerID: widget.orderModel.customerId.toString())), ); @@ -707,4 +698,64 @@ class _OrderDetailsPageState extends State { } } + + /*** + * + * Online payment methods + */ + + openPayment( + OrderDetailModel order, + AuthenticatedUser authenticatedUser, + ) { + browser = new MyInAppBrowser( + onExitCallback: onBrowserExit, onLoadStartCallback: onBrowserLoadStart); + + browser.openPharmacyPaymentBrowser( + order, + order.orderTotal, + 'ePharmacy Order', + order.id, + order.billingAddress.email, + order.customValuesXml, + "${authenticatedUser.firstName} ${authenticatedUser.middleName} ${authenticatedUser.lastName}", + authenticatedUser.patientID, + authenticatedUser, + browser); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (isPaymentMade) { + AppToast.showSuccessToast( + message: "شكراً\nPayment status for your order is Paid"); + Navigator.pop(context); + Navigator.pop(context); + } else { + AppToast.showErrorToast( + message: + "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration"); + } + } } diff --git a/lib/pages/pharmacy/order/ProductReview.dart b/lib/pages/pharmacy/order/ProductReview.dart index 4d09191c..7f58fa21 100644 --- a/lib/pages/pharmacy/order/ProductReview.dart +++ b/lib/pages/pharmacy/order/ProductReview.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/profile/profile.dart'; @@ -12,7 +13,7 @@ import 'package:rating_bar/rating_bar.dart'; import 'package:flutter/src/widgets/image.dart' as flutterImage; class ProductReviewPage extends StatefulWidget { - final Product product; + final PharmacyProduct product; ProductReviewPage(this.product); diff --git a/lib/pages/pharmacy/order/TrackDriver.dart b/lib/pages/pharmacy/order/TrackDriver.dart index 3b8779dd..587ba9a6 100644 --- a/lib/pages/pharmacy/order/TrackDriver.dart +++ b/lib/pages/pharmacy/order/TrackDriver.dart @@ -4,6 +4,7 @@ import 'dart:ui' as ui; import 'package:async/async.dart'; import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; import 'package:diplomaticquarterapp/locator.dart'; @@ -22,7 +23,7 @@ import 'package:location/location.dart'; import 'package:flutter_animarker/streams/lat_lng_stream.dart'; class TrackDriver extends StatefulWidget { - final OrderModel order; + final OrderDetailModel order; TrackDriver({this.order}); @override @@ -31,7 +32,7 @@ class TrackDriver extends StatefulWidget { class _TrackDriverState extends State { OrderPreviewService _orderServices = locator(); - OrderModel _order; + OrderDetailModel _order; Completer _controller = Completer(); diff --git a/lib/pages/pharmacy/profile/profile.dart b/lib/pages/pharmacy/profile/profile.dart index fb1e1c2a..cd5c6ec7 100644 --- a/lib/pages/pharmacy/profile/profile.dart +++ b/lib/pages/pharmacy/profile/profile.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/login/welcome.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/compare.dart'; @@ -14,20 +15,14 @@ import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-con import 'package:diplomaticquarterapp/pages/pharmacies/wishlist.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; - -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; -import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/my_reviews.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/compare.dart'; dynamic languageID; @@ -47,8 +42,6 @@ class _ProfilePageState extends State { String lastName, mobileNo, identificationNo; int languageId; - _ProfilePageState({this.customerId}); - getLanguageID() async { languageID = await sharedPref.getString(APP_LANGUAGE); } @@ -76,7 +69,7 @@ class _ProfilePageState extends State { if (userData == null) { Navigator.push( context, - MaterialPageRoute(builder: (context) => WelcomeLogin()), + FadePage(page: WelcomeLogin()), ); } } @@ -94,7 +87,10 @@ class _ProfilePageState extends State { @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getOrder(customerId, page_id), + onModelReady: (model) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + model.getOrder(customerId, page_id); + }, builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).myAccount, isShowAppBar: false, @@ -119,22 +115,39 @@ class _ProfilePageState extends State { bottom: 10.0, ), child: LargeAvatar( - name: "profile", + name: user.firstName.toString(), url: '', ), ), - Text( - languageID == "ar" - ? user.firstNameN.toString() + - " " + - user.lastNameN.toString() - : user.firstName.toString() + - " " + - user.lastName.toString(), - style: TextStyle( - fontSize: 14.0, - fontWeight: FontWeight.bold), - ), + Column(children: [ + Row(children: [ + Text( + TranslationBase.of(context) + .welcome, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.bold, + color: Colors.grey), + ), + ]), + SizedBox( + height: 10, + ), + Row(children: [ + Text( + languageID == "ar" + ? user.firstNameN.toString() + + " " + + user.lastNameN.toString() + : user.firstName.toString() + + " " + + user.lastName.toString(), + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.bold), + ), + ]), + ]), ], ), ) @@ -164,8 +177,8 @@ class _ProfilePageState extends State { } Navigator.push( context, - MaterialPageRoute( - builder: (context) => OrderPage( + FadePage( + page: OrderPage( customerID: customerId))); }, child: Column( @@ -193,11 +206,8 @@ class _ProfilePageState extends State { Expanded( child: InkWell( onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - LakumMainPage())); + Navigator.push(context, + FadePage(page: LakumMainPage())); }, child: Column( children: [ @@ -226,7 +236,7 @@ class _ProfilePageState extends State { context, MaterialPageRoute( builder: (context) => - WishlistPage())); + WishlistPage(true))); }, child: Column( children: [ @@ -252,11 +262,8 @@ class _ProfilePageState extends State { Expanded( child: InkWell( onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - MyReviewsPage())); + Navigator.push(context, + FadePage(page: MyReviewsPage())); }, child: Column( children: [ @@ -316,9 +323,8 @@ class _ProfilePageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => - HomePrescriptionsPage())); + FadePage( + page: HomePrescriptionsPage())); }, child: Row( children: [ @@ -349,11 +355,8 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - ComparePage())); + Navigator.push(context, + FadePage(page: ComparePage())); }, child: Row( children: [ @@ -384,9 +387,8 @@ class _ProfilePageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => - HomePrescriptionsPage())); + FadePage( + page: HomePrescriptionsPage())); }, child: Row( children: [ @@ -418,10 +420,7 @@ class _ProfilePageState extends State { InkWell( onTap: () { Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - MyFamily())); + context, FadePage(page: MyFamily())); }, child: Row( children: [ @@ -453,9 +452,8 @@ class _ProfilePageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => - PharmacyAddressesPage())); + FadePage( + page: PharmacyAddressesPage())); }, child: Row( children: [ @@ -488,9 +486,8 @@ class _ProfilePageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => - PharmacyTermsConditions())); + FadePage( + page: PharmacyTermsConditions())); }, child: Row( children: [ @@ -523,14 +520,13 @@ class _ProfilePageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => - LakumTermsConditions( - this.identificationNo, - this.firstName, - this.lastName, - this.mobileNo, - this.languageId))); + FadePage( + page: LakumTermsConditions( + this.identificationNo, + this.firstName, + this.lastName, + this.mobileNo, + this.languageId))); }, child: Row( children: [ @@ -590,11 +586,8 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - LiveChatPage())); + Navigator.push(context, + FadePage(page: LiveChatPage())); }, child: Row( children: [ @@ -622,11 +615,8 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - FindUsPage())); + Navigator.push(context, + FadePage(page: FindUsPage())); }, child: Row( children: [ diff --git a/lib/pages/pharmacy_categorise.dart b/lib/pages/pharmacy_categorise.dart index f0062a1c..65886dc5 100644 --- a/lib/pages/pharmacy_categorise.dart +++ b/lib/pages/pharmacy_categorise.dart @@ -1,7 +1,6 @@ import 'dart:convert'; import 'package:barcode_scan_fix/barcode_scan.dart'; -import 'package:charts_flutter/flutter.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; @@ -11,8 +10,10 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; + import 'base/base_view.dart'; import 'final_products_page.dart'; @@ -29,7 +30,9 @@ class _PharmacyCategorisePageState extends State { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getCategorise(), - builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => AppScaffold( + builder: (BuildContext context, PharmacyCategoriseViewModel model, + Widget child) => + AppScaffold( isShowDecPage: false, baseViewModel: model, body: Column( @@ -57,7 +60,9 @@ class _PharmacyCategorisePageState extends State { child: Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: Texts( - projectViewModel.isArabic ? model.categorise[index].namen : model.categorise[index].name, + projectViewModel.isArabic + ? model.categorise[index].namen + : model.categorise[index].name, fontWeight: FontWeight.w600, ), ), @@ -65,8 +70,8 @@ class _PharmacyCategorisePageState extends State { onTap: () => { Navigator.push( context, - MaterialPageRoute( - builder: (context) => model.categorise[index].id != '12' + FadePage( + page: model.categorise[index].id != '12' ? ParentCategorisePage( id: model.categorise[index].id, titleName: model.categorise[index].name, @@ -86,7 +91,10 @@ class _PharmacyCategorisePageState extends State { height: 140, child: Column( children: [ - Divider(height: 2.0, thickness: 1.0, color: Colors.black12.withOpacity(0.14)), + Divider( + height: 2.0, + thickness: 1.0, + color: Colors.black12.withOpacity(0.14)), SizedBox( height: 10.0, ), @@ -96,18 +104,32 @@ class _PharmacyCategorisePageState extends State { child: Padding( padding: EdgeInsets.all(4.0), child: InkWell( - onTap: () {}, + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 4, + ), + ), + ); + }, child: Container( height: 50.0, width: 55.0, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5.0), - color: Colors.green.shade300.withOpacity(0.34), + color: + Colors.green.shade300.withOpacity(0.34), ), child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), + padding: + EdgeInsets.symmetric(horizontal: 10.0), child: Texts( - projectViewModel.isArabic ? 'الاكثر مبيعا' : 'Best Sellers', + projectViewModel.isArabic + ? 'الاكثر مبيعا' + : 'Best Sellers', fontWeight: FontWeight.w600, ), ), @@ -122,13 +144,16 @@ class _PharmacyCategorisePageState extends State { height: 50.0, width: 55.0, decoration: BoxDecoration( - color: Colors.orangeAccent.shade200.withOpacity(0.34), + color: Colors.orangeAccent.shade200 + .withOpacity(0.34), borderRadius: BorderRadius.circular(5.0), ), child: Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: Texts( - projectViewModel.isArabic ? 'الاكثر مشاهدة' : 'Most Viewed', + projectViewModel.isArabic + ? 'الاكثر مشاهدة' + : 'Most Viewed', fontWeight: FontWeight.w600, ), ), @@ -152,7 +177,9 @@ class _PharmacyCategorisePageState extends State { child: Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: Texts( - projectViewModel.isArabic ? 'منتجات جديدة' : 'New Products', + projectViewModel.isArabic + ? 'منتجات جديدة' + : 'New Products', fontWeight: FontWeight.w600, ), ), @@ -164,19 +191,31 @@ class _PharmacyCategorisePageState extends State { padding: EdgeInsets.all(4.0), child: InkWell( onTap: () { - _scanQrAndGetPatient(context, model); + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 3, + ), + ), + ); }, child: Container( height: 50.0, width: 55.0, decoration: BoxDecoration( - color: Colors.purple.shade200.withOpacity(0.34), + color: + Colors.purple.shade200.withOpacity(0.34), borderRadius: BorderRadius.circular(5.0), ), child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), + padding: + EdgeInsets.symmetric(horizontal: 10.0), child: Texts( - projectViewModel.isArabic ? 'شوهد مؤخرا' : 'Recently Viewed', + projectViewModel.isArabic + ? 'شوهد مؤخرا' + : 'Recently Viewed', fontWeight: FontWeight.w600, ), ), @@ -214,7 +253,7 @@ class _PharmacyCategorisePageState extends State { { Navigator.push( context, - MaterialPageRoute(builder: (context) => LandingPagePharmacy()), + FadePage(page: LandingPagePharmacy()), ); } } diff --git a/lib/pages/search_products_page.dart b/lib/pages/search_products_page.dart index 45cafd35..73b17558 100644 --- a/lib/pages/search_products_page.dart +++ b/lib/pages/search_products_page.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product-brands.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -8,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'base/base_view.dart'; @@ -45,13 +48,13 @@ class _SearchProductsPageState extends State { child: Row( children: [ Container( - width: MediaQuery.of(context).size.width * 0.79, + width: MediaQuery.of(context).size.width * 0.70, child: Form( key: _formKey, child: TextFields( autoFocus: true, hintText: 'Search', - fontSize: 19.0, + fontSize: 14.5, prefixIcon: Icon(Icons.search), inputAction: TextInputAction.search, onSaved: (value) { @@ -102,170 +105,192 @@ class _SearchProductsPageState extends State { child: NetworkBaseView( baseViewModel: model, child: model.searchList.isNotEmpty - ? Container( - height: MediaQuery.of(context).size.height * 0.80, - child: GridView.builder( - //physics: NeverScrollableScrollPhysics(), - gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - crossAxisSpacing: 0.5, - mainAxisSpacing: 2.0, - childAspectRatio: 1.0, - ), - itemCount: model.searchList.length, - itemBuilder: (BuildContext context, int index) { - return Card( - color: model.searchList[index].discountName != - null - ? Color(0xffFFFF00) - : Colors.white, - elevation: 0, - shape: Border( - right: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - left: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - bottom: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - top: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - ), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(110.0), + ? InkWell( + child: Container( + height: MediaQuery.of(context).size.height * 0.80, + child: GridView.builder( + //physics: NeverScrollableScrollPhysics(), + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 1.0, + ), + itemCount: model.searchList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: Card( + color: model.searchList[index] + .discountName != + null + ? Color(0xffFFFF00) + : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), ), - color: Colors.white, - ), - padding: - EdgeInsets.symmetric(horizontal: 0), - width: - MediaQuery.of(context).size.width / 3, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Stack( + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, + ), + padding: + EdgeInsets.symmetric(horizontal: 0), + width: + MediaQuery.of(context).size.width / + 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - Container( - margin: EdgeInsets.fromLTRB( - 0, 16, 0, 0), - alignment: Alignment.center, - child: Image.network( - model.searchList[index].images - .isNotEmpty - ? model.searchList[index] - .images[0].thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.cover, - height: 80, - ), + Stack( + children: [ + Container( + margin: EdgeInsets.fromLTRB( + 0, 16, 0, 0), + alignment: Alignment.center, + child: Image.network( + model.searchList[index] + .images.isNotEmpty + ? model + .searchList[index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: model.searchList[index] + .rxMessage != + null + ? MediaQuery.of(context) + .size + .width / + 5 + : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: + Radius.circular( + 6)), + ), + child: Texts( + model.searchList[index] + .rxMessage != + null + ? model + .searchList[index] + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ), + ), + ], ), Container( - width: model.searchList[index] - .rxMessage != - null - ? MediaQuery.of(context) - .size - .width / - 5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: BorderRadius.only( - topLeft: - Radius.circular(6)), + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, ), - child: Texts( - model.searchList[index] - .rxMessage != - null - ? model.searchList[index] - .rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: FontWeight.w400, - ), - ), - ], - ), - Container( - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Texts( - model.searchList[index].name, - regular: true, - fontSize: 12, - fontWeight: FontWeight.w400, - ), - Padding( - padding: const EdgeInsets.only( - top: 4, bottom: 4), - child: Texts( - "SAR ${model.searchList[index].price}", - bold: true, - fontSize: 14, - ), - ), - Row( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - StarRating( - totalAverage: model - .searchList[ - index] - .approvedRatingSum > - 0 - ? (model - .searchList[ - index] - .approvedRatingSum - .toDouble() / - model - .searchList[ - index] - .approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: true), Texts( - "(${model.searchList[index].approvedTotalReviews})", + model + .searchList[index].name, regular: true, - fontSize: 10, + fontSize: 12, fontWeight: FontWeight.w400, - ) + ), + Padding( + padding: + const EdgeInsets.only( + top: 4, bottom: 4), + child: Texts( + "SAR ${model.searchList[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: model + .searchList[ + index] + .approvedRatingSum > + 0 + ? (model + .searchList[ + index] + .approvedRatingSum + .toDouble() / + model + .searchList[ + index] + .approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${model.searchList[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ) + ], + ), ], ), - ], - ), + ), + ], ), - ], + ), ), - ), - ); - }, + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage( + model.searchList[index]), + )), + }, + ); + }, + ), ), ) : Texts(msg), diff --git a/lib/pages/settings/general_setting.dart b/lib/pages/settings/general_setting.dart index 7085150a..0a6b0e73 100644 --- a/lib/pages/settings/general_setting.dart +++ b/lib/pages/settings/general_setting.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart'; @@ -20,10 +21,10 @@ class _GeneralSettings extends State with TickerProviderStateMixin { var themeNotifier; int blindValue = 0; - bool vibration =false; - bool accsibility =false; - bool camera =false; - bool location =false; + bool vibration = false; + bool accsibility = false; + bool camera = false; + bool location = false; var sharedPref = new AppSharedPreferences(); var permission = new PermissionService(); var mediaQueryData; @@ -33,22 +34,21 @@ class _GeneralSettings extends State super.initState(); } - Widget build(BuildContext context) { - mediaQueryData = MediaQuery.of(context); - themeNotifier = Provider.of(context); + mediaQueryData = MediaQuery.of(context); + themeNotifier = Provider.of(context); return Container( child: ListView(scrollDirection: Axis.vertical, children: [ Container( + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(10), child: AppText( TranslationBase.of(context).modes, - color: Colors.black, fontWeight: FontWeight.bold, ), ), Container( - color: Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -59,7 +59,6 @@ class _GeneralSettings extends State onChanged: (value) { setState(() { vibration = value; - }); setVibration(value); }, @@ -69,7 +68,7 @@ class _GeneralSettings extends State ], )), Container( - color: Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -81,7 +80,7 @@ class _GeneralSettings extends State setState(() { accsibility = value; }); - //setAccisibility(value); + //setAccisibility(value); }, activeTrackColor: Colors.lightGreenAccent, activeColor: Colors.green, @@ -89,15 +88,15 @@ class _GeneralSettings extends State ], )), Container( + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(10), child: AppText( TranslationBase.of(context).blindMode, - color: Colors.black, fontWeight: FontWeight.bold, ), ), new Container( - color: Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(8.0), child: new Column( mainAxisAlignment: MainAxisAlignment.center, @@ -180,15 +179,15 @@ class _GeneralSettings extends State ) ])), Container( + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(10), child: AppText( TranslationBase.of(context).permissions, - color: Colors.black, fontWeight: FontWeight.bold, ), ), Container( - color: Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -207,7 +206,7 @@ class _GeneralSettings extends State ], )), Container( - color: Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -228,7 +227,7 @@ class _GeneralSettings extends State ])); } - setTheme(value) async{ + setTheme(value) async { switch (value) { case 0: { @@ -238,45 +237,9 @@ class _GeneralSettings extends State break; case 1: { - themeNotifier.setTheme(ThemeData( - fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans', - primarySwatch: Colors.grey, - visualDensity: VisualDensity.adaptivePlatformDensity, - brightness: Brightness.light, - pageTransitionsTheme: const PageTransitionsTheme( - builders: { - TargetPlatform.android: ZoomPageTransitionsBuilder(), - TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), - }, - ), - hintColor: Colors.grey[400], - cardColor: Colors.black, - buttonColor: Colors.grey[400], - disabledColor: Colors.grey[300], - errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Colors.grey, - textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), - textSelectionHandleColor: Colors.grey, - canvasColor: Colors.white, - backgroundColor: Colors.grey, - highlightColor: Colors.grey[100].withOpacity(0.4), - splashColor: Colors.transparent, - primaryColor: Colors.grey, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), - cursorColor: Colors.grey, - - iconTheme: IconThemeData(), - appBarTheme: AppBarTheme( - color: Colors.grey, - brightness: Brightness.dark, - elevation: 10.0, - actionsIconTheme: IconThemeData( - color: Colors.grey, - ), - ), - )); - Screen.setBrightness(1.0); + themeNotifier.setTheme(await getTheme(value)); } + break; case 2: themeNotifier.setTheme(await getTheme(value)); @@ -295,140 +258,45 @@ class _GeneralSettings extends State } break; } - //permission.setTheme(value); - + permission.setTheme(value); } - setVibration(value){ + + setVibration(value) { permission.setVibrationPermission(value); } - setAccisibility(){ - if(!accsibility){ + setAccisibility() { + if (!accsibility) {} + // permission.setVibrationPermission(value); + } + getValues() async { + if (permission.isThemeEnabled() != null) { + blindValue = + permission.isThemeEnabled() == null ? 0 : permission.isThemeEnabled(); + vibration = permission.isVibrationEnabled() == null + ? false + : permission.isVibrationEnabled(); + accsibility = mediaQueryData.accessibleNavigation; + setTheme(blindValue); } - // permission.setVibrationPermission(value); - } - getValues() async{ - blindValue= permission.isThemeEnabled() == null ? 0 : permission.isThemeEnabled(); - vibration = permission.isVibrationEnabled() ==null ? false : permission.isVibrationEnabled(); - accsibility =mediaQueryData.accessibleNavigation; } - getTheme(value) async{ - if(value ==1){ - return ThemeData( - fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans', - primarySwatch: Colors.grey, - visualDensity: VisualDensity.adaptivePlatformDensity, - brightness: Brightness.light, - pageTransitionsTheme: const PageTransitionsTheme( - builders: { - TargetPlatform.android: ZoomPageTransitionsBuilder(), - TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), - }, - ), - hintColor: Colors.grey[400], - cardColor: Colors.black, - buttonColor: Colors.grey[400], - disabledColor: Colors.grey[300], - errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Colors.grey, - textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), - textSelectionHandleColor: Colors.grey, - canvasColor: Colors.white, - backgroundColor: Colors.grey, - highlightColor: Colors.grey[100].withOpacity(0.4), - splashColor: Colors.transparent, - primaryColor: Colors.grey, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), - cursorColor: Colors.grey, - - iconTheme: IconThemeData(), - appBarTheme: AppBarTheme( - color: Colors.grey, - brightness: Brightness.dark, - elevation: 10.0, - actionsIconTheme: IconThemeData( - color: Colors.grey, - ), - ), - ); - - }else if(value ==3){ - return ThemeData( - fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans', - primarySwatch: Colors.grey, - visualDensity: VisualDensity.adaptivePlatformDensity, - brightness: Brightness.light, - pageTransitionsTheme: const PageTransitionsTheme( - builders: { - TargetPlatform.android: ZoomPageTransitionsBuilder(), - TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), - }, - ), - hintColor: Colors.grey[400], - cardColor: Colors.black, - buttonColor: Colors.grey[400], - disabledColor: Colors.grey[300], - errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Colors.grey, - textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), - textSelectionHandleColor: Colors.grey, - canvasColor: Colors.white, - backgroundColor: Colors.grey, - highlightColor: Colors.grey[100].withOpacity(0.4), - splashColor: Colors.transparent, - primaryColor: Colors.grey, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), - cursorColor: Colors.grey, - iconTheme: IconThemeData(), - appBarTheme: AppBarTheme( - color: Colors.black45, - brightness: Brightness.dark, - elevation: 10.0, - actionsIconTheme: IconThemeData( - color: Colors.grey, - ), - ), - ); - - }else { - return ThemeData( - fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans', - primarySwatch: Colors.blue, - visualDensity: VisualDensity.adaptivePlatformDensity, - brightness: Brightness.light, - pageTransitionsTheme: const PageTransitionsTheme( - builders: { - TargetPlatform.android: ZoomPageTransitionsBuilder(), - TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), - }, - ), - hintColor: Colors.grey[400], - disabledColor: Colors.grey[300], - errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Color(0xffEEEEEE), - textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), - textSelectionHandleColor: Colors.grey, - canvasColor: Colors.white, - backgroundColor: Colors.white, - highlightColor: Colors.grey[100].withOpacity(0.4), - splashColor: Colors.transparent, - primaryColor: Color(0xff40ACC9), - bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), - cursorColor: Colors.grey, - cardColor: Colors.white, - iconTheme: IconThemeData(), - appBarTheme: AppBarTheme( - color: Color(0xff40ACC9), - brightness: Brightness.dark, - elevation: 10.0, - actionsIconTheme: IconThemeData( - color: Color(0xff40ACC9), - ), - ), - ); - - } + getTheme(value) async { + if (value == 1) { + return invertThemes( + fontName: Provider.of(context, listen: false).isArabic ? 'Cairo' : 'WorkSans' + ); + } else if (value == 3) { + return bwThemes( + fontName: Provider.of(context, listen: false).isArabic ? 'Cairo' : 'WorkSans' + ); + } else { + return defaultTheme( + fontName: + Provider.of(context, listen: false).isArabic + ? 'Cairo' + : 'WorkSans'); + } } } diff --git a/lib/pages/settings/profile_setting.dart b/lib/pages/settings/profile_setting.dart index dcfdb8a8..833cdf2b 100644 --- a/lib/pages/settings/profile_setting.dart +++ b/lib/pages/settings/profile_setting.dart @@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:provider/provider.dart'; class ProfileSettings extends StatefulWidget { - @override _ProfileSettings createState() => _ProfileSettings(); } @@ -45,6 +44,7 @@ class _ProfileSettings extends State child: model.user != null ? ListView(scrollDirection: Axis.vertical, children: [ Container( + color: Theme.of(context).primaryColor, padding: EdgeInsets.all(15), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -74,7 +74,7 @@ class _ProfileSettings extends State padding: EdgeInsets.all(10), ), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only( top: 0, left: 10, right: 10, bottom: 0), child: Row( @@ -93,7 +93,7 @@ class _ProfileSettings extends State ], )), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only( top: 0, left: 10, right: 10, bottom: 0), child: Row( @@ -116,7 +116,7 @@ class _ProfileSettings extends State padding: EdgeInsets.all(10), ), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only( top: 0, left: 10, right: 10, bottom: 0), child: Row( @@ -136,7 +136,7 @@ class _ProfileSettings extends State ], )), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only( top: 0, left: 10, right: 10, bottom: 0), child: Row( @@ -160,7 +160,7 @@ class _ProfileSettings extends State padding: EdgeInsets.all(10), ), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only( top: 0, left: 10, right: 10, bottom: 0), child: Column( @@ -175,7 +175,7 @@ class _ProfileSettings extends State ], )), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only( top: 0, left: 10, right: 10, bottom: 0), child: Column( @@ -190,7 +190,7 @@ class _ProfileSettings extends State ], )), Container( - color: Colors.white, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only( top: 0, left: 10, right: 10, bottom: 0), child: Column( diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index 0c63b900..b578eb3f 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -21,7 +21,7 @@ class _Settings extends State with TickerProviderStateMixin { _tabController = new TabController(length: 2, vsync: this, initialIndex: widget.type); - if(widget.type==1){ + if (widget.type == 1) { _tabController.animateTo(1); } @@ -51,7 +51,8 @@ class _Settings extends State with TickerProviderStateMixin { controller: _tabController, ), title: Text(TranslationBase.of(context).settings, - style: TextStyle(color: Colors.white)), + style: + TextStyle(color: Theme.of(context).textTheme.bodyText2.color)), leading: Builder( builder: (BuildContext context) { return ArrowBack(); diff --git a/lib/pages/sub_categorise_page.dart b/lib/pages/sub_categorise_page.dart index 45c9fd6c..cc374b96 100644 --- a/lib/pages/sub_categorise_page.dart +++ b/lib/pages/sub_categorise_page.dart @@ -1,12 +1,14 @@ +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/entity_checkbox_list.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; import 'base/base_view.dart'; import 'final_products_page.dart'; @@ -17,6 +19,7 @@ class SubCategorisePage extends StatefulWidget { String parentId; SubCategorisePage({this.id, this.parentId, this.title}); + @override _SubCategorisePageState createState() => _SubCategorisePageState(id: id, title: title, parentId: parentId); @@ -28,7 +31,9 @@ class _SubCategorisePageState extends State { String id; String title; String parentId; + _SubCategorisePageState({this.title, this.parentId, this.id}); + String categoriseName = "Personal Care"; bool styleOne = true; bool styleTwo = false; @@ -37,8 +42,12 @@ class _SubCategorisePageState extends State { color: Colors.blue, size: 29.0, ); + List entityList = List(); + List entityListBrands = List(); @override Widget build(BuildContext context) { + TextEditingController minField = TextEditingController(); + TextEditingController maxField = TextEditingController(); return BaseView( onModelReady: (model) => model.getSubCategorise(i: id), builder: (BuildContext context, PharmacyCategoriseViewModel model, @@ -52,7 +61,6 @@ class _SubCategorisePageState extends State { baseViewModel: model, body: SingleChildScrollView( child: Container( - height: MediaQuery.of(context).size.height * 5.97, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -140,8 +148,8 @@ class _SubCategorisePageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => + FadePage( + page: FinalProductsPage( id: model .subCategorise[ @@ -228,9 +236,8 @@ class _SubCategorisePageState extends State { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => - FinalProductsPage( + FadePage( + page: FinalProductsPage( id: model.subCategorise[index].id, ), ), @@ -279,6 +286,7 @@ class _SubCategorisePageState extends State { return SingleChildScrollView( controller: scrollController, child: Container( + color: Colors.white, height: MediaQuery.of(context) .size .height * @@ -330,45 +338,34 @@ class _SubCategorisePageState extends State { title: Texts('Categorise'), children: [ - Container( - height: 350, - child: ListView - .builder( - controller: - scrollController, - scrollDirection: - Axis - .vertical, - shrinkWrap: - true, - itemCount: model - .categoriseParent - .length, - itemBuilder: - (BuildContext - context, - int index) { - return CheckboxListTile( - tristate: - true, - title: Texts(model - .categoriseParent[index] - .name), - controlAffinity: - ListTileControlAffinity.leading, - value: - checkedCategorise, - onChanged: - (bool - value) { - setState( - () { - checkedCategorise = - value; - }); - }, - ); - }), + ProcedureListWidget( + model: model, + masterList: model + .subCategorise, + removeHistory: + (item) { + setState(() { + entityList + .remove( + item); + }); + }, + addHistory: + (history) { + setState(() { + entityList.add( + history); + }); + }, + addSelectedHistories: + () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: + (master) => + isEntityListSelected( + master), ) ], ), @@ -379,45 +376,35 @@ class _SubCategorisePageState extends State { ExpansionTile( title: Texts('Brands'), children: [ - Container( - height: 350, - child: ListView - .builder( - scrollDirection: - Axis - .vertical, - shrinkWrap: - true, - itemCount: model - .brandsList - .length, - itemBuilder: - (BuildContext - context, - int index) { - return CheckboxListTile( - tristate: - true, - title: Texts(model - .brandsList[index] - .name), - controlAffinity: - ListTileControlAffinity.leading, - value: - checkedBrands, - onChanged: - (bool - value) { - setState( - () { - checkedBrands = - value; - }); - }, - autofocus: - true, - ); - }), + ProcedureListWidget( + model: model, + masterList: model + .brandsList, + removeHistory: + (item) { + setState(() { + entityListBrands + .remove( + item); + }); + }, + addHistory: + (history) { + setState(() { + entityListBrands + .add( + history); + }); + }, + addSelectedHistories: + () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: + (master) => + isEntityListSelectedBrands( + master), ) ], ), @@ -457,6 +444,8 @@ class _SubCategorisePageState extends State { border: OutlineInputBorder(), ), + controller: + minField, ), ), ], @@ -482,6 +471,8 @@ class _SubCategorisePageState extends State { border: OutlineInputBorder(), ), + controller: + maxField, ), ), ], @@ -524,6 +515,50 @@ class _SubCategorisePageState extends State { Container( width: 200, child: Button( + onTap: () { + String + categoriesId = + ""; + for (CategoriseParentModel category + in entityList) { + if (categoriesId == + "") { + categoriesId = + category + .id; + } else { + categoriesId = + "$categoriesId,${category.id}"; + } + } + String + brandIds = + ""; + for (CategoriseParentModel brand + in entityListBrands) { + if (brandIds == + "") { + brandIds = + brand + .id; + } else { + brandIds = + "$brandIds,${brand.id}"; + } + } + + model.getFilteredProducts( + min: minField + .text + .toString(), + max: maxField + .text + .toString(), + categoryId: + categoriesId, + brandId: + brandIds); + }, label: 'Apply', backgroundColor: Colors @@ -593,7 +628,9 @@ class _SubCategorisePageState extends State { ), styleOne == true ? Container( - height: MediaQuery.of(context).size.height * 3.85, + height: model.subProducts.length * + MediaQuery.of(context).size.height * + 0.15, child: GridView.builder( physics: NeverScrollableScrollPhysics(), gridDelegate: @@ -601,337 +638,386 @@ class _SubCategorisePageState extends State { crossAxisCount: 2, crossAxisSpacing: 0.5, mainAxisSpacing: 2.0, - childAspectRatio: 1.0, + childAspectRatio: 0.9, ), itemCount: model.subProducts.length, itemBuilder: (BuildContext context, int index) { return NetworkBaseView( baseViewModel: model, - child: Card( - color: model.subProducts[index] - .discountName != - null - ? Color(0xffFFFF00) - : Colors.white, - elevation: 0, - shape: Border( - right: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - left: BorderSide( - color: Colors.grey.shade300, - width: 1, - ), - bottom: BorderSide( - color: Colors.grey.shade300, - width: 1, + child: InkWell( + child: Card( + color: model.subProducts[index] + .discountName != + null + ? Color(0xffFFFF00) + : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), ), - top: BorderSide( - color: Colors.grey.shade300, - width: 1, + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, ), - ), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(110.0), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, ), - color: Colors.white, - ), - padding: EdgeInsets.symmetric( - horizontal: 0), - width: MediaQuery.of(context) - .size - .width / - 3, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Container( - margin: EdgeInsets.fromLTRB( - 0, 16, 0, 0), - alignment: Alignment.center, - child: Image.network( - model.subProducts[index] - .images.isNotEmpty - ? model - .subProducts[ - index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.cover, - height: 80, - ), - ), - Container( - width: model + padding: EdgeInsets.symmetric( + horizontal: 0), + width: MediaQuery.of(context) + .size + .width / + 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + margin: + EdgeInsets.fromLTRB( + 0, 16, 0, 0), + alignment: + Alignment.center, + child: Image.network( + model .subProducts[ index] - .rxMessage != - null - ? MediaQuery.of(context) - .size - .width / - 5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular(6)), + .images + .isNotEmpty + ? model + .subProducts[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), ), - child: Texts( - model.subProducts[index] + Container( + width: model + .subProducts[ + index] .rxMessage != null - ? model - .subProducts[ - index] - .rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ), - ), - ], - ), - Container( - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Texts( - model.subProducts[index] - .name, - regular: true, - fontSize: 12, - fontWeight: - FontWeight.w400, - ), - Padding( + ? MediaQuery.of( + context) + .size + .width / + 5 + : 0, padding: - const EdgeInsets.only( - top: 4, - bottom: 4), + EdgeInsets.all(4), + decoration: BoxDecoration( + color: + Color(0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular( + 6)), + ), child: Texts( - "SAR ${model.subProducts[index].price}", - bold: true, - fontSize: 14, + model.subProducts[index] + .rxMessage != + null + ? model + .subProducts[ + index] + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, ), ), - Row( - children: [ - StarRating( - totalAverage: model - .subProducts[ - index] - .approvedRatingSum > - 0 - ? (model.subProducts[index].approvedRatingSum - .toDouble() / - model - .subProducts[index] - .approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: true), - Texts( - "(${model.subProducts[index].approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ) - ], - ), ], ), - ), - ], + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Texts( + model.subProducts[index] + .name, + regular: true, + fontSize: 12, + fontWeight: + FontWeight.w400, + ), + Padding( + padding: + const EdgeInsets + .only( + top: 4, + bottom: 4), + child: Texts( + "SAR ${model.subProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: model + .subProducts[ + index] + .approvedRatingSum > + 0 + ? (model.subProducts[index].approvedRatingSum + .toDouble() / + model + .subProducts[index] + .approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${model.subProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ) + ], + ), + ], + ), + ), + ], + ), ), ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage( + model.subProducts[index]), + )), + }, )); }, ), ) : Container( - height: MediaQuery.of(context).size.height * 5.0, + height: model.subProducts.length * + MediaQuery.of(context).size.height * + 0.122, child: ListView.builder( physics: NeverScrollableScrollPhysics(), itemCount: model.subProducts.length, itemBuilder: (BuildContext context, int index) { - return Card( - child: Row( - children: [ - Stack( - children: [ - Column( - children: [ - Container( - decoration: BoxDecoration(), - child: Padding( - padding: EdgeInsets.only( - left: 9.0, - top: 8.0, - right: 10.0, + return InkWell( + child: Card( + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + Container( + decoration: + BoxDecoration(), + child: Padding( + padding: + EdgeInsets.only( + left: 9.0, + top: 8.0, + right: 10.0, + ), ), ), - ), - Container( - margin: EdgeInsets.fromLTRB( - 0, 0, 0, 0), - alignment: Alignment.center, - child: Image.network( - model.subProducts[index] - .images.isNotEmpty - ? model - .subProducts[ - index] - .images[0] - .thumb - : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', - fit: BoxFit.contain, - height: 80, + Container( + margin: + EdgeInsets.fromLTRB( + 0, 0, 0, 0), + alignment: + Alignment.center, + child: Image.network( + model + .subProducts[ + index] + .images + .isNotEmpty + ? model + .subProducts[ + index] + .images[0] + .thumb + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.contain, + height: 80, + ), ), - ), - ], + ], + ), + Column( + children: [ + Container( + width: model + .subProducts[ + index] + .rxMessage != + null + ? MediaQuery.of( + context) + .size + .width / + 5 + : 0, + padding: + EdgeInsets.all(4), + decoration: BoxDecoration( + color: + Color(0xffb23838), + borderRadius: + BorderRadius.only( + topLeft: Radius + .circular( + 6)), + ), + child: Texts( + model.subProducts[index] + .rxMessage != + null + ? model + .subProducts[ + index] + .rxMessage + : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ), + ), + ], + ), + ], + ), + Container( + height: 100.0, + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, ), - Column( + child: Column( + mainAxisAlignment: + MainAxisAlignment + .spaceAround, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ + SizedBox( + height: 4.0, + ), Container( - width: model - .subProducts[ - index] - .rxMessage != - null - ? MediaQuery.of(context) + width: + MediaQuery.of(context) .size - .width / - 5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: - BorderRadius.only( - topLeft: Radius - .circular(6)), - ), + .width * + 0.65, child: Texts( model.subProducts[index] - .rxMessage != - null - ? model - .subProducts[ - index] - .rxMessage - : "", - color: Colors.white, + .name, regular: true, - fontSize: 10, + fontSize: 13.2, fontWeight: - FontWeight.w400, + FontWeight.w500, + maxLines: 5, ), ), - ], - ), - ], - ), - Container( - height: 100.0, - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - SizedBox( - height: 4.0, - ), - Container( - height: 35.0, - width: 250.0, - child: Texts( - model.subProducts[index] - .name, - regular: true, - fontSize: 13.2, - fontWeight: FontWeight.w500, - maxLines: 2, + SizedBox( + height: 8.0, ), - ), - SizedBox( - height: 8.0, - ), - Padding( - padding: - const EdgeInsets.only( - top: 4, bottom: 4), - child: Texts( - "SAR ${model.subProducts[index].price}", - bold: true, - fontSize: 14, + Padding( + padding: + const EdgeInsets.only( + top: 4, bottom: 4), + child: Texts( + "SAR ${model.subProducts[index].price}", + bold: true, + fontSize: 14, + ), ), - ), - Row( - children: [ - StarRating( - totalAverage: model - .subProducts[ - index] - .approvedRatingSum > - 0 - ? (model - .subProducts[ - index] - .approvedRatingSum - .toDouble() / - model - .parentProducts[ - index] - .approvedRatingSum - .toDouble()) - .toDouble() - : 0, - forceStars: true), - Texts( - "(${model.subProducts[index].approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: - FontWeight.w400, - ) - ], - ), - ], + Row( + children: [ + StarRating( + totalAverage: model + .subProducts[ + index] + .approvedRatingSum > + 0 + ? (model + .subProducts[ + index] + .approvedRatingSum + .toDouble() / + model + .parentProducts[ + index] + .approvedRatingSum + .toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${model.subProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: + FontWeight.w400, + ) + ], + ), + ], + ), ), - ), - ], + ], + ), ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage( + model.subProducts[index]), + )), + }, ); }), ) @@ -941,4 +1027,22 @@ class _SubCategorisePageState extends State { ), )); } + + bool isEntityListSelected(CategoriseParentModel masterKey) { + Iterable history = + entityList.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } + + bool isEntityListSelectedBrands(CategoriseParentModel masterKey) { + Iterable history = + entityListBrands.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } } diff --git a/lib/pages/weather-indicator/health-indicator.dart b/lib/pages/weather-indicator/health-indicator.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/routes.dart b/lib/routes.dart index 51aaccfe..738a00e9 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,6 +1,8 @@ +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/add-family-member.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/add-family_type.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; @@ -42,6 +44,8 @@ const String PACKAGES_OFFERS = 'packages-offers'; const String PACKAGES_OFFERS_CART = 'packages-offers-cart'; const String PACKAGES_ORDER_COMPLETED = 'packages-offers-cart'; +const String HEALTH_WEATHER = 'health-weather'; +const APP_UPDATE = 'app-update'; var routes = { SPLASH: (_) => SplashScreen(), HOME: (_) => LandingPage(), @@ -63,4 +67,7 @@ var routes = { PACKAGES_OFFERS: (_) => PackagesHomePage(), PACKAGES_OFFERS_CART: (_) => PackagesCartPage(), PACKAGES_ORDER_COMPLETED: (_) => PackageOrderCompletedPage(), + HEALTH_WEATHER: (_) => HealthWeatherIndicator(), + APP_UPDATE: (_) => AppUpdatePage(), + SETTINGS: (_) => Settings(), }; diff --git a/lib/services/pharmacy_services/cancelOrder_service.dart b/lib/services/pharmacy_services/cancelOrder_service.dart index f848c2ff..3804b19b 100644 --- a/lib/services/pharmacy_services/cancelOrder_service.dart +++ b/lib/services/pharmacy_services/cancelOrder_service.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; @@ -16,8 +17,8 @@ class CancelOrderService extends BaseService{ AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); - List _cancelOrderList = List(); - List get cancelOrderList => _cancelOrderList; + List _cancelOrderList = List(); + List get cancelOrderList => _cancelOrderList; String url =""; diff --git a/lib/services/pharmacy_services/orderDetails_service.dart b/lib/services/pharmacy_services/orderDetails_service.dart index b8ea8214..4178c50a 100644 --- a/lib/services/pharmacy_services/orderDetails_service.dart +++ b/lib/services/pharmacy_services/orderDetails_service.dart @@ -1,12 +1,13 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:flutter/material.dart'; class OrderDetailsService extends BaseService{ @@ -16,10 +17,8 @@ class OrderDetailsService extends BaseService{ AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); -// String url =""; -// List get orderDetails => ordeDetails; - List _orderList = List(); - List get orderList => _orderList; + List _orderList = List(); + List get orderList => _orderList; Future getOrderDetails(OrderId) async { @@ -28,7 +27,7 @@ class OrderDetailsService extends BaseService{ onSuccess: (dynamic response, int statusCode) { _orderList.clear(); response['orders'].forEach((item) { - _orderList.add(OrderModel.fromJson(item)); + _orderList.add(OrderDetailModel.fromJson(item)); print(response); }); }, onFailure: (String error, int statusCode) { @@ -37,7 +36,7 @@ class OrderDetailsService extends BaseService{ }); } - Future makeReview(Product product, double rating, String reviewText) async { + Future makeReview(PharmacyProduct product, double rating, String reviewText) async { hasError = false; super.error = ""; diff --git a/lib/services/pharmacy_services/product_detail_service.dart b/lib/services/pharmacy_services/product_detail_service.dart index e3e8403e..f85faf2c 100644 --- a/lib/services/pharmacy_services/product_detail_service.dart +++ b/lib/services/pharmacy_services/product_detail_service.dart @@ -88,7 +88,7 @@ class ProductDetailService extends BaseService { "language_id": 1 } }; - await baseAppClient.post(GET_SHOPPING_CART, + await baseAppClient.pharmacyPost(GET_SHOPPING_CART, isExternal: false, onSuccess: (dynamic response, int statusCode) { _addToCartModel.clear(); response['shopping_carts'].forEach((item) { @@ -121,7 +121,7 @@ class ProductDetailService extends BaseService { request = { "shopping_cart_item": {"quantity": 1, "shopping_cart_type": "Wishlist", "product_id": itemID, "customer_id": customerId, "language_id": 1} }; - await baseAppClient.post(GET_SHOPPING_CART, + await baseAppClient.pharmacyPost(GET_SHOPPING_CART, onSuccess: (dynamic response, int statusCode) { _wishListProducts.clear(); response['shopping_carts'].forEach((item) { @@ -172,6 +172,7 @@ class ProductDetailService extends BaseService { _productSpecification.clear(); response['specification'].forEach((item) { _productSpecification.add(SpecificationModel.fromJson(item)); + print(_productSpecification); }); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/services/pharmacy_services/recommendedProduct_service.dart b/lib/services/pharmacy_services/recommendedProduct_service.dart new file mode 100644 index 00000000..ad7222f8 --- /dev/null +++ b/lib/services/pharmacy_services/recommendedProduct_service.dart @@ -0,0 +1,40 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + + + + +class RecommendedProductService extends BaseService{ + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + List _recommendedProductList = List(); + List get recommendedList => _recommendedProductList; + String url =""; + + Future getRecommendedProducts(productId) async { + hasError = false; + url =GET_RECOMMENDED_PRODUCT+productId; + await baseAppClient.getPharmacy(url, + onSuccess: (dynamic response, int statusCode) { + _recommendedProductList.clear(); + response['products'].forEach((item) { + _recommendedProductList.add(Products.fromJson(item)); + print("----------------------------------"); + print("Test data"); + print(_recommendedProductList[0]); + print(item['name']); + print(response); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + }} \ No newline at end of file diff --git a/lib/splashPage.dart b/lib/splashPage.dart index 20da2ba6..ef5db7f5 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -31,15 +31,14 @@ class _SplashScreenState extends State { super.initState(); Timer( Duration(seconds: 1, milliseconds: 500), - () { - loadPrivilege().then((value) { - Navigator.of(context).pushReplacement( - MaterialPageRoute( - builder: (BuildContext context) => LandingPage(), - ), - ); - }); - + () { + loadPrivilege().then((value) { + Navigator.of(context).pushReplacement( + MaterialPageRoute( + builder: (BuildContext context) => LandingPage(), + ), + ); + }); }, ); } @@ -47,14 +46,19 @@ class _SplashScreenState extends State { /// load the Privilege from service Future loadPrivilege() async { await _privilegeService.getPrivilege(); - Provider.of(context, listen: false).setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); + Provider.of(context, listen: false) + .setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - body: Image.asset('assets/images/powerd-by.jpg',fit: BoxFit.fitWidth,width: MediaQuery.of(context).size.width,), + body: Image.asset( + 'assets/images/powerd-by.jpg', + fit: BoxFit.fitWidth, + width: MediaQuery.of(context).size.width, + ), ); } } diff --git a/lib/theme/colors.dart b/lib/theme/colors.dart new file mode 100644 index 00000000..893449f1 --- /dev/null +++ b/lib/theme/colors.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +class CustomColors { + static const Color lightPurple = Color(0xFFBB86FA); + static const Color purple = Color(0xFF6002EE); + static const Color deepPurple = Color(0xFF3900B1); + static const Color grey = Color(0xFF848484); + static const Color darkGrey = Color(0xFF222222); + static const Color black = Color(0xFF141414); + static const Color white = Color(0xFFFFFFFF); +} diff --git a/lib/theme/config.dart b/lib/theme/config.dart new file mode 100644 index 00000000..4c321fb8 --- /dev/null +++ b/lib/theme/config.dart @@ -0,0 +1,3 @@ +// import 'package:diplomaticquarterapp/theme/custom_theme.dart'; + +// CustomTheme currentTheme = CustomTheme(); diff --git a/lib/theme/custom_theme.dart b/lib/theme/custom_theme.dart new file mode 100644 index 00000000..8361ec4e --- /dev/null +++ b/lib/theme/custom_theme.dart @@ -0,0 +1,89 @@ +// import 'package:diplomaticquarterapp/Constants.dart'; +// import 'package:flutter/material.dart'; +// import 'package:hexcolor/hexcolor.dart'; + +// import 'colors.dart'; + +// class CustomTheme with ChangeNotifier { +// static bool _isDarkTheme = true; +// ThemeMode get currentTheme => +// _isDarkTheme ? ThemeMode.dark : ThemeMode.system; + +// void toggleTheme() { +// _isDarkTheme = !_isDarkTheme; +// notifyListeners(); +// } + +// static ThemeData get lightTheme { +// //1 +// return ThemeData( +// //2 +// primaryColor: CustomColors.purple, +// scaffoldBackgroundColor: Colors.white, +// fontFamily: 'Montserrat', //3 +// buttonTheme: ButtonThemeData( +// // 4 +// shape: +// RoundedRectangleBorder(borderRadius: BorderRadius.circular(18.0)), +// buttonColor: CustomColors.lightPurple, +// )); +// } + +// static ThemeData get darkTheme { +// return ThemeData( +// primaryColor: CustomColors.darkGrey, +// scaffoldBackgroundColor: Colors.black, +// fontFamily: 'Montserrat', +// textTheme: ThemeData.dark().textTheme, +// buttonTheme: ButtonThemeData( +// shape: +// RoundedRectangleBorder(borderRadius: BorderRadius.circular(18.0)), +// buttonColor: CustomColors.lightPurple, +// )); +// } + +// static ThemeData get defaultTheme { +// return ThemeData( +// // fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', +// primarySwatch: Colors.blue, +// visualDensity: VisualDensity.adaptivePlatformDensity, +// brightness: Brightness.light, +// pageTransitionsTheme: const PageTransitionsTheme( +// builders: { +// TargetPlatform.android: ZoomPageTransitionsBuilder(), +// TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), +// }, +// ), +// hintColor: Colors.grey[400], +// textTheme: TextTheme( +// headline1: TextStyle( +// color: Color(0xffB8382C), +// ), +// ), +// disabledColor: Colors.grey[300], +// errorColor: Color.fromRGBO(235, 80, 60, 1.0), +// scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100], +// textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), +// textSelectionHandleColor: Colors.grey, +// canvasColor: Colors.white, +// backgroundColor: Color.fromRGBO(255, 255, 255, 1), +// highlightColor: Colors.grey[100].withOpacity(0.4), +// splashColor: Colors.transparent, +// primaryColor: Color(0xff515A5D), +// toggleableActiveColor: secondaryColor, +// indicatorColor: secondaryColor, +// bottomSheetTheme: +// BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), +// cursorColor: Colors.grey, +// iconTheme: IconThemeData(), +// appBarTheme: AppBarTheme( +// color: Color(0xff515A5D), +// brightness: Brightness.light, +// elevation: 0.0, +// actionsIconTheme: IconThemeData( +// color: Colors.grey[800], +// ), +// ), +// ); +// } +// } diff --git a/lib/theme/theme_notifier.dart b/lib/theme/theme_notifier.dart index e414d159..e61c73a6 100644 --- a/lib/theme/theme_notifier.dart +++ b/lib/theme/theme_notifier.dart @@ -1,15 +1,20 @@ -import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; class ThemeNotifier with ChangeNotifier { - ThemeData _themeData = defaultTheme; + ThemeData _themeData; + ThemeNotifier(this._themeData); + getTheme() => _themeData; + getTheme_(String font) => _themeData; + setTheme(ThemeData themeData) async { _themeData = themeData; - notifyListeners(); } } diff --git a/lib/theme/theme_value.dart b/lib/theme/theme_value.dart index d19e13b2..65d6f81d 100644 --- a/lib/theme/theme_value.dart +++ b/lib/theme/theme_value.dart @@ -1,9 +1,8 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/Constants.dart'; import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; /// ---- Default Theme ---- @@ -13,11 +12,11 @@ import 'package:provider/provider.dart'; final bluePrimary = Color(0xFF3F51B5); final blueAccent = Color(0xFFFF9800); final blueBackground = Color(0xFFFFFFFF); +defaultTheme({fontName}) { + return ThemeData( + fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', -// ProjectViewModel projectProvider = Provider.of(AppGlobal.context); - final bwTheme = ThemeData( - //fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', - primarySwatch: Colors.grey, + primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, brightness: Brightness.light, pageTransitionsTheme: const PageTransitionsTheme( @@ -27,37 +26,96 @@ final blueBackground = Color(0xFFFFFFFF); }, ), hintColor: Colors.grey[400], - cardColor: Colors.black, - buttonColor: Colors.grey[400], disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Colors.grey, + scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100], textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.white, - backgroundColor: Colors.grey, + backgroundColor: Color.fromRGBO(255, 255, 255, 1), highlightColor: Colors.grey[100].withOpacity(0.4), splashColor: Colors.transparent, - primaryColor: Colors.grey, - bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), + primaryColor: Color(0xff515A5D), + buttonColor: Colors.black, + toggleableActiveColor: secondaryColor, + indicatorColor: secondaryColor, + bottomSheetTheme: + BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), cursorColor: Colors.grey, + primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)), + iconTheme: IconThemeData(), + textTheme: TextTheme( + bodyText1: TextStyle(color: Colors.black), + headline1: TextStyle(color: Colors.white), + headline2: TextStyle(color: Colors.white)), + floatingActionButtonTheme: FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), + appBarTheme: AppBarTheme( + color: Color(0xff515A5D), + brightness: Brightness.light, + elevation: 0.0, + actionsIconTheme: IconThemeData( + color: Colors.grey[800], + ), + ), + ); +} + +invertThemes({fontName}) { + return ThemeData( + fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + primarySwatch: Colors.blue, + + visualDensity: VisualDensity.adaptivePlatformDensity, + brightness: Brightness.dark, + pageTransitionsTheme: const PageTransitionsTheme( + builders: { + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), + hintColor: Colors.grey[400], + textTheme: TextTheme( + bodyText1: TextStyle(color: Colors.white), + headline1: TextStyle(color: Colors.white), + headline2: TextStyle(color: Colors.white)), + disabledColor: Colors.grey[800], + errorColor: Color.fromRGBO(235, 80, 60, 1.0), + scaffoldBackgroundColor: Color(0xff000000), // Colors.grey[100], + textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), + textSelectionHandleColor: Colors.grey, + canvasColor: Colors.black, + backgroundColor: Color.fromRGBO(255, 255, 255, 1), + highlightColor: Colors.grey[100].withOpacity(0.4), + splashColor: Colors.transparent, + primaryColor: Color(0xff515A5D), + buttonColor: Colors.black, + toggleableActiveColor: secondaryColor, + indicatorColor: secondaryColor, + bottomSheetTheme: + BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + cursorColor: Colors.black, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( - color: Colors.black45, + color: Color(0xff000000), brightness: Brightness.dark, - elevation: 10.0, + elevation: 0.0, actionsIconTheme: IconThemeData( - color: Colors.grey, + color: Colors.grey[800], ), ), ); +} - final defaultTheme = ThemeData( - //fontFamily: ProjectViewModel().isArabic? 'Cairo' : 'WorkSans', +bwThemes({fontName}) { + return ThemeData( + fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', primarySwatch: Colors.blue, + visualDensity: VisualDensity.adaptivePlatformDensity, - brightness: Brightness.light, + brightness: Brightness.dark, + unselectedWidgetColor: Colors.red, + pageTransitionsTheme: const PageTransitionsTheme( builders: { TargetPlatform.android: ZoomPageTransitionsBuilder(), @@ -65,35 +123,51 @@ final blueBackground = Color(0xFFFFFFFF); }, ), hintColor: Colors.grey[400], - disabledColor: Colors.grey[300], + + textTheme: TextTheme( + bodyText1: TextStyle(color: Colors.red[900]), + headline1: TextStyle(color: Colors.red[900]), + headline2: TextStyle(color: Colors.white), + bodyText2: TextStyle(color: Colors.red[900]), + subtitle1: TextStyle(color: Colors.red[900]), + ), + + tabBarTheme: TabBarTheme(labelColor: Colors.red[900]), + + disabledColor: Colors.grey[800], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Color(0xffEEEEEE), + scaffoldBackgroundColor: Color(0xffffffe4), // Colors.grey[100], textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, - canvasColor: Colors.white, - backgroundColor: Colors.white, + canvasColor: Colors.black, + backgroundColor: Color(0xffffffe4), highlightColor: Colors.grey[100].withOpacity(0.4), splashColor: Colors.transparent, - primaryColor: Color(0xff40ACC9), - bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), - cursorColor: Colors.grey, - cardColor: Colors.white, + primaryColor: Color(0xfffffff4), + toggleableActiveColor: secondaryColor, + indicatorColor: secondaryColor, + bottomSheetTheme: + BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), + cursorColor: Colors.black, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( - color: Color(0xff40ACC9), + color: Color(0xffffffe4), brightness: Brightness.dark, - elevation: 10.0, + elevation: 0.0, actionsIconTheme: IconThemeData( - color: Color(0xff40ACC9), + color: Colors.grey[800], ), ), ); +} - final invertTheme = ThemeData( - //fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', - primarySwatch: Colors.grey, +dimTheme({fontName}) { + return ThemeData( + fontFamily: fontName, //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, - brightness: Brightness.light, + brightness: Brightness.dark, + pageTransitionsTheme: const PageTransitionsTheme( builders: { TargetPlatform.android: ZoomPageTransitionsBuilder(), @@ -101,29 +175,26 @@ final blueBackground = Color(0xFFFFFFFF); }, ), hintColor: Colors.grey[400], - cardColor: Colors.black, - buttonColor: Colors.grey[400], disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Colors.grey, + scaffoldBackgroundColor: Color(0xffEEEEEE), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.white, - backgroundColor: Colors.grey, + backgroundColor: Color.fromRGBO(255, 255, 255, 1), highlightColor: Colors.grey[100].withOpacity(0.4), splashColor: Colors.transparent, - primaryColor: Colors.grey, + primaryColor: Color(0xff40ACC9), bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), cursorColor: Colors.grey, - iconTheme: IconThemeData(), appBarTheme: AppBarTheme( - color: Colors.grey, + color: Color(0xff40ACC9), brightness: Brightness.dark, elevation: 10.0, actionsIconTheme: IconThemeData( - color: Colors.grey, + color: Color(0xff40ACC9), ), ), ); - +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 97399f31..9f411667 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -18,7 +18,8 @@ class TranslationBase { return localizedValues[key][locale.languageCode]; } - String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + String get dashboardScreenToolbarTitle => + localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode]; @@ -58,9 +59,11 @@ class TranslationBase { String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode]; - String get searchByDocText => localizedValues['searchByDocText'][locale.languageCode]; + String get searchByDocText => + localizedValues['searchByDocText'][locale.languageCode]; - String get enterDocName => localizedValues['enterDocName'][locale.languageCode]; + String get enterDocName => + localizedValues['enterDocName'][locale.languageCode]; String get search => localizedValues['search'][locale.languageCode]; @@ -70,33 +73,41 @@ class TranslationBase { String get appoInfo => localizedValues['appoInfo'][locale.languageCode]; - String get availableAppo => localizedValues['availableAppo'][locale.languageCode]; + String get availableAppo => + localizedValues['availableAppo'][locale.languageCode]; String get gender => localizedValues['gender'][locale.languageCode]; String get nationality => localizedValues['nationality'][locale.languageCode]; - String get docQualifications => localizedValues['docQualifications'][locale.languageCode]; + String get docQualifications => + localizedValues['docQualifications'][locale.languageCode]; - String get confirmAppoHeading => localizedValues['confirmAppoHeading'][locale.languageCode]; + String get confirmAppoHeading => + localizedValues['confirmAppoHeading'][locale.languageCode]; String get patientInfo => localizedValues['patientInfo'][locale.languageCode]; String get bookSuccess => localizedValues['bookSuccess'][locale.languageCode]; - String get patientShare => localizedValues['patientShare'][locale.languageCode]; + String get patientShare => + localizedValues['patientShare'][locale.languageCode]; - String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode]; + String get patientShareWithTax => + localizedValues['patientShareWithTax'][locale.languageCode]; String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode]; String get confirm => localizedValues['confirm'][locale.languageCode]; - String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode]; + String get confirmLiveCare => + localizedValues['confirmLiveCare'][locale.languageCode]; - String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode]; + String get waitingForDoctor => + localizedValues['waitingForDoctor'][locale.languageCode]; - String get confirmLater => localizedValues['confirmLater'][locale.languageCode]; + String get confirmLater => + localizedValues['confirmLater'][locale.languageCode]; String get todoList => localizedValues['todoList'][locale.languageCode]; @@ -112,22 +123,27 @@ class TranslationBase { String get login => localizedValues['login'][locale.languageCode]; - String get loginregister => localizedValues['loginregister'][locale.languageCode]; + String get loginregister => + localizedValues['loginregister'][locale.languageCode]; String get poweredBy => localizedValues['poweredBy'][locale.languageCode]; String get welcome => localizedValues['welcome'][locale.languageCode]; - String get welcomeText => localizedValues['welcome_text'][locale.languageCode]; + String get welcomeText => + localizedValues['welcome_text'][locale.languageCode]; - String get welcomeText2 => localizedValues['welcome_text2'][locale.languageCode]; + String get welcomeText2 => + localizedValues['welcome_text2'][locale.languageCode]; String get yes => localizedValues['yes'][locale.languageCode]; String get no => localizedValues['no'][locale.languageCode]; - String get logintypeRadio => localizedValues['logintyperadio'][locale.languageCode]; - String get registerInfoFamily => localizedValues['register-info-family'][locale.languageCode]; + String get logintypeRadio => + localizedValues['logintyperadio'][locale.languageCode]; + String get registerInfoFamily => + localizedValues['register-info-family'][locale.languageCode]; String get registerNow => localizedValues['registernow'][locale.languageCode]; @@ -137,13 +153,17 @@ class TranslationBase { String get fileNo => localizedValues['fileNo'][locale.languageCode]; String get fileno => localizedValues['fileno'][locale.languageCode]; - String get forgotPassword => localizedValues['forgotFileNo'][locale.languageCode]; + String get forgotPassword => + localizedValues['forgotFileNo'][locale.languageCode]; - String get forgotFileNoTitle => localizedValues['forgotFileNoTitle'][locale.languageCode]; + String get forgotFileNoTitle => + localizedValues['forgotFileNoTitle'][locale.languageCode]; - String get enterNationalId => localizedValues['enter-national-id'][locale.languageCode]; + String get enterNationalId => + localizedValues['enter-national-id'][locale.languageCode]; - String get profileInfo => localizedValues['profile-info'][locale.languageCode]; + String get profileInfo => + localizedValues['profile-info'][locale.languageCode]; String get submit => localizedValues['submit'][locale.languageCode]; @@ -153,31 +173,42 @@ class TranslationBase { String get hijriDate => localizedValues['hijri-date'][locale.languageCode]; - String get gregorianDate => localizedValues['gregorian-date'][locale.languageCode]; + String get gregorianDate => + localizedValues['gregorian-date'][locale.languageCode]; - String get verifyLoginWith => localizedValues['verify-login-with'][locale.languageCode]; + String get verifyLoginWith => + localizedValues['verify-login-with'][locale.languageCode]; String get register => localizedValues['register-user'][locale.languageCode]; - String get verifyFingerprint => localizedValues['verify-with-fingerprint'][locale.languageCode]; + String get verifyFingerprint => + localizedValues['verify-with-fingerprint'][locale.languageCode]; - String get verifyFaceID => localizedValues['verify-with-faceid'][locale.languageCode]; + String get verifyFaceID => + localizedValues['verify-with-faceid'][locale.languageCode]; - String get verifySMS => localizedValues['verify-with-sms'][locale.languageCode]; + String get verifySMS => + localizedValues['verify-with-sms'][locale.languageCode]; - String get verifyWhatsApp => localizedValues['verify-with-whatsapp'][locale.languageCode]; + String get verifyWhatsApp => + localizedValues['verify-with-whatsapp'][locale.languageCode]; String get lastLoginAt => localizedValues['last-login'][locale.languageCode]; - String get lastLoginWith => localizedValues['last-login-with'][locale.languageCode]; + String get lastLoginWith => + localizedValues['last-login-with'][locale.languageCode]; - String get verifyFingerprint2 => localizedValues['verify-fingerprint'][locale.languageCode]; + String get verifyFingerprint2 => + localizedValues['verify-fingerprint'][locale.languageCode]; - String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; + String get searchMedicine => + localizedValues['searchMedicine'][locale.languageCode]; - String get searchMedicineHere => localizedValues['searchMedicineHere'][locale.languageCode]; + String get searchMedicineHere => + localizedValues['searchMedicineHere'][locale.languageCode]; - String get pendingPayment => localizedValues['pendingPayment'][locale.languageCode]; + String get pendingPayment => + localizedValues['pendingPayment'][locale.languageCode]; String get payNow => localizedValues['payNow'][locale.languageCode]; @@ -187,24 +218,33 @@ class TranslationBase { String get livecare => localizedValues['livecare'][locale.languageCode]; - String get upcomingNoAction => localizedValues['upcoming-noAction'][locale.languageCode]; + String get upcomingNoAction => + localizedValues['upcoming-noAction'][locale.languageCode]; - String get upcomingConfirm => localizedValues['upcoming-confirm'][locale.languageCode]; + String get upcomingConfirm => + localizedValues['upcoming-confirm'][locale.languageCode]; - String get upcomingPaymentPending => localizedValues['upcoming-payment-pending'][locale.languageCode]; - String get upcomingConfirmMore => localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode]; + String get upcomingPaymentPending => + localizedValues['upcoming-payment-pending'][locale.languageCode]; + String get upcomingConfirmMore => + localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode]; - String get upcomingPaymentNow => localizedValues['upcoming-payment-now'][locale.languageCode]; + String get upcomingPaymentNow => + localizedValues['upcoming-payment-now'][locale.languageCode]; String get upcomingQR => localizedValues['upcoming-QR'][locale.languageCode]; - String get upcomingVirtual => localizedValues['upcoming-virtual'][locale.languageCode]; + String get upcomingVirtual => + localizedValues['upcoming-virtual'][locale.languageCode]; - String get upcomingLivecare => localizedValues['upcoming-livecare'][locale.languageCode]; + String get upcomingLivecare => + localizedValues['upcoming-livecare'][locale.languageCode]; - String get liveCareAppo => localizedValues['livecareAppo'][locale.languageCode]; + String get liveCareAppo => + localizedValues['livecareAppo'][locale.languageCode]; - String get upcomingDetails => localizedValues['upcoming-details'][locale.languageCode]; + String get upcomingDetails => + localizedValues['upcoming-details'][locale.languageCode]; String get reschedule => localizedValues['reschedule'][locale.languageCode]; @@ -222,68 +262,97 @@ class TranslationBase { String get payment => localizedValues['payment'][locale.languageCode]; - String get cancel_nocaps => localizedValues['cancel-nocaps'][locale.languageCode]; + String get cancel_nocaps => + localizedValues['cancel-nocaps'][locale.languageCode]; - String get cancelAppoMsg => localizedValues['cancelAppoMsg'][locale.languageCode]; + String get cancelAppoMsg => + localizedValues['cancelAppoMsg'][locale.languageCode]; - String get pharmaciesList => localizedValues['pharmaciesList'][locale.languageCode]; + String get pharmaciesList => + localizedValues['pharmaciesList'][locale.languageCode]; String get description => localizedValues['description'][locale.languageCode]; String get howToUse => localizedValues['howToUse'][locale.languageCode]; String get price => localizedValues['price'][locale.languageCode]; - String get youCanFindItIn => localizedValues['youCanFindItIn'][locale.languageCode]; + String get youCanFindItIn => + localizedValues['youCanFindItIn'][locale.languageCode]; - String get pleaseEnterMedicineName => localizedValues['pleaseEnterMedicineName'][locale.languageCode]; + String get pleaseEnterMedicineName => + localizedValues['pleaseEnterMedicineName'][locale.languageCode]; - String get verificationMessage => localizedValues['verification_message'][locale.languageCode]; + String get verificationMessage => + localizedValues['verification_message'][locale.languageCode]; - String get validationMessage => localizedValues['validation_message'][locale.languageCode]; + String get validationMessage => + localizedValues['validation_message'][locale.languageCode]; - String get arabicChange => localizedValues['arabic-change'][locale.languageCode]; + String get arabicChange => + localizedValues['arabic-change'][locale.languageCode]; - String get notification => localizedValues['notification'][locale.languageCode]; + String get notification => + localizedValues['notification'][locale.languageCode]; String get appsetting => localizedValues['app-settings'][locale.languageCode]; String get rateApp => localizedValues['rate-app'][locale.languageCode]; - String get setReminder => localizedValues['set-reminder'][locale.languageCode]; + String get setReminder => + localizedValues['set-reminder'][locale.languageCode]; String get before => localizedValues['before'][locale.languageCode]; String get minute => localizedValues['minute'][locale.languageCode]; String get hour => localizedValues['hour'][locale.languageCode]; - String get reminderSuccess => localizedValues['reminderSuccess'][locale.languageCode]; - String get patientShareToDo => localizedValues['patientShareToDo'][locale.languageCode]; - String get patientTaxToDo => localizedValues['patientTaxToDo'][locale.languageCode]; - String get patientShareTotalToDo => localizedValues['patientShareTotalToDo'][locale.languageCode]; - String get paymentMethod => localizedValues['paymentMethod'][locale.languageCode]; + String get reminderSuccess => + localizedValues['reminderSuccess'][locale.languageCode]; + String get patientShareToDo => + localizedValues['patientShareToDo'][locale.languageCode]; + String get patientTaxToDo => + localizedValues['patientTaxToDo'][locale.languageCode]; + String get patientShareTotalToDo => + localizedValues['patientShareTotalToDo'][locale.languageCode]; + String get paymentMethod => + localizedValues['paymentMethod'][locale.languageCode]; - String get moreVerification => localizedValues['more-verify'][locale.languageCode]; + String get moreVerification => + localizedValues['more-verify'][locale.languageCode]; - String get welcomeBack => localizedValues['welcome-back'][locale.languageCode]; + String get welcomeBack => + localizedValues['welcome-back'][locale.languageCode]; - String get accountInfo => localizedValues['account-info'][locale.languageCode]; + String get accountInfo => + localizedValues['account-info'][locale.languageCode]; - String get useAnotherAccount => localizedValues['another-acc'][locale.languageCode]; + String get useAnotherAccount => + localizedValues['another-acc'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode]; - String get noNeedToWaitInLine => localizedValues['noNeedToWaitInLine'][locale.languageCode]; - String get useQRAppoAttend => localizedValues['useQRAppoAttend'][locale.languageCode]; - String get passQRAppoAttend => localizedValues['passQRAppoAttend'][locale.languageCode]; - String get sitWaitingQR => localizedValues['sitWaitingQR'][locale.languageCode]; - String get attendRegisterCode => localizedValues['attendRegisterCode'][locale.languageCode]; - String get scanQRHospital => localizedValues['scanQRHospital'][locale.languageCode]; + String get noNeedToWaitInLine => + localizedValues['noNeedToWaitInLine'][locale.languageCode]; + String get useQRAppoAttend => + localizedValues['useQRAppoAttend'][locale.languageCode]; + String get passQRAppoAttend => + localizedValues['passQRAppoAttend'][locale.languageCode]; + String get sitWaitingQR => + localizedValues['sitWaitingQR'][locale.languageCode]; + String get attendRegisterCode => + localizedValues['attendRegisterCode'][locale.languageCode]; + String get scanQRHospital => + localizedValues['scanQRHospital'][locale.languageCode]; String get sendEmail => localizedValues['sendEmail'][locale.languageCode]; String get close => localizedValues['close'][locale.languageCode]; String get booked => localizedValues['booked'][locale.languageCode]; String get confirmed => localizedValues['confirmed'][locale.languageCode]; String get arrived => localizedValues['arrived'][locale.languageCode]; - String get payNowBookSuccess => localizedValues['payNowBookSuccess'][locale.languageCode]; - String get payNowBookSuccesstext1 => localizedValues['payNowBookSuccesstext1'][locale.languageCode]; - String get payNowBookSuccesstext2 => localizedValues['payNowBookSuccesstext2'][locale.languageCode]; + String get payNowBookSuccess => + localizedValues['payNowBookSuccess'][locale.languageCode]; + String get payNowBookSuccesstext1 => + localizedValues['payNowBookSuccesstext1'][locale.languageCode]; + String get payNowBookSuccesstext2 => + localizedValues['payNowBookSuccesstext2'][locale.languageCode]; String get payLater => localizedValues['payLater'][locale.languageCode]; - String get askDocNotAllowed => localizedValues['askDocNotAllowed'][locale.languageCode]; + String get askDocNotAllowed => + localizedValues['askDocNotAllowed'][locale.languageCode]; String get firstName => localizedValues['first-name'][locale.languageCode]; String get middleName => localizedValues['middle-name'][locale.languageCode]; @@ -294,13 +363,15 @@ class TranslationBase { String get female => localizedValues['female'][locale.languageCode]; - String get prefferedLanguage => localizedValues['preferred-language'][locale.languageCode]; + String get prefferedLanguage => + localizedValues['preferred-language'][locale.languageCode]; String get english => localizedValues['english'][locale.languageCode]; String get arabic => localizedValues['arabic'][locale.languageCode]; - String get registrLocation => localizedValues['locations-register'][locale.languageCode]; + String get registrLocation => + localizedValues['locations-register'][locale.languageCode]; String get ksa => localizedValues['ksa'][locale.languageCode]; @@ -310,13 +381,16 @@ class TranslationBase { String get family => localizedValues['family'][locale.languageCode]; - String get myFamilyFiles => localizedValues['family-title'][locale.languageCode]; + String get myFamilyFiles => + localizedValues['family-title'][locale.languageCode]; String get myFamily => localizedValues['myFamily'][locale.languageCode]; String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; - String get respirationRate => localizedValues['respirationRate'][locale.languageCode]; + String get respirationRate => + localizedValues['respirationRate'][locale.languageCode]; - String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; + String get bodyMeasurements => + localizedValues['bodyMeasurements'][locale.languageCode]; String get height => localizedValues['height'][locale.languageCode]; String get heightUnit => localizedValues['heightUnit'][locale.languageCode]; String get weightUnit => localizedValues['weightUnit'][locale.languageCode]; @@ -326,7 +400,8 @@ class TranslationBase { String get respiration => localizedValues['respiration'][locale.languageCode]; - String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; + String get bloodPressure => + localizedValues['bloodPressure'][locale.languageCode]; String get painScale => localizedValues['painScale'][locale.languageCode]; String get heart => localizedValues['heart'][locale.languageCode]; @@ -335,7 +410,8 @@ class TranslationBase { String get request => localizedValues['request'][locale.languageCode]; String get memberName => localizedValues['member-name'][locale.languageCode]; String get switchUser => localizedValues['switch-login'][locale.languageCode]; - String get removeMember => localizedValues['remove-membe'][locale.languageCode]; + String get removeMember => + localizedValues['remove-membe'][locale.languageCode]; String get allowView => localizedValues['allow-view'][locale.languageCode]; String get rejectView => localizedValues['reject-view'][locale.languageCode]; String get deleteView => localizedValues['delete-view'][locale.languageCode]; @@ -344,40 +420,61 @@ class TranslationBase { String get companyName => localizedValues['companyName'][locale.languageCode]; String get receiptOn => localizedValues['receiptOn'][locale.languageCode]; String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; - String get procedureName => localizedValues['procedureName'][locale.languageCode]; - String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; + String get procedureName => + localizedValues['procedureName'][locale.languageCode]; + String get procedureStatus => + localizedValues['procedureStatus'][locale.languageCode]; String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; String get unusedCount => localizedValues['unusedCount'][locale.languageCode]; - String get totalApproval => localizedValues['totalApproval'][locale.languageCode]; + String get totalApproval => + localizedValues['totalApproval'][locale.languageCode]; String get category => localizedValues['category'][locale.languageCode]; - String get expirationDate => localizedValues['expirationDate'][locale.languageCode]; + String get expirationDate => + localizedValues['expirationDate'][locale.languageCode]; String get patientCard => localizedValues['patientCard'][locale.languageCode]; - String get policyNumber => localizedValues['policyNumber'][locale.languageCode]; + String get policyNumber => + localizedValues['policyNumber'][locale.languageCode]; String get seeDetails => localizedValues['seeDetails'][locale.languageCode]; - String get insuranceCards => localizedValues['insuranceCards'][locale.languageCode]; + String get insuranceCards => + localizedValues['insuranceCards'][locale.languageCode]; String get requestType => localizedValues['requestType'][locale.languageCode]; - String get addFamilyMember => localizedValues['add-new-member'][locale.languageCode]; - String get removeFamilyMember => localizedValues['remove-family-member'][locale.languageCode]; - - String get myMedicalFile => localizedValues['MyMedicalFile'][locale.languageCode]; - String get myMedicalFileSubTitle => localizedValues['myMedicalFileSubTitle'][locale.languageCode]; + String get addFamilyMember => + localizedValues['add-new-member'][locale.languageCode]; + String get removeFamilyMember => + localizedValues['remove-family-member'][locale.languageCode]; + + String get myMedicalFile => + localizedValues['MyMedicalFile'][locale.languageCode]; + String get myMedicalFileSubTitle => + localizedValues['myMedicalFileSubTitle'][locale.languageCode]; String get viewMore => localizedValues['viewMore'][locale.languageCode]; - String get homeHealthCareService => localizedValues['homeHealthCareService'][locale.languageCode]; - String get onlinePharmacy => localizedValues['OnlinePharmacy'][locale.languageCode]; - String get emergencyService => localizedValues['EmergencyService'][locale.languageCode]; - String get onlinePaymentService => localizedValues['OnlinePaymentService'][locale.languageCode]; - String get offersAndPackages => localizedValues['OffersAndPackages'][locale.languageCode]; - String get comprehensiveMedicalCheckup => localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; + String get homeHealthCareService => + localizedValues['homeHealthCareService'][locale.languageCode]; + String get onlinePharmacy => + localizedValues['OnlinePharmacy'][locale.languageCode]; + String get emergencyService => + localizedValues['EmergencyService'][locale.languageCode]; + String get onlinePaymentService => + localizedValues['OnlinePaymentService'][locale.languageCode]; + String get offersAndPackages => + localizedValues['OffersAndPackages'][locale.languageCode]; + String get comprehensiveMedicalCheckup => + localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; String get hMGService => localizedValues['HMGService'][locale.languageCode]; - String get viewAllHabibMedicalService => localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; + String get viewAllHabibMedicalService => + localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; String get viewAll => localizedValues['viewAll'][locale.languageCode]; String get view => localizedValues['view'][locale.languageCode]; String get contactUs => localizedValues['ContactUs'][locale.languageCode]; - String get viewAllWaysReachUs => localizedValues['ViewAllWaysReachUs'][locale.languageCode]; - String get medicalProfile => localizedValues['medicalProfile'][locale.languageCode]; + String get viewAllWaysReachUs => + localizedValues['ViewAllWaysReachUs'][locale.languageCode]; + String get medicalProfile => + localizedValues['medicalProfile'][locale.languageCode]; String get parking => localizedValues['parking'][locale.languageCode]; - String get alhabiServices => localizedValues['alhabiServices'][locale.languageCode]; - String get parkingTitle => localizedValues['parkingTitle'][locale.languageCode]; + String get alhabiServices => + localizedValues['alhabiServices'][locale.languageCode]; + String get parkingTitle => + localizedValues['parkingTitle'][locale.languageCode]; String get readBarcode => localizedValues['readBarcode'][locale.languageCode]; String get showMyPark => localizedValues['showMyPark'][locale.languageCode]; String get clearMyData => localizedValues['clearMyData'][locale.languageCode]; @@ -385,122 +482,195 @@ class TranslationBase { String get gate => localizedValues['gate'][locale.languageCode]; String get building => localizedValues['building'][locale.languageCode]; String get branch => localizedValues['branch'][locale.languageCode]; - String get emergencyServices => localizedValues['emergencyServices'][locale.languageCode]; + String get emergencyServices => + localizedValues['emergencyServices'][locale.languageCode]; String get nearester => localizedValues['nearester'][locale.languageCode]; String get locationa => localizedValues['locationa'][locale.languageCode]; - String get ambulancerequest => localizedValues['ambulancerequest'][locale.languageCode]; + String get ambulancerequest => + localizedValues['ambulancerequest'][locale.languageCode]; String get requestA => localizedValues['requestA'][locale.languageCode]; - String get consultation => localizedValues['consultation'][locale.languageCode]; + String get consultation => + localizedValues['consultation'][locale.languageCode]; String get logs => localizedValues['logs'][locale.languageCode]; - String get textToSpeech => localizedValues['textToSpeech'][locale.languageCode]; - - String get myAppointments => localizedValues['MyAppointments'][locale.languageCode]; - String get noBookedAppointments => localizedValues['NoBookedAppointments'][locale.languageCode]; - String get noConfirmedAppointments => localizedValues['NoConfirmedAppointments'][locale.languageCode]; - String get noArrivedAppointments => localizedValues['noArrivedAppointments'][locale.languageCode]; - String get myAppointmentsList => localizedValues['MyAppointmentsList'][locale.languageCode]; + String get textToSpeech => + localizedValues['textToSpeech'][locale.languageCode]; + + String get myAppointments => + localizedValues['MyAppointments'][locale.languageCode]; + String get noBookedAppointments => + localizedValues['NoBookedAppointments'][locale.languageCode]; + String get noConfirmedAppointments => + localizedValues['NoConfirmedAppointments'][locale.languageCode]; + String get noArrivedAppointments => + localizedValues['noArrivedAppointments'][locale.languageCode]; + String get myAppointmentsList => + localizedValues['MyAppointmentsList'][locale.languageCode]; String get radiology => localizedValues['Radiology'][locale.languageCode]; - String get radiologySubtitle => localizedValues['RadiologySubtitle'][locale.languageCode]; + String get radiologySubtitle => + localizedValues['RadiologySubtitle'][locale.languageCode]; String get lab => localizedValues['Lab'][locale.languageCode]; String get labSubtitle => localizedValues['LabSubtitle'][locale.languageCode]; String get medicines => localizedValues['Medicines'][locale.languageCode]; - String get medicinesSubtitle => localizedValues['MedicinesSubtitle'][locale.languageCode]; + String get medicinesSubtitle => + localizedValues['MedicinesSubtitle'][locale.languageCode]; String get vitalSigns => localizedValues['VitalSigns'][locale.languageCode]; - String get vitalSignsSubtitle => localizedValues['VitalSignsSubTitle'][locale.languageCode]; + String get vitalSignsSubtitle => + localizedValues['VitalSignsSubTitle'][locale.languageCode]; String get myMedical => localizedValues['MyMedical'][locale.languageCode]; - String get myMedicalSubtitle => localizedValues['MyMedicalSubtitle'][locale.languageCode]; + String get myMedicalSubtitle => + localizedValues['MyMedicalSubtitle'][locale.languageCode]; String get myDoctor => localizedValues['MyDoctor'][locale.languageCode]; - String get myDoctorSubtitle => localizedValues['MyDoctorSubtitle'][locale.languageCode]; + String get myDoctorSubtitle => + localizedValues['MyDoctorSubtitle'][locale.languageCode]; String get eye => localizedValues['Eye'][locale.languageCode]; String get eyeSubtitle => localizedValues['EyeSubtitle'][locale.languageCode]; String get insurance => localizedValues['Insurance'][locale.languageCode]; - String get insuranceSubtitle => localizedValues['InsuranceSubtitle'][locale.languageCode]; - String get updateInsurance => localizedValues['UpdateInsurance'][locale.languageCode]; - String get updateInsuranceSubtitle => localizedValues['UpdateInsuranceSubtitle'][locale.languageCode]; - String get insuranceApproval => localizedValues['InsuranceApproval'][locale.languageCode]; - String get insuranceApprovalSubtitle => localizedValues['InsuranceApprovalSubtitle'][locale.languageCode]; + String get insuranceSubtitle => + localizedValues['InsuranceSubtitle'][locale.languageCode]; + String get updateInsurance => + localizedValues['UpdateInsurance'][locale.languageCode]; + String get updateInsuranceSubtitle => + localizedValues['UpdateInsuranceSubtitle'][locale.languageCode]; + String get insuranceApproval => + localizedValues['InsuranceApproval'][locale.languageCode]; + String get insuranceApprovalSubtitle => + localizedValues['InsuranceApprovalSubtitle'][locale.languageCode]; String get allergies => localizedValues['Allergies'][locale.languageCode]; - String get allergiesSubtitle => localizedValues['AllergiesSubtitle'][locale.languageCode]; + String get allergiesSubtitle => + localizedValues['AllergiesSubtitle'][locale.languageCode]; String get myVaccines => localizedValues['MyVaccines'][locale.languageCode]; - String get myVaccinesSubtitle => localizedValues['MyVaccinesSubtitle'][locale.languageCode]; + String get myVaccinesSubtitle => + localizedValues['MyVaccinesSubtitle'][locale.languageCode]; String get medical => localizedValues['Medical'][locale.languageCode]; - String get medicalSubtitle => localizedValues['MedicalSubtitle'][locale.languageCode]; + String get medicalSubtitle => + localizedValues['MedicalSubtitle'][locale.languageCode]; String get monthly => localizedValues['Monthly'][locale.languageCode]; - String get monthlySubtitle => localizedValues['MonthlySubtitle'][locale.languageCode]; + String get monthlySubtitle => + localizedValues['MonthlySubtitle'][locale.languageCode]; String get sick => localizedValues['Sick'][locale.languageCode]; - String get sickSubtitle => localizedValues['SickSubtitle'][locale.languageCode]; + String get sickSubtitle => + localizedValues['SickSubtitle'][locale.languageCode]; String get myBalance => localizedValues['MyBalance'][locale.languageCode]; - String get myBalanceSubtitle => localizedValues['MyBalanceSubtitle'][locale.languageCode]; + String get myBalanceSubtitle => + localizedValues['MyBalanceSubtitle'][locale.languageCode]; String get patientCall => localizedValues['PatientCall'][locale.languageCode]; - String get patientCallSubtitle => localizedValues['PatientCallSubtitle'][locale.languageCode]; - String get smartWatches => localizedValues['SmartWatches'][locale.languageCode]; - String get smartWatchesSubtitle => localizedValues['SmartWatchesSubtitle'][locale.languageCode]; + String get patientCallSubtitle => + localizedValues['PatientCallSubtitle'][locale.languageCode]; + String get smartWatches => + localizedValues['SmartWatches'][locale.languageCode]; + String get smartWatchesSubtitle => + localizedValues['SmartWatchesSubtitle'][locale.languageCode]; String get myTrackers => localizedValues['MyTrackers'][locale.languageCode]; - String get myTrackersSubtitle => localizedValues['MyTrackersSubtitle'][locale.languageCode]; + String get myTrackersSubtitle => + localizedValues['MyTrackersSubtitle'][locale.languageCode]; String get askYour => localizedValues['AskYour'][locale.languageCode]; - String get askYourSubtitle => localizedValues['AskYourSubtitle'][locale.languageCode]; + String get askYourSubtitle => + localizedValues['AskYourSubtitle'][locale.languageCode]; String get internet => localizedValues['Internet'][locale.languageCode]; - String get internetSubtitle => localizedValues['InternetSubtitle'][locale.languageCode]; + String get internetSubtitle => + localizedValues['InternetSubtitle'][locale.languageCode]; String get chatbot => localizedValues['Chatbot'][locale.languageCode]; - String get chatbotSubtitle => localizedValues['ChatbotSubtitle'][locale.languageCode]; + String get chatbotSubtitle => + localizedValues['ChatbotSubtitle'][locale.languageCode]; String get timeLine => localizedValues['TimeLine'][locale.languageCode]; String get labOrders => localizedValues['LabOrders'][locale.languageCode]; String get billNo => localizedValues['BillNo'][locale.languageCode]; - String get prescriptions => localizedValues['Prescriptions'][locale.languageCode]; + String get prescriptions => + localizedValues['Prescriptions'][locale.languageCode]; String get history => localizedValues['History'][locale.languageCode]; String get orderNo => localizedValues['OrderNo'][locale.languageCode]; - String get trackDeliveryDriver => localizedValues['trackDeliveryDriver'][locale.languageCode]; - String get orderDetails => localizedValues['OrderDetails'][locale.languageCode]; + String get trackDeliveryDriver => + localizedValues['trackDeliveryDriver'][locale.languageCode]; + String get orderDetails => + localizedValues['OrderDetails'][locale.languageCode]; String get vitalSign => localizedValues['VitalSign'][locale.languageCode]; - String get monthlyReports => localizedValues['MonthlyReports'][locale.languageCode]; + String get monthlyReports => + localizedValues['MonthlyReports'][locale.languageCode]; - String get locationDialogMessage => localizedValues['locationDialogMessage'][locale.languageCode]; - String get userViewRequest => localizedValues['user-view-requester'][locale.languageCode]; + String get locationDialogMessage => + localizedValues['locationDialogMessage'][locale.languageCode]; + String get userViewRequest => + localizedValues['user-view-requester'][locale.languageCode]; String get userView => localizedValues['user-view'][locale.languageCode]; - String get sentRequest => localizedValues['sent-requests'][locale.languageCode]; + String get sentRequest => + localizedValues['sent-requests'][locale.languageCode]; String get km => localizedValues['km'][locale.languageCode]; - String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode]; - String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; + String get patientHealthSummaryReport => + localizedValues['PatientHealthSummaryReport'][locale.languageCode]; + String get toViewTheTermsAndConditions => + localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; String get clickHere => localizedValues['ClickHere'][locale.languageCode]; - String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; - String get iAgreeToTheTermsAndConditionsSubtitle => localizedValues['IAgreeToTheTermsAndConditionsSubtitle'][locale.languageCode]; + String get iAgreeToTheTermsAndConditions => + localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; + String get iAgreeToTheTermsAndConditionsSubtitle => + localizedValues['IAgreeToTheTermsAndConditionsSubtitle'] + [locale.languageCode]; String get save => localizedValues['Save'][locale.languageCode]; - String get userAgreement => localizedValues['UserAgreement'][locale.languageCode]; - String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode]; - String get emailSentSuccessfully => localizedValues['EmailSentSuccessfully'][locale.languageCode]; - String get EmailSentError => localizedValues['EmailSentError'][locale.languageCode]; - String get checkVaccineAvailability => localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; - String get myVaccinesAvailability => localizedValues['MyVaccinesAvailability'][locale.languageCode]; - String get paymentService => localizedValues['PaymentService'][locale.languageCode]; - String get paymentOnline => localizedValues['PaymentOnline'][locale.languageCode]; - String get onlineCheckIn => localizedValues['OnlineCheckIn'][locale.languageCode]; + String get userAgreement => + localizedValues['UserAgreement'][locale.languageCode]; + String get updateSuccessfully => + localizedValues['UpdateSuccessfully'][locale.languageCode]; + String get emailSentSuccessfully => + localizedValues['EmailSentSuccessfully'][locale.languageCode]; + String get EmailSentError => + localizedValues['EmailSentError'][locale.languageCode]; + String get checkVaccineAvailability => + localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; + String get myVaccinesAvailability => + localizedValues['MyVaccinesAvailability'][locale.languageCode]; + String get paymentService => + localizedValues['PaymentService'][locale.languageCode]; + String get paymentOnline => + localizedValues['PaymentOnline'][locale.languageCode]; + String get onlineCheckIn => + localizedValues['OnlineCheckIn'][locale.languageCode]; String get myBalances => localizedValues['MyBalances'][locale.languageCode]; - String get balanceAmount => localizedValues['BalanceAmount'][locale.languageCode]; - String get totalBalance => localizedValues['TotalBalance'][locale.languageCode]; - String get createAdvancedPayment => localizedValues['CreateAdvancedPayment'][locale.languageCode]; - String get advancePayment => localizedValues['AdvancePayment'][locale.languageCode]; - String get advancePaymentLabel => localizedValues['AdvancePaymentLabel'][locale.languageCode]; + String get balanceAmount => + localizedValues['BalanceAmount'][locale.languageCode]; + String get totalBalance => + localizedValues['TotalBalance'][locale.languageCode]; + String get createAdvancedPayment => + localizedValues['CreateAdvancedPayment'][locale.languageCode]; + String get advancePayment => + localizedValues['AdvancePayment'][locale.languageCode]; + String get advancePaymentLabel => + localizedValues['AdvancePaymentLabel'][locale.languageCode]; String get fileNumber => localizedValues['FileNumber'][locale.languageCode]; String get amount => localizedValues['Amount'][locale.languageCode]; - String get depositorEmail => localizedValues['DepositorEmail'][locale.languageCode]; + String get depositorEmail => + localizedValues['DepositorEmail'][locale.languageCode]; String get notes => localizedValues['Notes'][locale.languageCode]; - String get selectPatientName => localizedValues['SelectPatientName'][locale.languageCode]; - String get selectFamilyPatientName => localizedValues['SelectFamilyPatientName'][locale.languageCode]; - String get selectHospital => localizedValues['SelectHospital'][locale.languageCode]; + String get selectPatientName => + localizedValues['SelectPatientName'][locale.languageCode]; + String get selectFamilyPatientName => + localizedValues['SelectFamilyPatientName'][locale.languageCode]; + String get selectHospital => + localizedValues['SelectHospital'][locale.languageCode]; String get selectCity => localizedValues['selectCity'][locale.languageCode]; String get myAccount => localizedValues['MyAccount'][locale.languageCode]; - String get otherAccount => localizedValues['OtherAccount'][locale.languageCode]; - String get selectBeneficiary => localizedValues['SelectBeneficiary'][locale.languageCode]; - String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode]; - String get depositorName => localizedValues['DepositorName'][locale.languageCode]; - String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode]; + String get otherAccount => + localizedValues['OtherAccount'][locale.languageCode]; + String get selectBeneficiary => + localizedValues['SelectBeneficiary'][locale.languageCode]; + String get confirmThePayment => + localizedValues['ConfirmThePayment'][locale.languageCode]; + String get depositorName => + localizedValues['DepositorName'][locale.languageCode]; + String get mobileNumber => + localizedValues['MobileNumber'][locale.languageCode]; String get ok => localizedValues['Ok'][locale.languageCode]; - String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode]; - String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode]; - String get theVerificationCodeExpiresIn => localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode]; - String get pleaseEnterTheVerificationCode => localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode]; - String get eyeMeasurements => localizedValues['EyeMeasurements'][locale.languageCode]; - String get measurements => localizedValues['Measurements'][locale.languageCode]; + String get waterConsumedInWeek => + localizedValues['WaterConsumedInWeek'][locale.languageCode]; + String get waterConsumedInMonth => + localizedValues['WaterConsumedInMonth'][locale.languageCode]; + String get theVerificationCodeExpiresIn => + localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode]; + String get pleaseEnterTheVerificationCode => + localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode]; + String get eyeMeasurements => + localizedValues['EyeMeasurements'][locale.languageCode]; + String get measurements => + localizedValues['Measurements'][locale.languageCode]; String get classes => localizedValues['Classes'][locale.languageCode]; String get contactLens => localizedValues['ContactLens'][locale.languageCode]; String get rightEye => localizedValues['RightEye'][locale.languageCode]; @@ -514,41 +684,56 @@ class TranslationBase { String get power => localizedValues['Power'][locale.languageCode]; String get diameter => localizedValues['Diameter'][locale.languageCode]; String get remarks => localizedValues['Remarks'][locale.languageCode]; - String get activeMedications => localizedValues['ActiveMedications'][locale.languageCode]; + String get activeMedications => + localizedValues['ActiveMedications'][locale.languageCode]; String get expDate => localizedValues['ExpDate'][locale.languageCode]; String get route => localizedValues['Route'][locale.languageCode]; String get frequency => localizedValues['Frequency'][locale.languageCode]; - String get dailyQuantity => localizedValues['DailyQuantity'][locale.languageCode]; + String get dailyQuantity => + localizedValues['DailyQuantity'][locale.languageCode]; String get addReminder => localizedValues['AddReminder'][locale.languageCode]; String get reminderDes => localizedValues['reminderDes'][locale.languageCode]; String get startDay => localizedValues['StartDay'][locale.languageCode]; String get endDay => localizedValues['EndDay'][locale.languageCode]; String get days => localizedValues['Days'][locale.languageCode]; - String get scheduleTime => localizedValues['ScheduleTime'][locale.languageCode]; + String get scheduleTime => + localizedValues['ScheduleTime'][locale.languageCode]; String get askDoctor => localizedValues['AskDoctor'][locale.languageCode]; - String get doctorResponses => localizedValues['DoctorResponses'][locale.languageCode]; + String get doctorResponses => + localizedValues['DoctorResponses'][locale.languageCode]; String get newDes => localizedValues['New'][locale.languageCode]; String get all => localizedValues['All'][locale.languageCode]; - String get questionHere => localizedValues['QuestionHere'][locale.languageCode]; - String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode]; - String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode]; - String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode]; + String get questionHere => + localizedValues['QuestionHere'][locale.languageCode]; + String get viewDoctorResponses => + localizedValues['ViewDoctorResponses'][locale.languageCode]; + String get serviceInformationButton => + localizedValues['ServiceInformationButton'][locale.languageCode]; + String get serviceInformationTitle => + localizedValues['ServiceInformationTitle'][locale.languageCode]; String get infoLab => localizedValues['info-lab'][locale.languageCode]; - String get infoRadiology => localizedValues['info-radiology'][locale.languageCode]; + String get infoRadiology => + localizedValues['info-radiology'][locale.languageCode]; String get orders => localizedValues['orders'][locale.languageCode]; String get lakum => localizedValues['lakum'][locale.languageCode]; String get wishlist => localizedValues['wishlist'][locale.languageCode]; String get reviews => localizedValues['reviews'][locale.languageCode]; - String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode]; - String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode]; - String get pillReminder => localizedValues['pillReminder'][locale.languageCode]; - String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode]; + String get myPrescriptions => + localizedValues['myPrescriptions'][locale.languageCode]; + String get medicationRefill => + localizedValues['medicationRefill'][locale.languageCode]; + String get pillReminder => + localizedValues['pillReminder'][locale.languageCode]; + String get shippingAddresses => + localizedValues['shippingAddresses'][locale.languageCode]; String get reachUs => localizedValues['reachUs'][locale.languageCode]; - String get ourLocations => localizedValues['ourLocations'][locale.languageCode]; + String get ourLocations => + localizedValues['ourLocations'][locale.languageCode]; String get edit => localizedValues['edit'][locale.languageCode]; String get delete => localizedValues['delete'][locale.languageCode]; String get addAddress => localizedValues['addAddress'][locale.languageCode]; - String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode]; + String get addNewAddress => + localizedValues['addNewAddress'][locale.languageCode]; String get order => localizedValues['order'][locale.languageCode]; String get delivered => localizedValues['delivered'][locale.languageCode]; String get processing => localizedValues['processing'][locale.languageCode]; @@ -556,11 +741,16 @@ class TranslationBase { String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get writeReview => localizedValues['writeReview'][locale.languageCode]; String get shareReview => localizedValues['shareReview'][locale.languageCode]; - String get backMyAccount => localizedValues['backMyAccount'][locale.languageCode]; - String get reviewSuccessful => localizedValues['reviewSuccessful'][locale.languageCode]; - String get reviewShared => localizedValues['reviewShared'][locale.languageCode]; - String get reviewComment => localizedValues['reviewComment'][locale.languageCode]; - String get shippedMethod => localizedValues['shippedMethod'][locale.languageCode]; + String get backMyAccount => + localizedValues['backMyAccount'][locale.languageCode]; + String get reviewSuccessful => + localizedValues['reviewSuccessful'][locale.languageCode]; + String get reviewShared => + localizedValues['reviewShared'][locale.languageCode]; + String get reviewComment => + localizedValues['reviewComment'][locale.languageCode]; + String get shippedMethod => + localizedValues['shippedMethod'][locale.languageCode]; String get orderDetail => localizedValues['orderDetail'][locale.languageCode]; String get deliveryDriverTrack => localizedValues['DeliveryDriverTrack'][locale.languageCode]; String get deliveryLocation => localizedValues['DeliveryLocation'][locale.languageCode]; @@ -572,24 +762,36 @@ class TranslationBase { String get use => localizedValues['use'][locale.languageCode]; String get proceedPay => localizedValues['proceedPay'][locale.languageCode]; String get vat => localizedValues['vat'][locale.languageCode]; - String get inclusiveVat => localizedValues['inclusiveVat'][locale.languageCode]; + String get inclusiveVat => + localizedValues['inclusiveVat'][locale.languageCode]; String get items => localizedValues['items'][locale.languageCode]; String get checkOut => localizedValues['checkOut'][locale.languageCode]; String get total => localizedValues['total'][locale.languageCode]; String get sar => localizedValues['sar'][locale.languageCode]; String get payOnline => localizedValues['payOnline'][locale.languageCode]; String get cancelOrder => localizedValues['cancelOrder'][locale.languageCode]; - String get confirmAddress => localizedValues['confirmAddress'][locale.languageCode]; - String get confirmLocation => localizedValues['confirmLocation'][locale.languageCode]; - String get confirmDeleteMsg => localizedValues['confirmDeleteMsg'][locale.languageCode]; - String get confirmDelete => localizedValues['confirmDelete'][locale.languageCode]; - String get confirmCancellation => localizedValues['confirmCancellation'][locale.languageCode]; - String get serviceInformation => localizedValues['ServiceInformation'][locale.languageCode]; - String get homeHealthCare => localizedValues['HomeHealthCare'][locale.languageCode]; - String get HHCNotAuthMsg => localizedValues['HHCNotAuthMsg'][locale.languageCode]; - String get homeHealthCareText => localizedValues['HomeHealthCareText'][locale.languageCode]; - String get loginRegister => localizedValues['LoginRegister'][locale.languageCode]; + String get confirmAddress => + localizedValues['confirmAddress'][locale.languageCode]; + String get confirmLocation => + localizedValues['confirmLocation'][locale.languageCode]; + String get confirmDeleteMsg => + localizedValues['confirmDeleteMsg'][locale.languageCode]; + String get confirmDelete => + localizedValues['confirmDelete'][locale.languageCode]; + String get confirmCancellation => + localizedValues['confirmCancellation'][locale.languageCode]; + String get serviceInformation => + localizedValues['ServiceInformation'][locale.languageCode]; + String get homeHealthCare => + localizedValues['HomeHealthCare'][locale.languageCode]; + String get HHCNotAuthMsg => + localizedValues['HHCNotAuthMsg'][locale.languageCode]; + String get homeHealthCareText => + localizedValues['HomeHealthCareText'][locale.languageCode]; + String get loginRegister => + localizedValues['LoginRegister'][locale.languageCode]; String get orderLog => localizedValues['OrderLog'][locale.languageCode]; + // String get infoLab => localizedValues['info-lab'][locale.languageCode]; // String get infoRadiology => @@ -597,58 +799,90 @@ class TranslationBase { String get orderDate => localizedValues['orderDate'][locale.languageCode]; String get itemsNo => localizedValues['itemsNo'][locale.languageCode]; String get noOrder => localizedValues['noOrder'][locale.languageCode]; + + String get offersAndPromotions => + localizedValues['offersAndPromotions'][locale.languageCode]; String get review => localizedValues['review'][locale.languageCode]; - String get deliveredOrder => localizedValues['deliveredOrder'][locale.languageCode]; - String get pendingOrder => localizedValues['pendingOrder'][locale.languageCode]; - String get processingOrder => localizedValues['processingOrder'][locale.languageCode]; - String get cancelledOrder => localizedValues['cancelledOrder'][locale.languageCode]; + String get deliveredOrder => + localizedValues['deliveredOrder'][locale.languageCode]; + String get pendingOrder => + localizedValues['pendingOrder'][locale.languageCode]; + String get processingOrder => + localizedValues['processingOrder'][locale.languageCode]; + String get cancelledOrder => + localizedValues['cancelledOrder'][locale.languageCode]; String get compare => localizedValues['compare'][locale.languageCode]; - String get medicationsRefill => localizedValues['medicationsRefill'][locale.languageCode]; - String get myPrescription => localizedValues['myPrescription'][locale.languageCode]; + String get medicationsRefill => + localizedValues['medicationsRefill'][locale.languageCode]; + String get myPrescription => + localizedValues['myPrescription'][locale.languageCode]; String get quantity => localizedValues['quantity'][locale.languageCode]; - String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode]; + String get conditionsHMG => + localizedValues['conditionsHMG'][locale.languageCode]; String get conditions => localizedValues['conditions'][locale.languageCode]; // pharmacy module - String get offersAndPromotions => localizedValues['offersAndPromotions'][locale.languageCode]; - - String get searchAndScanMedication => localizedValues['searchAndScanMedication'][locale.languageCode]; - String get shopByBrands => localizedValues['shopByBrands'][locale.languageCode]; - String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode]; + String get searchAndScanMedication => + localizedValues['searchAndScanMedication'][locale.languageCode]; + String get shopByBrands => + localizedValues['shopByBrands'][locale.languageCode]; + String get recentlyViewed => + localizedValues['recentlyViewed'][locale.languageCode]; String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; String get recommended => localizedValues['recommended'][locale.languageCode]; - String get deleteAllItems => localizedValues['deleteAllItems'][locale.languageCode]; - String get selectAddress => localizedValues['selectAddress'][locale.languageCode]; - String get shippingAddress => localizedValues['shippingAddress'][locale.languageCode]; - String get changeAddress => localizedValues['changeAddress'][locale.languageCode]; - String get selectPaymentOption => localizedValues['selectPaymentOption'][locale.languageCode]; - String get changeMethod => localizedValues['changeMethod'][locale.languageCode]; + String get deleteAllItems => + localizedValues['deleteAllItems'][locale.languageCode]; + String get selectAddress => + localizedValues['selectAddress'][locale.languageCode]; + String get shippingAddress => + localizedValues['shippingAddress'][locale.languageCode]; + String get changeAddress => + localizedValues['changeAddress'][locale.languageCode]; + String get selectPaymentOption => + localizedValues['selectPaymentOption'][locale.languageCode]; + String get changeMethod => + localizedValues['changeMethod'][locale.languageCode]; String get reviewOrder => localizedValues['reviewOrder'][locale.languageCode]; - String get orderSummary => localizedValues['orderSummary'][locale.languageCode]; + String get orderSummary => + localizedValues['orderSummary'][locale.languageCode]; String get active => localizedValues['active'][locale.languageCode]; String get inactive => localizedValues['inactive'][locale.languageCode]; String get balance => localizedValues['balance'][locale.languageCode]; String get gained => localizedValues['gained'][locale.languageCode]; String get consumed => localizedValues['consumed'][locale.languageCode]; String get transferred => localizedValues['transferred'][locale.languageCode]; - String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode]; - String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode]; - String get accountActivation => localizedValues['accountActivation'][locale.languageCode]; + String get checkBeneficiary => + localizedValues['checkBeneficiary'][locale.languageCode]; + String get beneficiaryName => + localizedValues['beneficiaryName'][locale.languageCode]; + String get accountActivation => + localizedValues['accountActivation'][locale.languageCode]; + + String get lakumTransfer => + localizedValues['lakumTransfer'][locale.languageCode]; String get acceptLbl => localizedValues['acceptLbl'][locale.languageCode]; - String get termsService => localizedValues['TermsService'][locale.languageCode]; + String get termsService => + localizedValues['TermsService'][locale.languageCode]; String get beforeUsing => localizedValues['Beforeusing'][locale.languageCode]; String get accept => localizedValues['accept'][locale.languageCode]; - String get dataSafeInfo => localizedValues['data-safe-info'][locale.languageCode]; + String get dataSafeInfo => + localizedValues['data-safe-info'][locale.languageCode]; String get dataSafe => localizedValues['data-safe'][locale.languageCode]; - String get informational => localizedValues['informational'][locale.languageCode]; - String get checkDiagnosis => localizedValues['check-diagnosis'][locale.languageCode]; + String get informational => + localizedValues['informational'][locale.languageCode]; + String get checkDiagnosis => + localizedValues['check-diagnosis'][locale.languageCode]; String get remeberthat => localizedValues['remeberthat'][locale.languageCode]; - String get notUseInEmbergency => localizedValues['not-use-in-emerbency'][locale.languageCode]; - String get notUseInEmbergencyDetails => localizedValues['not-use-in-emerbency-details'][locale.languageCode]; - String get notUseInEmbergencyCall => localizedValues['not-use-in-emerbency-details-call'][locale.languageCode]; - String get selectGender => localizedValues['select-gender'][locale.languageCode]; + String get notUseInEmbergency => + localizedValues['not-use-in-emerbency'][locale.languageCode]; + String get notUseInEmbergencyDetails => + localizedValues['not-use-in-emerbency-details'][locale.languageCode]; + String get notUseInEmbergencyCall => + localizedValues['not-use-in-emerbency-details-call'][locale.languageCode]; + String get selectGender => + localizedValues['select-gender'][locale.languageCode]; String get iAma => localizedValues['i-am-a'][locale.languageCode]; String get selectAge => localizedValues['select-age'][locale.languageCode]; String get iAm => localizedValues['i-am'][locale.languageCode]; @@ -656,66 +890,96 @@ class TranslationBase { String get categorise => localizedValues['categorise'][locale.languageCode]; String get cart => localizedValues['cart'][locale.languageCode]; String get wishList => localizedValues['wishList'][locale.languageCode]; - String get searchProductHere => localizedValues['searchProductHere'][locale.languageCode]; + String get searchProductHere => + localizedValues['searchProductHere'][locale.languageCode]; String get email => localizedValues['email'][locale.languageCode]; String get book => localizedValues['Book'][locale.languageCode]; - String get appointmentLabel => localizedValues['AppointmentLabel'][locale.languageCode]; + String get appointmentLabel => + localizedValues['AppointmentLabel'][locale.languageCode]; String get bloodType => localizedValues['BloodType'][locale.languageCode]; - String get loginToUseService => localizedValues['loginToUseService'][locale.languageCode]; - String get maritalStatus => localizedValues['marital-status'][locale.languageCode]; + String get loginToUseService => + localizedValues['loginToUseService'][locale.languageCode]; + String get maritalStatus => + localizedValues['marital-status'][locale.languageCode]; String get general => localizedValues['general'][locale.languageCode]; String get profile => localizedValues['profile'][locale.languageCode]; - String get notifications => localizedValues['notifications'][locale.languageCode]; - String get notificationDetails => localizedValues['notificationDetails'][locale.languageCode]; - List get infoMyDoctorPoints => localizedValues['info-my-doctor-points'][locale.languageCode]; - String get infoMyDoctor => localizedValues['info-my-doctor'][locale.languageCode]; - String get infoPrescriptions => localizedValues['info-prescriptions'][locale.languageCode]; - List get infoPrescriptionsPoints => localizedValues['info-my-prescription-points'][locale.languageCode]; - - String get infoInsuranceCards => localizedValues['info-insurance-cards'][locale.languageCode]; - List get infoInsuranceCardsPoints => localizedValues['info-insurance-cards-points'][locale.languageCode]; - - String get infoAllergies => localizedValues['info-allergies'][locale.languageCode]; + String get notifications => + localizedValues['notifications'][locale.languageCode]; + String get notificationDetails => + localizedValues['notificationDetails'][locale.languageCode]; + List get infoMyDoctorPoints => + localizedValues['info-my-doctor-points'][locale.languageCode]; + String get infoMyDoctor => + localizedValues['info-my-doctor'][locale.languageCode]; + String get infoPrescriptions => + localizedValues['info-prescriptions'][locale.languageCode]; + List get infoPrescriptionsPoints => + localizedValues['info-my-prescription-points'][locale.languageCode]; + + String get infoInsuranceCards => + localizedValues['info-insurance-cards'][locale.languageCode]; + List get infoInsuranceCardsPoints => + localizedValues['info-insurance-cards-points'][locale.languageCode]; + + String get infoAllergies => + localizedValues['info-allergies'][locale.languageCode]; String get sickLeaves => localizedValues['sick-leaves'][locale.languageCode]; - String get infoSickLeaves => localizedValues['info-sick-leaves'][locale.languageCode]; - List get infoSickLeavePoints => localizedValues['info-sick-leave-points'][locale.languageCode]; - - String get infoApprovals => localizedValues['info-approvals'][locale.languageCode]; - List get infoApprovalPoints => localizedValues['info-approval-points'][locale.languageCode]; - - String get monthReport => localizedValues['month-report'][locale.languageCode]; - String get infoMonthReport => localizedValues['info-month-report'][locale.languageCode]; - String get languageSetting => localizedValues['language-setting'][locale.languageCode]; + String get infoSickLeaves => + localizedValues['info-sick-leaves'][locale.languageCode]; + List get infoSickLeavePoints => + localizedValues['info-sick-leave-points'][locale.languageCode]; + + String get infoApprovals => + localizedValues['info-approvals'][locale.languageCode]; + List get infoApprovalPoints => + localizedValues['info-approval-points'][locale.languageCode]; + + String get monthReport => + localizedValues['month-report'][locale.languageCode]; + String get infoMonthReport => + localizedValues['info-month-report'][locale.languageCode]; + String get languageSetting => + localizedValues['language-setting'][locale.languageCode]; String get alert => localizedValues['alert'][locale.languageCode]; String get emailAlert => localizedValues['email-alert'][locale.languageCode]; String get smsAlert => localizedValues['sms-alert'][locale.languageCode]; - String get contactInfo => localizedValues['contact-info'][locale.languageCode]; + String get contactInfo => + localizedValues['contact-info'][locale.languageCode]; String get emergencyName => localizedValues['emrg-name'][locale.languageCode]; - String get emergencyContact => localizedValues['emrg-no'][locale.languageCode]; + String get emergencyContact => + localizedValues['emrg-no'][locale.languageCode]; String get modes => localizedValues['modes'][locale.languageCode]; String get vibration => localizedValues['vibration'][locale.languageCode]; String get blindMode => localizedValues['blind-modes'][locale.languageCode]; - String get invertTheme => localizedValues['invert-theme'][locale.languageCode]; + String get invertTheme => + localizedValues['invert-theme'][locale.languageCode]; String get offTheme => localizedValues['off-theme'][locale.languageCode]; String get dimTheme => localizedValues['dim-theme'][locale.languageCode]; String get bwTheme => localizedValues['bw-theme'][locale.languageCode]; String get permissions => localizedValues['permissions'][locale.languageCode]; - String get cameraPermission => localizedValues['camera-permission'][locale.languageCode]; - String get locationPermission => localizedValues['location-permission'][locale.languageCode]; - String get accessibility => localizedValues['accessibility'][locale.languageCode]; - String get selectClinic => localizedValues['selectClinic'][locale.languageCode]; + String get cameraPermission => + localizedValues['camera-permission'][locale.languageCode]; + String get locationPermission => + localizedValues['location-permission'][locale.languageCode]; + String get accessibility => + localizedValues['accessibility'][locale.languageCode]; + String get selectClinic => + localizedValues['selectClinic'][locale.languageCode]; String get orderStatus => localizedValues['orderStatus'][locale.languageCode]; String get findUs => localizedValues['FindUs'][locale.languageCode]; String get feedback => localizedValues['Feedback'][locale.languageCode]; String get liveChat => localizedValues['LiveChat'][locale.languageCode]; String get service => localizedValues['Service'][locale.languageCode]; - String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode]; - String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode]; - String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; + String get hMGServiceLabel => + localizedValues['HMGServiceLabel'][locale.languageCode]; + String get healthWeatherIndicators => + localizedValues['HealthWeatherIndicators'][locale.languageCode]; + String get healthTipsBasedOnCurrentWeather => + localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; String get moreDetails => localizedValues['MoreDetails'][locale.languageCode]; String get sendCopy => localizedValues['SendCopy'][locale.languageCode]; String get resendOrder => localizedValues['ResendOrder'][locale.languageCode]; @@ -731,7 +995,8 @@ class TranslationBase { String get mass => localizedValues['mass'][locale.languageCode]; String get tempC => localizedValues['temp-c'][locale.languageCode]; String get bpm => localizedValues['bpm'][locale.languageCode]; - String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; + String get respirationSigns => + localizedValues['respiration-signs'][locale.languageCode]; String get sysDias => localizedValues['sys-dias'][locale.languageCode]; String get body => localizedValues['body'][locale.languageCode]; String get feedbackTitle => localizedValues['feedback'][locale.languageCode]; @@ -740,30 +1005,54 @@ class TranslationBase { String get likeToHear => localizedValues['like-to-hear'][locale.languageCode]; String get subject => localizedValues['subject'][locale.languageCode]; String get message => localizedValues['message'][locale.languageCode]; - String get emptySubject => localizedValues['empty-subject'][locale.languageCode]; - String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; - String get selectAttachment => localizedValues['select-attachment'][locale.languageCode]; - String get complainAppo => localizedValues['complain-appo'][locale.languageCode]; - String get complainWithoutAppo => localizedValues['complain-without-appo'][locale.languageCode]; + String get emptySubject => + localizedValues['empty-subject'][locale.languageCode]; + String get emptyMessage => + localizedValues['empty-message'][locale.languageCode]; + String get selectAttachment => + localizedValues['select-attachment'][locale.languageCode]; + String get complainAppo => + localizedValues['complain-appo'][locale.languageCode]; + String get complainWithoutAppo => + localizedValues['complain-without-appo'][locale.languageCode]; String get question => localizedValues['question'][locale.languageCode]; - String get messageType => localizedValues['message-type'][locale.languageCode]; + String get messageType => + localizedValues['message-type'][locale.languageCode]; String get compliment => localizedValues['compliment'][locale.languageCode]; String get suggestion => localizedValues['suggestion'][locale.languageCode]; - String get yourFeedback => localizedValues['your-feedback'][locale.languageCode]; + String get yourFeedback => + localizedValues['your-feedback'][locale.languageCode]; String get selectPart => localizedValues['select-part'][locale.languageCode]; String get number => localizedValues['number'][locale.languageCode]; - String get notClassified => localizedValues['not-classified'][locale.languageCode]; - String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; + String get notClassified => + localizedValues['not-classified'][locale.languageCode]; + String get searchItemError => + localizedValues['searchItemError'][locale.languageCode]; String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; - String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; - String get wantToConnectWithHmgNetwork => localizedValues['wantConnectHmgNetwork'][locale.languageCode]; - String get failedToAccessHmgServices => localizedValues['failedToAccessHmgServices'][locale.languageCode]; - String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode]; - String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode]; + String get itemInSearch => + localizedValues['ItemInSearch'][locale.languageCode]; + String get bloodDonation => + localizedValues['blood-donation'][locale.languageCode]; + String get bloodInstruction => + localizedValues['blood-instruction'][locale.languageCode]; + String get bloodTermsNcondition => + localizedValues['view-terms'][locale.languageCode]; + String get wantToConnectWithHmgNetwork => + localizedValues['wantConnectHmgNetwork'][locale.languageCode]; + String get failedToAccessHmgServices => + localizedValues['failedToAccessHmgServices'][locale.languageCode]; + String get enablingWifi => + localizedValues['enablingWifi'][locale.languageCode]; + String get offerAndPackages => + localizedValues['offerAndPackages'][locale.languageCode]; + String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; - String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; - String get generalResult => localizedValues['GeneralResult'][locale.languageCode]; - String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; + String get specialResult => + localizedValues['SpecialResult'][locale.languageCode]; + String get generalResult => + localizedValues['GeneralResult'][locale.languageCode]; + String get showMoreBtn => + localizedValues['show-more-btn'][locale.languageCode]; String get value => localizedValues['value'][locale.languageCode]; String get range => localizedValues['range'][locale.languageCode]; String get outpatient => localizedValues['out-patient'][locale.languageCode]; @@ -773,74 +1062,138 @@ class TranslationBase { String get openRad => localizedValues['open-rad'][locale.languageCode]; String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode]; + String get vaccination => localizedValues['vaccination'][locale.languageCode]; + String get welcomeBackV => + localizedValues['welcomeBack'][locale.languageCode]; + String get instructions => + localizedValues['instructions'][locale.languageCode]; + String get updateEmail => + localizedValues['update-email'][locale.languageCode]; + String get updatedEmail => + localizedValues['updated-email'][locale.languageCode]; + String get viewListChildren => + localizedValues['view-list-children'][locale.languageCode]; + String get addChild => localizedValues['add-child'][locale.languageCode]; + String get childName => localizedValues['child-name'][locale.languageCode]; + String get childDob => localizedValues['childDob'][locale.languageCode]; + String get deletedChildMes => + localizedValues['deleted-child-mes'][locale.languageCode]; + String get visit => localizedValues['visit'][locale.languageCode]; + String get descriptionVaccination => + localizedValues['description-vaccination'][locale.languageCode]; + String get dueDate => localizedValues['due-date'][locale.languageCode]; + String get validEmail => localizedValues['valid-email'][locale.languageCode]; + String get confirmSend => + localizedValues['confirm-send'][locale.languageCode]; + String get emailSuccess => + localizedValues['email-success'][locale.languageCode]; + String get deletedChild => + localizedValues['deleted-child'][locale.languageCode]; + String get addInstructions => + localizedValues['add-instructions'][locale.languageCode]; + String get addedChild => localizedValues['added-child'][locale.languageCode]; + String get appUpdate => localizedValues['appUpdate'][locale.languageCode]; + String get ereferralSaveSuccess => + localizedValues['ereferralSaveSuccess'][locale.languageCode]; String get labResults => localizedValues['labResults'][locale.languageCode]; - String get doctorRating => localizedValues['doctorRating'][locale.languageCode]; + String get doctorRating => + localizedValues['doctorRating'][locale.languageCode]; String get good => localizedValues['good'][locale.languageCode]; String get v_good => localizedValues['v-good'][locale.languageCode]; String get excellent => localizedValues['excellent'][locale.languageCode]; - String get below_average => localizedValues['below-average'][locale.languageCode]; + String get below_average => + localizedValues['below-average'][locale.languageCode]; String get infoSigns => localizedValues['info-signs'][locale.languageCode]; - String get infoAdvancePayment => localizedValues['info-advance-payment'][locale.languageCode]; - String get infoMyBalance => localizedValues['info-my-balance'][locale.languageCode]; + String get infoAdvancePayment => + localizedValues['info-advance-payment'][locale.languageCode]; + String get infoMyBalance => + localizedValues['info-my-balance'][locale.languageCode]; String get erContant => localizedValues['er-contant'][locale.languageCode]; String get er => localizedValues['er'][locale.languageCode]; - String get transportationService => localizedValues['transportation-Service'][locale.languageCode]; - String get infoAmbulance => localizedValues['info-ambulance'][locale.languageCode]; - String get transportHeading => localizedValues['RRT-transport-heading'][locale.languageCode]; - String get directionHeading => localizedValues['RRT-direction-heading'][locale.languageCode]; + String get transportationService => + localizedValues['transportation-Service'][locale.languageCode]; + String get infoAmbulance => + localizedValues['info-ambulance'][locale.languageCode]; + String get transportHeading => + localizedValues['RRT-transport-heading'][locale.languageCode]; + String get directionHeading => + localizedValues['RRT-direction-heading'][locale.languageCode]; String get toHospital => localizedValues['to-hospital'][locale.languageCode]; - String get fromHospital => localizedValues['from-hospital'][locale.languageCode]; + String get fromHospital => + localizedValues['from-hospital'][locale.languageCode]; String get oneDirec => localizedValues['one-direc'][locale.languageCode]; String get twoDirec => localizedValues['two-direc'][locale.languageCode]; - String get pickupLocation => localizedValues['pickup-location'][locale.languageCode]; + String get pickupLocation => + localizedValues['pickup-location'][locale.languageCode]; String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode]; String get insideHome => localizedValues['inside-home'][locale.languageCode]; String get haveAppo => localizedValues['have-appo'][locale.languageCode]; - String get dropoffLocation => localizedValues['dropoff-location'][locale.languageCode]; + String get dropoffLocation => + localizedValues['dropoff-location'][locale.languageCode]; String get selectAll => localizedValues['select-all'][locale.languageCode]; String get selectMap => localizedValues['select-map'][locale.languageCode]; - String get noAppointment => localizedValues['no-appointment'][locale.languageCode]; - String get patientShareB => localizedValues['patient-share'][locale.languageCode]; - String get patientShareTax => localizedValues['patient-share-tax'][locale.languageCode]; - String get patientShareTotal => localizedValues['patient-share-total'][locale.languageCode]; - String get selectAmbulate => localizedValues['select-ambulate'][locale.languageCode]; + String get noAppointment => + localizedValues['no-appointment'][locale.languageCode]; + String get patientShareB => + localizedValues['patient-share'][locale.languageCode]; + String get patientShareTax => + localizedValues['patient-share-tax'][locale.languageCode]; + String get patientShareTotal => + localizedValues['patient-share-total'][locale.languageCode]; + String get selectAmbulate => + localizedValues['select-ambulate'][locale.languageCode]; String get wheelchair => localizedValues['wheelchair'][locale.languageCode]; String get walker => localizedValues['walker'][locale.languageCode]; String get stretcher => localizedValues['stretcher'][locale.languageCode]; String get none => localizedValues['none'][locale.languageCode]; String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode]; String get billAmount => localizedValues['bill-amount'][locale.languageCode]; - String get transportMethod => localizedValues['transport-method'][locale.languageCode]; + String get transportMethod => + localizedValues['transport-method'][locale.languageCode]; String get directions => localizedValues['directions'][locale.languageCode]; - String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode]; + String get infoMyAppointments => + localizedValues['info-my-appointments'][locale.languageCode]; String get infoTodo => localizedValues['info-todo'][locale.languageCode]; String get familyInfo => localizedValues['family-info'][locale.languageCode]; - String get profileUpdate => localizedValues['update-succ'][locale.languageCode]; - String get dentalComplaints => localizedValues['dental-complains'][locale.languageCode]; - String get emptyResult => localizedValues['empty-result'][locale.languageCode]; - - String get noBookedAppo => localizedValues['no-booked-appointment'][locale.languageCode]; - String get noConfirmedAppo => localizedValues['no-confirmed-appointment'][locale.languageCode]; - String get noArrivedAppo => localizedValues['no-arrived-appointment'][locale.languageCode]; - String get upcomingEmpty => localizedValues['upcoming-empty'][locale.languageCode]; - String get upcomingTimeLeft => localizedValues['upcoming-timeLeft'][locale.languageCode]; - - String get covidTestAllServices => localizedValues['covid-test-all-services'][locale.languageCode]; + String get profileUpdate => + localizedValues['update-succ'][locale.languageCode]; + String get dentalComplaints => + localizedValues['dental-complains'][locale.languageCode]; + String get emptyResult => + localizedValues['empty-result'][locale.languageCode]; + + String get noBookedAppo => + localizedValues['no-booked-appointment'][locale.languageCode]; + String get noConfirmedAppo => + localizedValues['no-confirmed-appointment'][locale.languageCode]; + String get noArrivedAppo => + localizedValues['no-arrived-appointment'][locale.languageCode]; + String get upcomingEmpty => + localizedValues['upcoming-empty'][locale.languageCode]; + String get upcomingTimeLeft => + localizedValues['upcoming-timeLeft'][locale.languageCode]; + + String get covidTestAllServices => + localizedValues['covid-test-all-services'][locale.languageCode]; String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; String get ereferral => localizedValues['ereferral'][locale.languageCode]; - String get childVaccine => localizedValues['child-vaccine'][locale.languageCode]; + String get childVaccine => + localizedValues['child-vaccine'][locale.languageCode]; String get calculators => localizedValues['calculators'][locale.languageCode]; String get converters => localizedValues['converters'][locale.languageCode]; String get h2o => localizedValues['h2o'][locale.languageCode]; - String get waterTracker => localizedValues['waterTracker'][locale.languageCode]; + String get waterTracker => + localizedValues['waterTracker'][locale.languageCode]; String get ft => localizedValues['ft'][locale.languageCode]; String get vTour => localizedValues['v-tour'][locale.languageCode]; String get hmgNews => localizedValues['hmg-news'][locale.languageCode]; String get bloodD => localizedValues['blood-d'][locale.languageCode]; - String get symptomCheckerTitle => localizedValues['symptomCheckerTitle'][locale.languageCode]; + String get symptomCheckerTitle => + localizedValues['symptomCheckerTitle'][locale.languageCode]; String get latestNews => localizedValues['latest-news'][locale.languageCode]; - String get ourLocation => localizedValues['our-location'][locale.languageCode]; + String get ourLocation => + localizedValues['our-location'][locale.languageCode]; String get pharmacies => localizedValues['pharmacies'][locale.languageCode]; String get hospitals => localizedValues['hospitals'][locale.languageCode]; String get wallet => localizedValues['wallet'][locale.languageCode]; @@ -848,19 +1201,23 @@ class TranslationBase { String get requested => localizedValues['requested'][locale.languageCode]; String get ready => localizedValues['ready'][locale.languageCode]; String get completed => localizedValues['completed'][locale.languageCode]; - String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode]; + String get requestMedicalReport => + localizedValues['request-medical-report'][locale.languageCode]; String get insurCards => localizedValues['insur-cards'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode]; String get details => localizedValues['details'][locale.languageCode]; String get age => localizedValues['age'][locale.languageCode]; - String get activeInsurence => localizedValues['active-insurence'][locale.languageCode]; + String get activeInsurence => + localizedValues['active-insurence'][locale.languageCode]; String get notActive => localizedValues['not-active'][locale.languageCode]; String get cardDetail => localizedValues['card-detail'][locale.languageCode]; String get dr => localizedValues['Dr'][locale.languageCode]; String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; - String get instructions => localizedValues['instructions'][locale.languageCode]; - String get instructionsPharmacies => localizedValues['instructions-pharmacies'][locale.languageCode]; - String get selectHospitalDec => localizedValues['select-hospital'][locale.languageCode]; + String get instructionsPharmacies => + localizedValues['instructions-pharmacies'][locale.languageCode]; + String get selectHospitalDec => + localizedValues['select-hospital'][locale.languageCode]; + String get start => localizedValues['start'][locale.languageCode]; String get infoChat => localizedValues['info-chat'][locale.languageCode]; @@ -869,102 +1226,131 @@ class TranslationBase { String get tapTitle => localizedValues['tap-title'][locale.languageCode]; String get later => localizedValues['later'][locale.languageCode]; - String get lastAppointment => localizedValues['last-appointment'][locale.languageCode]; + String get lastAppointment => + localizedValues['last-appointment'][locale.languageCode]; String get rateClinic => localizedValues['rate-clinic'][locale.languageCode]; String get fetchData => localizedValues['fetch-data'][locale.languageCode]; - String get sendConfEmail => localizedValues['send-email'][locale.languageCode]; - String get updateEmail => localizedValues['update-email'][locale.languageCode]; - String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; + String get sendConfEmail => + localizedValues['send-email'][locale.languageCode]; + String get noDataAvailable => + localizedValues['noDataAvailable'][locale.languageCode]; String get theName => localizedValues['thename'][locale.languageCode]; - String get noSearchResult => localizedValues['noSearchResult'][locale.languageCode]; - String get selectFileSouse => localizedValues['selectFileSouse'][locale.languageCode]; + String get noSearchResult => + localizedValues['noSearchResult'][locale.languageCode]; + String get selectFileSouse => + localizedValues['selectFileSouse'][locale.languageCode]; String get rate => localizedValues['rate'][locale.languageCode]; - String get bookedSuccess => localizedValues['booked-success'][locale.languageCode]; - String get appoReminder30 => localizedValues['appo-reminder-select-option-30'][locale.languageCode]; - String get appoReminder60 => localizedValues['appo-reminder-select-option-60'][locale.languageCode]; - String get appoReminder90 => localizedValues['appo-reminder-select-option-90'][locale.languageCode]; - String get appoReminder120 => localizedValues['appo-reminder-select-option-120'][locale.languageCode]; + String get bookedSuccess => + localizedValues['booked-success'][locale.languageCode]; + String get appoReminder30 => + localizedValues['appo-reminder-select-option-30'][locale.languageCode]; + String get appoReminder60 => + localizedValues['appo-reminder-select-option-60'][locale.languageCode]; + String get appoReminder90 => + localizedValues['appo-reminder-select-option-90'][locale.languageCode]; + String get appoReminder120 => + localizedValues['appo-reminder-select-option-120'][locale.languageCode]; String get gallery => localizedValues['gallery'][locale.languageCode]; String get camera => localizedValues['camera'][locale.languageCode]; String get medReport => localizedValues['med-report'][locale.languageCode]; - String get newMedReport => localizedValues['new-med-report'][locale.languageCode]; - String get requestReport => localizedValues['requestReport'][locale.languageCode]; - String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode]; - String get successSendReport => localizedValues['successSendReport'][locale.languageCode]; + String get newMedReport => + localizedValues['new-med-report'][locale.languageCode]; + String get requestReport => + localizedValues['requestReport'][locale.languageCode]; + String get confirmMsgReport => + localizedValues['confirm-msg-report'][locale.languageCode]; + String get successSendReport => + localizedValues['successSendReport'][locale.languageCode]; String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode]; - String get systolicLng => localizedValues['systolic-lng'][locale.languageCode]; - String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode]; - String get policyHolder => localizedValues['policy-holder'][locale.languageCode]; + String get systolicLng => + localizedValues['systolic-lng'][locale.languageCode]; + String get diastolicLng => + localizedValues['diastolic-lng'][locale.languageCode]; + String get policyHolder => + localizedValues['policy-holder'][locale.languageCode]; String get policyNo => localizedValues['policy-no'][locale.languageCode]; - String get expiryDateTitle => localizedValues['expiry-date'][locale.languageCode]; + String get expiryDateTitle => + localizedValues['expiry-date'][locale.languageCode]; String get classTitle => localizedValues['class'][locale.languageCode]; String get approval => localizedValues['approval'][locale.languageCode]; String get agree => localizedValues['agree'][locale.languageCode]; String get disagree => localizedValues['disagree'][locale.languageCode]; - String get requestSent => localizedValues['request-sent'][locale.languageCode]; - String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode]; - String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode]; + String get requestSent => + localizedValues['request-sent'][locale.languageCode]; + String get attachInsuraceImage => + localizedValues['attach-insurace-image'][locale.languageCode]; + String get infoInsurCards => + localizedValues['info-insur-cards'][locale.languageCode]; String get scanNow => localizedValues['scan-now'][locale.languageCode]; - String get pharmacyServiceTermsCondition => localizedValues['pharmacyServiceTermsCondition'][locale.languageCode]; - String get recordDeleted => localizedValues['recordDeleted'][locale.languageCode]; + String get pharmacyServiceTermsCondition => + localizedValues['pharmacyServiceTermsCondition'][locale.languageCode]; + + String get recordDeleted => + localizedValues['recordDeleted'][locale.languageCode]; - String get referralStatus => localizedValues['referralStatus'][locale.languageCode]; - String get referralDate => localizedValues['referralDate'][locale.languageCode]; + String get referralStatus => + localizedValues['referralStatus'][locale.languageCode]; + String get referralDate => + localizedValues['referralDate'][locale.languageCode]; String get patientName => localizedValues['patientName'][locale.languageCode]; - String get referralNumber => localizedValues['referralNumber'][locale.languageCode]; + String get referralNumber => + localizedValues['referralNumber'][locale.languageCode]; String get requestID => localizedValues['requestID'][locale.languageCode]; String get OrderStatus => localizedValues['OrderStatus'][locale.languageCode]; String get pickupDate => localizedValues['pickupDate'][locale.languageCode]; String get serviceName => localizedValues['serviceName'][locale.languageCode]; - String get orderLocation => localizedValues['orderLocation'][locale.languageCode]; - String get selectService => localizedValues['selectService'][locale.languageCode]; - String get coveredService => localizedValues['coveredService'][locale.languageCode]; - String get selectedService => localizedValues['selectedService'][locale.languageCode]; - String get cancelOrderMsg => localizedValues['cancelOrderMsg'][locale.languageCode]; - String get processDoneSuccessfully => localizedValues['processDoneSuccessfully'][locale.languageCode]; - String get selectHomeHealthCareServices => localizedValues['selectHomeHealthCareServices'][locale.languageCode]; + String get orderLocation => + localizedValues['orderLocation'][locale.languageCode]; + String get selectService => + localizedValues['selectService'][locale.languageCode]; + String get coveredService => + localizedValues['coveredService'][locale.languageCode]; + String get selectedService => + localizedValues['selectedService'][locale.languageCode]; + String get cancelOrderMsg => + localizedValues['cancelOrderMsg'][locale.languageCode]; + String get processDoneSuccessfully => + localizedValues['processDoneSuccessfully'][locale.languageCode]; + String get selectHomeHealthCareServices => + localizedValues['selectHomeHealthCareServices'][locale.languageCode]; + String get help => localizedValues['help'][locale.languageCode]; + String get habibRobotText => + localizedValues['habibRobotText'][locale.languageCode]; String get topBrands => localizedValues['topBrands'][locale.languageCode]; String get notifyMe => localizedValues['notifyMe'][locale.languageCode]; - String get specification => localizedValues['specification'][locale.languageCode]; - String get availability => localizedValues['availability'][locale.languageCode]; - String get quantitySize => localizedValues['quantitySize'][locale.languageCode]; + String get specification => + localizedValues['specification'][locale.languageCode]; + String get availability => + localizedValues['availability'][locale.languageCode]; + String get quantitySize => + localizedValues['quantitySize'][locale.languageCode]; String get addToCart => localizedValues['addToCart'][locale.languageCode]; String get buyNow => localizedValues['buyNow'][locale.languageCode]; - String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode]; + String get quantityShortcut => + localizedValues['quantityShortcut'][locale.languageCode]; - String get updatedEmail => localizedValues['updated-email'][locale.languageCode]; - String get viewListChildren => localizedValues['view-list-children'][locale.languageCode]; - String get addChild => localizedValues['add-child'][locale.languageCode]; - String get childDob => localizedValues['childDob'][locale.languageCode]; - String get deletedChildMes => localizedValues['deleted-child-mes'][locale.languageCode]; - String get visit => localizedValues['visit'][locale.languageCode]; - String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; - String get dueDate => localizedValues['due-date'][locale.languageCode]; - String get validEmail => localizedValues['valid-email'][locale.languageCode]; - String get confirmSend => localizedValues['confirm-send'][locale.languageCode]; - String get emailSuccess => localizedValues['email-success'][locale.languageCode]; - String get deletedChild => localizedValues['deleted-child'][locale.languageCode]; - String get addInstructions => localizedValues['add-instructions'][locale.languageCode]; - String get addedChild => localizedValues['added-child'][locale.languageCode]; - String get appUpdate => localizedValues['app-update'][locale.languageCode]; - String get ereferralSaveSuccess => localizedValues['ereferralSaveSuccess'][locale.languageCode]; String get year => localizedValues['Year'][locale.languageCode]; String get month => localizedValues['Month'][locale.languageCode]; String get point => localizedValues['point'][locale.languageCode]; String get riyal => localizedValues['riyal'][locale.languageCode]; - String get termOfService => localizedValues['termOfService'][locale.languageCode]; - String get shoppingCart => localizedValues['shoppingCart'][locale.languageCode]; + String get termOfService => + localizedValues['termOfService'][locale.languageCode]; + String get shoppingCart => + localizedValues['shoppingCart'][locale.languageCode]; String get covidTest => localizedValues['covidTest'][locale.languageCode]; String get driveThru => localizedValues['driveThru'][locale.languageCode]; - String get NearestErDesc => localizedValues['NearestErDesc'][locale.languageCode]; + String get NearestErDesc => + localizedValues['NearestErDesc'][locale.languageCode]; String get NearestEr => localizedValues['NearestEr'][locale.languageCode]; String get infoCMC => localizedValues['infoCMC'][locale.languageCode]; - String get instructionAgree => localizedValues['instructionAgree'][locale.languageCode]; + String get instructionAgree => + localizedValues['instructionAgree'][locale.languageCode]; String get reqId => localizedValues['reqId'][locale.languageCode]; - String get ordersLog => localizedValues['RRT-orders-log'][locale.languageCode]; + String get ordersLog => + localizedValues['RRT-orders-log'][locale.languageCode]; String get bloodSugar => localizedValues['blood-sugar'][locale.languageCode]; String get myTracker => localizedValues['my-tracker'][locale.languageCode]; String get weekly => localizedValues['weekly'][locale.languageCode]; @@ -973,39 +1359,56 @@ class TranslationBase { String get measured => localizedValues['measured'][locale.languageCode]; String get sugarAdd => localizedValues['sugar-add'][locale.languageCode]; String get other => localizedValues['other'][locale.languageCode]; - String get measureUnit => localizedValues['measure-unit'][locale.languageCode]; - String get measureTime => localizedValues['measure-time'][locale.languageCode]; + String get measureUnit => + localizedValues['measure-unit'][locale.languageCode]; + String get measureTime => + localizedValues['measure-time'][locale.languageCode]; String get update => localizedValues['update'][locale.languageCode]; - - String get covid19_driveThrueTest => localizedValues['covid19_driveThrueTest'][locale.languageCode]; + String get covid19_driveThrueTest => + localizedValues['covid19_driveThrueTest'][locale.languageCode]; String get eReferral => localizedValues['E-Referral'][locale.languageCode]; - String get vaccination => localizedValues["vaccination"][locale.languageCode]; - String get msg_email_address_up_to_date => localizedValues["msg_email_address_up_to_date"][locale.languageCode]; - String get updateEmailMsg => localizedValues["update-email-msg"][locale.languageCode]; - String get childName => localizedValues["childName"][locale.languageCode]; - String get addNewChild => localizedValues["add-new-child"][locale.languageCode]; - String get sendChildEmailMsg => localizedValues["send-child-email-msg"][locale.languageCode]; - String get vaccinationAddChildMsg => localizedValues["vaccination-add-child-msg"][locale.languageCode]; - String get childAddedSuccessfully => localizedValues["child_added_successfully"][locale.languageCode]; + + String get msg_email_address_up_to_date => + localizedValues["msg_email_address_up_to_date"][locale.languageCode]; + String get updateEmailMsg => + localizedValues["update-email-msg"][locale.languageCode]; + + String get addNewChild => + localizedValues["add-new-child"][locale.languageCode]; + String get sendChildEmailMsg => + localizedValues["send-child-email-msg"][locale.languageCode]; + String get vaccinationAddChildMsg => + localizedValues["vaccination-add-child-msg"][locale.languageCode]; + String get childAddedSuccessfully => + localizedValues["child_added_successfully"][locale.languageCode]; String get sugar => localizedValues["sugar"][locale.languageCode]; - String get bloodCholesterol => localizedValues["bloodCholesterol"][locale.languageCode]; + String get bloodCholesterol => + localizedValues["bloodCholesterol"][locale.languageCode]; String get cholesterol => localizedValues["cholesterol"][locale.languageCode]; - String get triglycerides => localizedValues["triglycerides"][locale.languageCode]; + String get triglycerides => + localizedValues["triglycerides"][locale.languageCode]; String get fatInBlood => localizedValues["fatInBlood"][locale.languageCode]; String get calculate => localizedValues["calculate"][locale.languageCode]; - String get enterReadingValue => localizedValues["enterReadingValue"][locale.languageCode]; - String get convertBloodSugarStatement => localizedValues["convertBloodSugarStatement"][locale.languageCode]; + String get enterReadingValue => + localizedValues["enterReadingValue"][locale.languageCode]; + String get convertBloodSugarStatement => + localizedValues["convertBloodSugarStatement"][locale.languageCode]; String get convertFrom => localizedValues["convertFrom"][locale.languageCode]; String get result => localizedValues["result"][locale.languageCode]; - String get bloodSugarConversion => localizedValues["bloodSugarConversion"][locale.languageCode]; - String get convertCholesterolStatement => localizedValues["convertCholesterolStatement"][locale.languageCode]; - String get triglyceridesConvertStatement => localizedValues["triglyceridesConvertStatement"][locale.languageCode]; - + String get sort => localizedValues["sort"][locale.languageCode]; + String get bloodSugarConversion => + localizedValues["bloodSugarConversion"][locale.languageCode]; + String get convertCholesterolStatement => + localizedValues["convertCholesterolStatement"][locale.languageCode]; + String get triglyceridesConvertStatement => + localizedValues["triglyceridesConvertStatement"][locale.languageCode]; String get bloodDEnterDesc => localizedValues["bloodD-enter-desc"][locale.languageCode]; - String get viewTermsConditions => localizedValues["viewTermsConditions"][locale.languageCode]; - String get generalHealth => localizedValues["generalHealth"][locale.languageCode]; + String get viewTermsConditions => + localizedValues["viewTermsConditions"][locale.languageCode]; + String get generalHealth => + localizedValues["generalHealth"][locale.languageCode]; String get womanHealth => localizedValues["womanHealth"][locale.languageCode]; String get bmi => localizedValues["bmi"][locale.languageCode]; String get calcHealth => localizedValues["calc-health"][locale.languageCode]; @@ -1014,7 +1417,8 @@ class TranslationBase { String get idealBody => localizedValues["idealBody"][locale.languageCode]; String get bodyWord => localizedValues["body_word"][locale.languageCode]; String get fat => localizedValues["fat"][locale.languageCode]; - String get carbohydrate => localizedValues["carbohydrate"][locale.languageCode]; + String get carbohydrate => + localizedValues["carbohydrate"][locale.languageCode]; String get proteinFat => localizedValues["proteinFat"][locale.languageCode]; String get ovulation => localizedValues["ovulation"][locale.languageCode]; String get delivery => localizedValues["delivery"][locale.languageCode]; @@ -1022,69 +1426,101 @@ class TranslationBase { String get selectUnit => localizedValues["selectUnit"][locale.languageCode]; String get feet => localizedValues["feet"][locale.languageCode]; String get pound => localizedValues["pound"][locale.languageCode]; - String get seeListOfDoctor => localizedValues["seeListOfDoctor"][locale.languageCode]; + String get seeListOfDoctor => + localizedValues["seeListOfDoctor"][locale.languageCode]; String get obese => localizedValues["obese"][locale.languageCode]; String get overWeight => localizedValues["overWeight"][locale.languageCode]; String get healthy => localizedValues["healthy"][locale.languageCode]; String get underWeight => localizedValues["underWeight"][locale.languageCode]; - String get bmiCalcMsgObese => localizedValues["bmiCalcMsgObese"][locale.languageCode]; - String get bmiCalcMsgOverweight => localizedValues["bmiCalcMsgOverweight"][locale.languageCode]; - String get bmiCalcMsgHealthy => localizedValues["bmiCalcMsgHealthy"][locale.languageCode]; - String get bmiCalcMsgUnderWeight => localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode]; + String get bmiCalcMsgObese => + localizedValues["bmiCalcMsgObese"][locale.languageCode]; + String get bmiCalcMsgOverweight => + localizedValues["bmiCalcMsgOverweight"][locale.languageCode]; + String get bmiCalcMsgHealthy => + localizedValues["bmiCalcMsgHealthy"][locale.languageCode]; + String get bmiCalcMsgUnderWeight => + localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode]; String get bariatrics => localizedValues["bariatrics"][locale.languageCode]; - String get bariatricsHeaderMsg => localizedValues["bariatricsHeaderMsg"][locale.languageCode]; + String get bariatricsHeaderMsg => + localizedValues["bariatricsHeaderMsg"][locale.languageCode]; String get continues => localizedValues["continue"][locale.languageCode]; String get skip => localizedValues["skip"][locale.languageCode]; - String get calorieCalcDesc => localizedValues["calorieCalcDesc"][locale.languageCode]; - String get age11_120Years => localizedValues["age11_120_years"][locale.languageCode]; + String get calorieCalcDesc => + localizedValues["calorieCalcDesc"][locale.languageCode]; + String get age11_120Years => + localizedValues["age11_120_years"][locale.languageCode]; String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode]; String get videoAppo => localizedValues["videoAppo"][locale.languageCode]; String get weightAdd => localizedValues["weight-add"][locale.languageCode]; - String get systolicAdd => localizedValues["systolic-add"][locale.languageCode]; - String get diastolicAdd => localizedValues["systolic-add"][locale.languageCode]; + String get systolicAdd => + localizedValues["systolic-add"][locale.languageCode]; + String get diastolicAdd => + localizedValues["systolic-add"][locale.languageCode]; String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode]; - String get selectLocation => localizedValues["select-location"][locale.languageCode]; - String get resultHeader => localizedValues["result-header"][locale.languageCode]; + String get selectLocation => + localizedValues["select-location"][locale.languageCode]; + String get resultHeader => + localizedValues["result-header"][locale.languageCode]; String get covidInfo => localizedValues["covid-info"][locale.languageCode]; String get selectAppo => localizedValues["select-appo"][locale.languageCode]; - String get covidAlertHeader => localizedValues["covid-alert-header"][locale.languageCode]; - String get covidAlertInfo => localizedValues["covid-alert-info"][locale.languageCode]; - String get covidAlertMins => localizedValues["covid-alert-mins"][locale.languageCode]; + String get covidAlertHeader => + localizedValues["covid-alert-header"][locale.languageCode]; + String get covidAlertInfo => + localizedValues["covid-alert-info"][locale.languageCode]; + String get covidAlertMins => + localizedValues["covid-alert-mins"][locale.languageCode]; String get back => localizedValues["back"][locale.languageCode]; - String get getDirections => localizedValues["get-directions"][locale.languageCode]; - String get selectedLocation => localizedValues["selected-location"][locale.languageCode]; + String get getDirections => + localizedValues["get-directions"][locale.languageCode]; + String get selectedLocation => + localizedValues["selected-location"][locale.languageCode]; String get testFee => localizedValues["test-fee"][locale.languageCode]; String get payOptions => localizedValues["pay-options"][locale.languageCode]; - String get livecareService => localizedValues["livecare-service"][locale.languageCode]; - String get livecareServiceDesc => localizedValues["livecare-service-desc"][locale.languageCode]; - String get whyLivecare => localizedValues["why-livecare"][locale.languageCode]; - String get livecarePoint1 => localizedValues["livecare-point-1"][locale.languageCode]; - String get docVirtualAppoIns4 => localizedValues["doc-virtual-appo-ins4"][locale.languageCode]; - String get docVirtualAppoIns5 => localizedValues["doc-virtual-appo-ins5"][locale.languageCode]; - String get livecareSummary => localizedValues["livecare-summary"][locale.languageCode]; - - String get livecareOption1 => localizedValues["livecare-option-1"][locale.languageCode]; - String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode]; - String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode]; - String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode]; - - - + String get livecareService => + localizedValues["livecare-service"][locale.languageCode]; + String get livecareServiceDesc => + localizedValues["livecare-service-desc"][locale.languageCode]; + String get whyLivecare => + localizedValues["why-livecare"][locale.languageCode]; + String get livecarePoint1 => + localizedValues["livecare-point-1"][locale.languageCode]; + String get docVirtualAppoIns4 => + localizedValues["doc-virtual-appo-ins4"][locale.languageCode]; + String get docVirtualAppoIns5 => + localizedValues["doc-virtual-appo-ins5"][locale.languageCode]; + String get livecareSummary => + localizedValues["livecare-summary"][locale.languageCode]; + + String get livecareOption1 => + localizedValues["livecare-option-1"][locale.languageCode]; + String get livecareOption2 => + localizedValues["livecare-option-2"][locale.languageCode]; + String get livecareOption3 => + localizedValues["livecare-option-3"][locale.languageCode]; + String get livecareOption4 => + localizedValues["livecare-option-4"][locale.languageCode]; String get today => localizedValues["today"][locale.languageCode]; String get week => localizedValues["week"][locale.languageCode]; - String get h2oAmountOfWater => localizedValues["h2o-amount-of-water"][locale.languageCode]; + String get h2oAmountOfWater => + localizedValues["h2o-amount-of-water"][locale.languageCode]; String get updateUser => localizedValues["update-user"][locale.languageCode]; String get editname => localizedValues["editname"][locale.languageCode]; - String get activityLevel => localizedValues["activity-level"][locale.languageCode]; + String get activityLevel => + localizedValues["activity-level"][locale.languageCode]; String get success => localizedValues["success"][locale.languageCode]; - String get enterNameHere => localizedValues["enterNameHere"][locale.languageCode]; - String get lightActive => localizedValues["light-active"][locale.languageCode]; + String get enterNameHere => + localizedValues["enterNameHere"][locale.languageCode]; + String get lightActive => + localizedValues["light-active"][locale.languageCode]; String get modActive => localizedValues["mod-active"][locale.languageCode]; - String get reminderLabel => localizedValues["reminder-label"][locale.languageCode]; - String get reminderTimesLabel => localizedValues["reminder-times-label"][locale.languageCode]; + String get reminderLabel => + localizedValues["reminder-label"][locale.languageCode]; + String get reminderTimesLabel => + localizedValues["reminder-times-label"][locale.languageCode]; String get times => localizedValues["times"][locale.languageCode]; - String get WaterCalculate => localizedValues["WaterCalculate"][locale.languageCode]; + String get WaterCalculate => + localizedValues["WaterCalculate"][locale.languageCode]; String get notifTitle => localizedValues["notif-title"][locale.languageCode]; String get notifText => localizedValues["notif-text"][locale.languageCode]; String get custom => localizedValues["custom"][locale.languageCode]; @@ -1094,27 +1530,80 @@ class TranslationBase { String get taken => localizedValues["taken"][locale.languageCode]; String get ml => localizedValues["ml"][locale.languageCode]; String get l => localizedValues["l"][locale.languageCode]; - String get customLabel => localizedValues["custom-label"][locale.languageCode]; - String get customLabelInLitres => localizedValues["custom-label-in-litres"][locale.languageCode]; - String get customLabelInMililitres => localizedValues["custom-label-in-mililitres"][locale.languageCode]; + String get customLabel => + localizedValues["custom-label"][locale.languageCode]; + + String get customLabelInLitres => + localizedValues["custom-label-in-litres"][locale.languageCode]; + String get customLabelInMililitres => + localizedValues["custom-label-in-mililitres"][locale.languageCode]; String get amount_ => localizedValues["amount"][locale.languageCode]; - String get targetReach => localizedValues["target-reach"][locale.languageCode]; + String get targetReach => + localizedValues["target-reach"][locale.languageCode]; String get weekHeader => localizedValues["week-header"][locale.languageCode]; - String get monthHeader => localizedValues["month-header"][locale.languageCode]; - String get notifPermissionTitle => localizedValues["notif-permission-title"][locale.languageCode]; - String get notifPermissionMsg => localizedValues["notif-permission-msg"][locale.languageCode]; - String get verification_message_code => localizedValues["verification_message_code"][locale.languageCode]; + String get monthHeader => + localizedValues["month-header"][locale.languageCode]; + String get notifPermissionTitle => + localizedValues["notif-permission-title"][locale.languageCode]; + String get notifPermissionMsg => + localizedValues["notif-permission-msg"][locale.languageCode]; + String get verification_message_code => + localizedValues["verification_message_code"][locale.languageCode]; String get sms_code => localizedValues["sms_code"][locale.languageCode]; - String get code_failure => localizedValues["code_failure"][locale.languageCode]; + String get code_failure => + localizedValues["code_failure"][locale.languageCode]; String get resend => localizedValues["resend"][locale.languageCode]; - String get submitncontinue => localizedValues["submitncontinue"][locale.languageCode]; + String get submitncontinue => + localizedValues["submitncontinue"][locale.languageCode]; String get areyousure => localizedValues["areyousure"][locale.languageCode]; - String get preferredunit => localizedValues["preferredunit"][locale.languageCode]; // Offer And Packahes String get subT=> localizedValues['OffersAndPackages'][locale.languageCode]; String get totalWithColonRight => localizedValues['totalWithColonRight'][locale.languageCode]; + + String get preferredunit => + localizedValues["preferredunit"][locale.languageCode]; + String get trySaying => localizedValues["try-saying"][locale.languageCode]; + String get enterIdentificationNumber => + localizedValues["enterIdentificationNumber"][locale.languageCode]; + String get accountActivationDesc => + localizedValues["accountActivationDesc"][locale.languageCode]; + String get pointsToTransfer => + localizedValues["pointsToTransfer"][locale.languageCode]; + String get enterBeneficiaryAccountNo => + localizedValues["enterBeneficiaryAccountNo"][locale.languageCode]; + String get confirmPrescription => + localizedValues["confirm-prescription"][locale.languageCode]; + String get youAlreadyHaveOrder => + localizedValues["you-already-have-order"][locale.languageCode]; + String get orderOverview => + localizedValues["order-overview"][locale.languageCode]; + String get shippingAddresss => + localizedValues["shipping-address"][locale.languageCode]; + String get covidAlert => localizedValues["covid-alert"][locale.languageCode]; + String get pharmacyRelogin => + localizedValues["pharmacy-relogin"][locale.languageCode]; + String get onlineCheckInAgreement => + localizedValues["onlineCheckInAgreement"][locale.languageCode]; + String get chiefComplaints => + localizedValues["chiefComplaints"][locale.languageCode]; + String get errorChiefComplaints => + localizedValues["errorChiefComplaints"][locale.languageCode]; + String get expectedArrivalTime => + localizedValues["expectedArrivalTime"][locale.languageCode]; + String get errorExpectedArrivalTime => + localizedValues["errorExpectedArrivalTimes"][locale.languageCode]; + String get anicllaryOrders => + localizedValues["ancillary-orders"][locale.languageCode]; + String get mrn => localizedValues["MRN"][locale.languageCode]; + String get appointmentDate => + localizedValues["appointment-date"][locale.languageCode]; + String get appointmentNo => + localizedValues["appointment-no"][locale.languageCode]; + String get insuranceID => + localizedValues["insurance-id"][locale.languageCode]; + String get enterFile => localizedValues["enter-file"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 4a7eaead..9d8f5326 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -36,7 +36,8 @@ import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:url_launcher/url_launcher.dart'; import '../Constants.dart'; import 'app_shared_preferences.dart'; import 'app_toast.dart'; @@ -183,6 +184,14 @@ class Utils { // } } + static getPhoneNumberWithoutZero(String number) { + String newNumber = ""; + if (number.startsWith('0')) { + newNumber = number.substring(1); + } + return newNumber; + } + static Uint8List dataFromBase64String(String base64String) { return base64Decode(base64String); } @@ -193,7 +202,11 @@ class Utils { .hasMatch(email); } - static List myMedicalList({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) { + static List myMedicalList( + {ProjectViewModel projectViewModel, + BuildContext context, + bool isLogin, + count}) { List medical = List(); if (projectViewModel.havePrivilege(5)) { medical.add(InkWell( @@ -397,16 +410,16 @@ class Utils { )); } if (projectViewModel.havePrivilege(20)) - medical.add(InkWell( - onTap: () { - Navigator.push(context, FadePage(page: HomeReportPage())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).medical, - imagePath: 'medical_reports_icon.png', - subTitle: TranslationBase.of(context).medicalSubtitle, - ), - )); + medical.add(InkWell( + onTap: () { + Navigator.push(context, FadePage(page: HomeReportPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).medical, + imagePath: 'medical_reports_icon.png', + subTitle: TranslationBase.of(context).medicalSubtitle, + ), + )); if (projectViewModel.havePrivilege(19)) { medical.add(InkWell( @@ -468,16 +481,16 @@ class Utils { )); } if (projectViewModel.havePrivilege(30)) - medical.add(InkWell( - onTap: () { - Navigator.push(context, FadePage(page: SmartWatchInstructions())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).smartWatches, - imagePath: 'smartwatch_icon.png', - subTitle: TranslationBase.of(context).smartWatchesSubtitle, - ), - )); + medical.add(InkWell( + onTap: () { + Navigator.push(context, FadePage(page: SmartWatchInstructions())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).smartWatches, + imagePath: 'smartwatch_icon.png', + subTitle: TranslationBase.of(context).smartWatchesSubtitle, + ), + )); if (projectViewModel.havePrivilege(28)) { medical.add(InkWell( @@ -491,25 +504,29 @@ class Utils { ), )); } - if (projectViewModel.havePrivilege(32) || true) { + if (projectViewModel.havePrivilege(32) || true) { medical.add(InkWell( - onTap: () { - userData().then((userData_){ - if (projectViewModel.isLogin && userData_ != null) { - String patientID = userData_.patientID.toString(); - GifLoaderDialogUtils.showMyDialog(context); - projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}); - } else { - AlertDialogBox( - context: context, - confirmMessage: "Please login with your account first to use this feature", - okText: "OK", - okFunction: () { - AlertDialogBox.closeAlertDialog(context); - }).showAlertDialog(context); - } - }); - }, + onTap: () { + userData().then((userData_) { + if (projectViewModel.isLogin && userData_ != null) { + String patientID = userData_.patientID.toString(); + GifLoaderDialogUtils.showMyDialog(context); + projectViewModel + .platformBridge() + .connectHMGInternetWifi(patientID) + .then((value) => {GifLoaderDialogUtils.hideDialog(context)}); + } else { + AlertDialogBox( + context: context, + confirmMessage: + "Please login with your account first to use this feature", + okText: "OK", + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + }).showAlertDialog(context); + } + }); + }, child: MedicalProfileItem( title: TranslationBase.of(context).internet, imagePath: 'insurance_card_icon.png', @@ -520,10 +537,9 @@ class Utils { if (projectViewModel.havePrivilege(40)) { medical.add(InkWell( -// onTap: () { -// Navigator.push( -// context, FadePage(page: InsuranceApproval())); -// }, + onTap: () { + launch('whatsapp://send?phone=18885521858&text='); + }, child: MedicalProfileItem( title: TranslationBase.of(context).chatbot, imagePath: 'insurance_approvals_icon.png', @@ -573,7 +589,8 @@ Widget applyShadow({ Color color = Colors.grey, double shadowOpacity = 0.5, doub Future userData() async { - var userData = AuthenticatedUser.fromJson(await AppSharedPreferences().getObject(MAIN_USER)); + var userData = AuthenticatedUser.fromJson( + await AppSharedPreferences().getObject(MAIN_USER)); return userData; } diff --git a/lib/widgets/LoadingButton.dart b/lib/widgets/LoadingButton.dart index 8fef5271..46983903 100644 --- a/lib/widgets/LoadingButton.dart +++ b/lib/widgets/LoadingButton.dart @@ -3,6 +3,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'dart:math'; +import 'data_display/text.dart'; + class AnimatedButton extends StatefulWidget { AnimatedButton({ Key key, @@ -418,14 +420,10 @@ class _AnimatedTextState extends State _oldText, key: _textKey, style: widget.style, - overflow: TextOverflow.visible, - softWrap: false, ); final newText = Text( _newText, style: widget.style, - overflow: TextOverflow.visible, - softWrap: false, ); return AnimatedBuilder( diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index 107e730c..f33e9dd5 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -6,18 +6,22 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:provider/provider.dart'; import '../../d_q_icons_icons.dart'; import 'bottom_navigation_item.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; class BottomNavBar extends StatefulWidget { final ValueChanged changeIndex; - final int index ; - BottomNavBar({Key key, this.changeIndex,this.index}) : super(key: key); + final int index; + BottomNavBar({Key key, this.changeIndex, this.index}) : super(key: key); @override _BottomNavBarState createState() => _BottomNavBarState(); @@ -25,25 +29,12 @@ class BottomNavBar extends StatefulWidget { class _BottomNavBarState extends State { int _index = 0; - ToDoCountProviderModel model; - AuthenticatedUserObject authenticatedUserObject = - locator(); - - _changeIndex(int index) { - if (index != 4) - widget.changeIndex(index); - else { - if (authenticatedUserObject.isLogin) { - if (model.count != 0) { - widget.changeIndex(index); - } else { - AppToast.showErrorToast( - message: TranslationBase.of(context).upcomingEmpty); - } - } else { - widget.changeIndex(index); - } + var event = RobotProvider(); + _changeIndex(int index) async { + widget.changeIndex(index); + if (_index == 0) { + event.setValue({'isRobotVisible': 'true'}); } } @@ -57,79 +48,79 @@ class _BottomNavBarState extends State { color: Colors.white, child: Padding( padding: EdgeInsets.symmetric(horizontal: 18), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - BottomNavigationItem( - icon: EvaIcons.home, - activeIcon: EvaIcons.home, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 0, - name: TranslationBase.of(context).home, - ), - BottomNavigationItem( - icon: DQIcons.my_medical_file, - activeIcon: DQIcons.my_medical_file, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 1, - name: TranslationBase.of(context).medicalProfile, - ), - if(widget.index == 0 && projectViewModel.havePrivilege(34)) - Expanded( - child: SizedBox( - height: 50, - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: 22), - ], - ), - ), - ), - if(widget.index != 0 && projectViewModel.havePrivilege(34)) - BottomNavigationItem( - icon: EvaIcons.calendar, - activeIcon: EvaIcons.calendar, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 2, - name: TranslationBase.of(context).bookAppo, - ), - - BottomNavigationItem( - icon: DQIcons.family, - activeIcon: DQIcons.family, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 3, - name: TranslationBase.of(context).myFamily, - ), - if(projectViewModel.havePrivilege(51)) - BottomNavigationItem( - icon: EvaIcons.calendar, - activeIcon: EvaIcons.calendar, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 4, - name: TranslationBase.of(context).todoList, - ) - ], - ), + child: Directionality( + textDirection: TextDirection.ltr, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + BottomNavigationItem( + icon: DQIcons.my_medical_file, + activeIcon: DQIcons.my_medical_file, + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 1, + name: TranslationBase.of(context).medicalProfile, + ), + BottomNavigationItem( + icon: DQIcons.family, + activeIcon: DQIcons.family, + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 3, + name: TranslationBase.of(context).myFamily, + ), + if (widget.index == 0) + Expanded( + child: SizedBox( + height: 50, + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 22), + ], + ), + ), + ), + if (widget.index != 0 && projectViewModel.havePrivilege(34)) + BottomNavigationItem( + icon: EvaIcons.calendar, + activeIcon: EvaIcons.calendar, + changeIndex: _changeIndex, + index: _index, + currentIndex: 2, + name: TranslationBase.of(context).bookAppo, + ), + if (widget.index == 0 && projectViewModel.havePrivilege(34)) + BottomNavigationItem( + icon: EvaIcons.calendar, + activeIcon: EvaIcons.calendar, + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 4, + name: TranslationBase.of(context).todoList, + ), + if (projectViewModel.havePrivilege(77)) + BottomNavigationItem( + icon: DQIcons.roboticon, + activeIcon: DQIcons.roboticon, + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 0, + name: TranslationBase.of(context).help, + ) + ], + )), ), ); } Future navigateToBookingOptions(context) async { - Navigator.push( - context, MaterialPageRoute(builder: (context) => BookingOptions())); + Navigator.push(context, FadePage(page: BookingOptions())); } Future navigateToToDoList(context) async { - Navigator.push(context, - MaterialPageRoute(builder: (context) => ToDo(isShowAppBar: false))); + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: false))); } } diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index 391b6a3d..9a3bbafe 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -18,7 +18,8 @@ class BottomNavigationItem extends StatelessWidget { final int currentIndex; final String name; - AuthenticatedUserObject authenticatedUserObject = locator(); + AuthenticatedUserObject authenticatedUserObject = + locator(); BottomNavigationItem( {this.icon, @@ -52,7 +53,7 @@ class BottomNavigationItem extends StatelessWidget { child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor - : Theme.of(context).dividerColor, + : Colors.grey, size: 22.0), ), SizedBox( diff --git a/lib/widgets/buttons/button.dart b/lib/widgets/buttons/button.dart index 5d7c9257..331ce4b6 100644 --- a/lib/widgets/buttons/button.dart +++ b/lib/widgets/buttons/button.dart @@ -19,7 +19,7 @@ class Button extends StatefulWidget { this.onTap, this.backgroundColor, this.loading: false, - this.elevation: true}) + this.elevation: true, this.disabled=false}) : super(key: key); final String label; @@ -28,6 +28,7 @@ class Button extends StatefulWidget { final bool loading; final bool elevation; final Color backgroundColor; + final bool disabled; @override _ButtonState createState() => _ButtonState(); @@ -83,75 +84,78 @@ class _ButtonState extends State