Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into diplomatic-quarter-haroon

# Conflicts:
#	lib/main.dart
#	lib/pages/landing/home_page.dart
fix_login
haroon amjad 4 years ago
commit aeab57beab

@ -174,6 +174,34 @@
"online_payment_icon"
]
},
{
"uid": "3238628d101e2f79eeaaf407332b3052",
"css": "vital_sign_icon",
"code": 59405,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M1145 758.4A14.1 14.1 0 0 0 1130.9 772.5 51.9 51.9 0 0 1 1079 824.3H275.7A51.9 51.9 0 0 1 223.9 772.4V232.3A51.9 51.9 0 0 1 275.7 180.5H725.2A14.1 14.1 0 0 0 725.2 152.2H275.7A80.2 80.2 0 0 0 195.7 232.3V772.4A80.2 80.2 0 0 0 275.7 852.5H1079A80.2 80.2 0 0 0 1159.1 772.4 14.1 14.1 0 0 0 1145 758.4ZM1079 152.2H792.5A14.1 14.1 0 0 0 792.5 180.4H1079A51.9 51.9 0 0 1 1130.8 232.3V704.7A14.1 14.1 0 0 0 1159.1 704.7V232.3A80.2 80.2 0 0 0 1079 152.2ZM907.5 585V300.1A36.8 36.8 0 0 0 870.8 263.3H477A14.1 14.1 0 1 0 477 291.6H870.7A8.5 8.5 0 0 1 879.2 300.1V421.1H821.6L799.2 398.7A19.8 19.8 0 0 0 771.2 398.7L712 458 689.3 435.3A19.8 19.8 0 0 0 661.3 435.3L622.9 473.6 521.1 371.8A19.8 19.8 0 0 0 493.1 371.8L443.8 421.1H352.5V300.1A8.5 8.5 0 0 1 361 291.6H406.6A14.1 14.1 0 1 0 406.6 263.3H361A36.8 36.8 0 0 0 324.2 300.1V585A36.8 36.8 0 0 0 361 621.8H870.7A36.8 36.8 0 0 0 907.5 585ZM352.6 585V449.3H447.3A19.6 19.6 0 0 0 461.3 443.5L507.1 397.8 608.9 499.6A19.8 19.8 0 0 0 636.9 499.6L675.2 461.2 697.9 484A19.8 19.8 0 0 0 725.9 484L785.2 424.7 804 443.6A19.6 19.6 0 0 0 818 449.4H879.2V585.1A8.5 8.5 0 0 1 870.7 593.5H361.1A8.5 8.5 0 0 1 352.6 585.1ZM637.6 716.5A57.6 57.6 0 1 0 695.2 658.9 57.7 57.7 0 0 0 637.6 716.5ZM724.5 716.5A29.3 29.3 0 1 1 695.2 687.2 29.4 29.4 0 0 1 724.5 716.5ZM431.7 696.3A57.6 57.6 0 1 0 431.7 736.6 57.6 57.6 0 1 0 431.7 696.3ZM377.8 745.8A29.3 29.3 0 1 1 407.1 716.5 29.4 29.4 0 0 1 377.8 745.8ZM515 716.5A29.3 29.3 0 1 1 485.7 687.2 29.4 29.4 0 0 1 515 716.5Z",
"width": 1348
},
"search": [
"vital_sign_icon"
]
},
{
"uid": "e714a92298dafff5fead849df18d449b",
"css": "weight_icon",
"code": 59406,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M491.7 0A263 263 0 0 1 716.9 127Q794.5 140.1 882.6 162A131.3 131.3 0 0 1 982.2 303.3L922.3 881.9A132 132 0 0 1 791.4 1000.1H191.9A131.6 131.6 0 0 1 61 881.9L1.1 303.2A118.4 118.4 0 0 1 100.7 162Q184.1 141.4 266.3 127A263 263 0 0 1 491.7 0ZM240.1 185.1Q151.9 203.4 113.1 212.9A79.2 79.2 0 0 0 53.5 297.7L113.4 876.5A79.8 79.8 0 0 0 191.9 947.3H791.7A80.5 80.5 0 0 0 870.2 876.5L929.9 297.7A78.8 78.8 0 0 0 870.1 212.9Q817.9 200.2 743.1 185.2A253.9 253.9 0 0 1 754.8 263.2 263.1 263.1 0 0 1 228.5 263.2 252.6 252.6 0 0 1 240.1 185.1ZM491.7 52.5A210.5 210.5 0 1 0 702.2 263.1 211.1 211.1 0 0 0 491.7 52.5ZM491.7 105.1A27 27 0 0 1 518 131.3V262.9A26.3 26.3 0 0 1 491.7 289.2 25.9 25.9 0 0 1 465.4 262.9V131.6A26.3 26.3 0 0 1 491.7 105.1Z",
"width": 983
},
"search": [
"weight_icon"
]
},
{
"uid": "48c8955311a2a09660e070396941b78b",
"css": "search_medicine_icon",
@ -189,32 +217,46 @@
]
},
{
"uid": "3238628d101e2f79eeaaf407332b3052",
"css": "vital_sign_icon",
"code": 59405,
"uid": "2cfd058dc6a521015f26957251d5f9dd",
"css": "my_medical_file",
"code": 59407,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M1145 758.4A14.1 14.1 0 0 0 1130.9 772.5 51.9 51.9 0 0 1 1079 824.3H275.7A51.9 51.9 0 0 1 223.9 772.4V232.3A51.9 51.9 0 0 1 275.7 180.5H725.2A14.1 14.1 0 0 0 725.2 152.2H275.7A80.2 80.2 0 0 0 195.7 232.3V772.4A80.2 80.2 0 0 0 275.7 852.5H1079A80.2 80.2 0 0 0 1159.1 772.4 14.1 14.1 0 0 0 1145 758.4ZM1079 152.2H792.5A14.1 14.1 0 0 0 792.5 180.4H1079A51.9 51.9 0 0 1 1130.8 232.3V704.7A14.1 14.1 0 0 0 1159.1 704.7V232.3A80.2 80.2 0 0 0 1079 152.2ZM907.5 585V300.1A36.8 36.8 0 0 0 870.8 263.3H477A14.1 14.1 0 1 0 477 291.6H870.7A8.5 8.5 0 0 1 879.2 300.1V421.1H821.6L799.2 398.7A19.8 19.8 0 0 0 771.2 398.7L712 458 689.3 435.3A19.8 19.8 0 0 0 661.3 435.3L622.9 473.6 521.1 371.8A19.8 19.8 0 0 0 493.1 371.8L443.8 421.1H352.5V300.1A8.5 8.5 0 0 1 361 291.6H406.6A14.1 14.1 0 1 0 406.6 263.3H361A36.8 36.8 0 0 0 324.2 300.1V585A36.8 36.8 0 0 0 361 621.8H870.7A36.8 36.8 0 0 0 907.5 585ZM352.6 585V449.3H447.3A19.6 19.6 0 0 0 461.3 443.5L507.1 397.8 608.9 499.6A19.8 19.8 0 0 0 636.9 499.6L675.2 461.2 697.9 484A19.8 19.8 0 0 0 725.9 484L785.2 424.7 804 443.6A19.6 19.6 0 0 0 818 449.4H879.2V585.1A8.5 8.5 0 0 1 870.7 593.5H361.1A8.5 8.5 0 0 1 352.6 585.1ZM637.6 716.5A57.6 57.6 0 1 0 695.2 658.9 57.7 57.7 0 0 0 637.6 716.5ZM724.5 716.5A29.3 29.3 0 1 1 695.2 687.2 29.4 29.4 0 0 1 724.5 716.5ZM431.7 696.3A57.6 57.6 0 1 0 431.7 736.6 57.6 57.6 0 1 0 431.7 696.3ZM377.8 745.8A29.3 29.3 0 1 1 407.1 716.5 29.4 29.4 0 0 1 377.8 745.8ZM515 716.5A29.3 29.3 0 1 1 485.7 687.2 29.4 29.4 0 0 1 515 716.5Z",
"width": 1348
"path": "M730.5 105.5H609.8A88.9 88.9 0 0 0 531.4 58.6H469.3A78.1 78.1 0 0 0 318.2 58.6H256.1A88.9 88.9 0 0 0 177.7 105.5H58.6A58.8 58.8 0 0 0 0 164.1V941.6A58.8 58.8 0 0 0 58.6 1000.1H730.6A58.8 58.8 0 0 0 789.1 941.6V164.1A58.8 58.8 0 0 0 730.5 105.5ZM206.1 147.4A49.8 49.8 0 0 1 256 97.6H335A19.6 19.6 0 0 0 354.6 78.1 39.1 39.1 0 1 1 432.7 78.1 19.6 19.6 0 0 0 452.2 97.6H531.3A50 50 0 0 1 578.2 130.6C578.2 130.8 578.4 131 578.4 131.4A49.6 49.6 0 0 1 581.3 147.7V178.3A21 21 0 0 1 560.2 199.4H227.3A21 21 0 0 1 206.3 178.3ZM656.1 238.3V869.7H133.4V238.3ZM750 941.6A19.6 19.6 0 0 1 730.5 961.1H58.4A19.6 19.6 0 0 1 38.9 941.6V164.1A19.6 19.6 0 0 1 58.4 144.5H167V178.1A58.6 58.6 0 0 0 171 199.2H113.7A19.6 19.6 0 0 0 94.2 218.7V889.1A19.6 19.6 0 0 0 113.7 908.6H675.7A19.6 19.6 0 0 0 695.2 889.1V218.7A19.6 19.6 0 0 0 675.7 199.4H616.4A58.6 58.6 0 0 0 620.3 178.3V144.7H730.5A19.6 19.6 0 0 1 750 164.2ZM407.3 111.1A19.3 19.3 0 0 0 393.4 105.5 20.5 20.5 0 0 0 379.5 111.1 19.3 19.3 0 0 0 373.9 125 20.5 20.5 0 0 0 379.5 138.9 19.3 19.3 0 0 0 393.4 144.5 20.5 20.5 0 0 0 407.3 138.9 19.8 19.8 0 0 0 407.3 111.1ZM500 753.9H209.6A19.5 19.5 0 1 0 209.6 793H500A19.5 19.5 0 1 0 500 753.9ZM593 759.6A19.3 19.3 0 0 0 579.1 753.9 20.2 20.2 0 0 0 565.2 759.6 19.3 19.3 0 0 0 559.6 773.4 20.2 20.2 0 0 0 565.2 787.3 19.3 19.3 0 0 0 579.1 793 20.2 20.2 0 0 0 593 787.3 19.8 19.8 0 0 0 593 759.6ZM579.5 675.8H209.6A19.5 19.5 0 0 0 209.6 714.8H579.5A19.5 19.5 0 0 0 579.5 675.8ZM511.9 616.4H275.6A40.3 40.3 0 0 1 235.4 576.2V339.8A40.3 40.3 0 0 1 275.6 299.6H511.9A40.3 40.3 0 0 1 552.2 339.8V576.2A40.6 40.6 0 0 1 511.9 616.4ZM300.6 564.7L359.7 564.9C367.1 564.9 372.6 557.2 373 546.4V497.1C373 486.2 377.9 478.3 385.1 477.7L403.2 477.5C410.4 477.9 415.5 486.1 415.5 496.9V546.5C415.9 557.2 420.9 564.5 427.9 564.5L507.6 564.6 507.7 503.5C507.7 492.8 502.6 484.7 495.4 484.3L463.5 484.2C456.1 484.2 450.8 476.5 450.6 465.8L450.4 449.1C450.8 438.5 456.3 430.7 463.5 430.7H495.7C502.6 430.3 507.8 421.9 507.8 411.1V335.3A32.2 32.2 0 0 1 483.3 350.6H429.1C421.7 350.6 416.2 358.6 415.8 369.1V418.2C415.4 428.9 410 436.6 402.9 436.6L386.6 436.4C379.2 436.4 373.9 428.8 373.4 418.3V368.9C373 358.2 367.7 350.8 360.4 350.8H281.8V411.7C281.8 422.8 286.9 430.7 294.2 431.1L326.4 430.9C333.4 431.3 338.9 439.8 338.9 450.4V464.5C338.9 475.3 333.7 483.4 326.6 483.8H294.4C287 484.4 282.1 492.3 282.1 503.2L281.7 564.6Z",
"width": 789
},
"search": [
"vital_sign_icon"
"my_medical_file"
]
},
{
"uid": "e714a92298dafff5fead849df18d449b",
"css": "weight_icon",
"code": 59406,
"uid": "40c03b22028e1b34f230c522b40ca125",
"css": "family",
"code": 59408,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M491.7 0A263 263 0 0 1 716.9 127Q794.5 140.1 882.6 162A131.3 131.3 0 0 1 982.2 303.3L922.3 881.9A132 132 0 0 1 791.4 1000.1H191.9A131.6 131.6 0 0 1 61 881.9L1.1 303.2A118.4 118.4 0 0 1 100.7 162Q184.1 141.4 266.3 127A263 263 0 0 1 491.7 0ZM240.1 185.1Q151.9 203.4 113.1 212.9A79.2 79.2 0 0 0 53.5 297.7L113.4 876.5A79.8 79.8 0 0 0 191.9 947.3H791.7A80.5 80.5 0 0 0 870.2 876.5L929.9 297.7A78.8 78.8 0 0 0 870.1 212.9Q817.9 200.2 743.1 185.2A253.9 253.9 0 0 1 754.8 263.2 263.1 263.1 0 0 1 228.5 263.2 252.6 252.6 0 0 1 240.1 185.1ZM491.7 52.5A210.5 210.5 0 1 0 702.2 263.1 211.1 211.1 0 0 0 491.7 52.5ZM491.7 105.1A27 27 0 0 1 518 131.3V262.9A26.3 26.3 0 0 1 491.7 289.2 25.9 25.9 0 0 1 465.4 262.9V131.6A26.3 26.3 0 0 1 491.7 105.1Z",
"width": 983
"path": "M1255.3 571.5A27.7 27.7 0 0 0 1211.5 605.3 207.6 207.6 0 0 1 1255 733.1 27.7 27.7 0 1 0 1310.4 733.1 262.5 262.5 0 0 0 1255.3 571.5ZM1162.3 385.9A210.9 210.9 0 1 0 926.7 385.9 364.6 364.6 0 0 0 813.6 448.4 155.5 155.5 0 0 0 597.6 448.4 364.8 364.8 0 0 0 484.5 385.9 210.9 210.9 0 1 0 248.9 385.9 367.5 367.5 0 0 0 0 732.4C0 732.6 0 732.8 0 733.1 0 775.5 24.1 838.2 139.1 895.7A1060.2 1060.2 0 0 0 464.8 984.6 1904.1 1904.1 0 0 0 946.5 984.6 1059.9 1059.9 0 0 0 1272.3 895.7C1387.3 838.3 1411.4 775.6 1411.4 733.1A367.5 367.5 0 0 0 1162.3 385.9ZM889 211A155.5 155.5 0 1 1 1044.5 366.5 155.5 155.5 0 0 1 889.1 210.9ZM623 503.3A100.5 100.5 0 0 1 788.2 503.3H788.2A100.5 100.5 0 1 1 623 503.3ZM211.1 210.9A155.5 155.5 0 1 1 366.6 366.4 155.5 155.5 0 0 1 211.1 210.9ZM440.8 925.4A960.1 960.1 0 0 1 163.9 846.2C94.1 811.3 55.5 771.3 55.5 733.4 55.5 733.4 55.5 733.4 55.5 733.1A311.3 311.3 0 0 1 565.3 493.2 155.8 155.8 0 0 0 606.4 680.5 265.2 265.2 0 0 0 440.8 925.4ZM915.2 932.8A1857 1857 0 0 1 496.1 932.8V926A209.5 209.5 0 0 1 915.2 926ZM1247.4 846.2A959.9 959.9 0 0 1 970.5 925.4 265.3 265.3 0 0 0 805.1 680.3 155.7 155.7 0 0 0 846.2 493 311.3 311.3 0 0 1 1356 732.9C1356 771.1 1317.4 811.2 1247.4 846.2ZM1172.6 506.5A27.7 27.7 0 0 0 1172.6 561.8 27.7 27.7 0 0 0 1172.6 506.5Z",
"width": 1411
},
"search": [
"weight_icon"
"family"
]
},
{
"uid": "28e30de5c20857758e187ef8e56eddc1",
"css": "calendar-(2)",
"code": 59409,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M544.9 710.9A78.2 78.2 0 0 0 623 789H714.9A78.2 78.2 0 0 0 793 710.9V619.1A78.2 78.2 0 0 0 714.8 541H623A78.2 78.2 0 0 0 544.9 619.1ZM623 619.1H714.9V710.9H623ZM961 687.5A39 39 0 0 0 1000 648.5V234.4A156.4 156.4 0 0 0 843.8 78.1H793V39A39 39 0 0 0 714.8 39V78.1H537.1V39A39 39 0 1 0 459 39V78.1H283.2V39A39 39 0 1 0 205 39V78.1H156.3A156.4 156.4 0 0 0 0 234.4V843.8A156.4 156.4 0 0 0 156.3 1000H843.8A156.4 156.4 0 0 0 1000 843.8 39 39 0 0 0 921.9 843.8 78.2 78.2 0 0 1 843.7 921.9H156.3A78.2 78.2 0 0 1 78.1 843.8V234.4A78.2 78.2 0 0 1 156.3 156.3H205.1V195.5A39 39 0 0 0 283.2 195.5V156.3H459.1V195.5A39 39 0 0 0 537.2 195.5V156.3H715V195.5A39 39 0 0 0 793.1 195.5V156.3H843.9A78.2 78.2 0 0 1 922 234.4V648.5A39 39 0 0 0 961 687.5Z",
"width": 1000
},
"search": [
"calendar-(2)"
]
}
]
}
}

@ -286,6 +286,7 @@ const Map<String, Map<String, String>> localizedValues = {
"enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
"family": {"en": "My Family", "ar": "عائلتي"},
"family-title": {"en": "My Family Files", "ar": "ملفات العائلة"},
"myFamily": {"en": "My Family", "ar": "ملفات العائلة"},
"add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"},
"sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"},
"recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
@ -672,4 +673,8 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Drag point to change your age",
"ar": "اسحب لتغيير عمرك"
},
"Book": {"en": "Book", "ar": "احجز"},
"AppointmentLabel": {"en": "Appointment", "ar": "موعد"},
"BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"},
};

@ -7,7 +7,9 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
import '../../../locator.dart';
import '../../../routes.dart';
import '../AuthenticatedUserObject.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences();
@ -16,7 +18,8 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onSuccess: (dynamic response, int statusCode) {},
/// onFailure: (String error, int statusCode) {},
/// body: Map();
///
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
class BaseAppClient {
post(String endPoint,
{Map<String, dynamic> body,
@ -114,11 +117,15 @@ class BaseAppClient {
onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
logout();
}
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
}else if (!parsed['IsAuthenticated']) {
await logout();
//helpers.showErrorToast('Your session expired Please login agian');
} else {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
@ -141,7 +148,8 @@ class BaseAppClient {
logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID);
Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE);
await authenticatedUserObject.getUser();
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
}
String getSessionId(String id) {

@ -10,19 +10,23 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
class ProjectViewModel extends BaseViewModel {
AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale;
String currentLanguage = 'en';
Locale _appLocale = Locale('ar');
String currentLanguage = 'ar';
bool _isArabic = false;
bool isInternetConnection = true;
bool isLoading = false;
bool isError = false;
String error = '';
dynamic searchvalue;
dynamic get searchValue => searchvalue;
Locale get appLocal => _appLocale;
LocaleType get localeType => isArabic? LocaleType.en:LocaleType.ar;
LocaleType get localeType => isArabic ? LocaleType.en : LocaleType.ar;
bool get isArabic => _isArabic;
// BaseViewModel baseViewModel = locator<BaseViewModel>()
StreamSubscription subscription;
@ -48,11 +52,10 @@ class ProjectViewModel extends BaseViewModel {
}
void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_LANGUAGE);
_appLocale = Locale(currentLanguage ?? 'en');
_isArabic = currentLanguage != null
? currentLanguage == 'ar' ? true : false
: true;
currentLanguage =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage);
_isArabic = currentLanguage == 'ar';
notifyListeners();
}

@ -36,4 +36,7 @@ class DQIcons {
static const IconData search_medicine_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData vital_sign_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
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);
}

@ -71,8 +71,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: HexColor('#E9E9E9'),
// Colors.grey[100],
scaffoldBackgroundColor: Color(0xffEEEEEE),
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white,
@ -80,8 +79,7 @@ class MyApp extends StatelessWidget {
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Color(0xff40ACC9),
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: HexColor('#E0E0E0')),
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
cursorColor: Colors.grey,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
@ -89,11 +87,11 @@ class MyApp extends StatelessWidget {
brightness: Brightness.dark,
elevation: 10.0,
actionsIconTheme: IconThemeData(
color: Colors.grey[800],
color: Color(0xff40ACC9),
),
),
),
initialRoute: HOME,
initialRoute: SPLASH,
routes: routes,
debugShowCheckedModeBanner: false,
),

@ -235,7 +235,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
return children;
},
),
onDaySelected: (date, events) {
onDaySelected: (date, events,holidays) {
_onDaySelected(date, events);
_animationController.forward(from: 0.0);
},

@ -348,7 +348,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
return children;
},
),
onDaySelected: (date, event) {
onDaySelected: (date, event,holidays) {
_onDaySelected(date, event,);
_animationController.forward(from: 0.0);
},

@ -88,8 +88,9 @@ class _HomePageState extends State<HomePage> {
)
],
),
),
Container(width: double.infinity, height: 125),
Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110),
],
),
Positioned(
@ -107,7 +108,7 @@ class _HomePageState extends State<HomePage> {
child: (!model.isLogin && projectViewModel.user == null)
? Container(
width: double.infinity,
height: 180,
height: 160,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle,
@ -300,7 +301,7 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
"Height",
TranslationBase.of(context).height,
color: Colors.white,
fontSize: 10,
),
@ -332,7 +333,7 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
"Weight",
TranslationBase.of(context).weight,
color: Colors.white,
fontSize: 10,
)
@ -346,10 +347,8 @@ class _HomePageState extends State<HomePage> {
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/blood-drop.png',
@ -363,7 +362,7 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
),
Texts(
"Blood Type",
TranslationBase.of(context).bloodType,
color: Colors.white,
fontSize: 10,
)
@ -402,35 +401,28 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(
height: 15,
),
SizedBox(height: 15,),
Container(
width: 60,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/vital_sign_icon.png',
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/vital_sign_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
fit: BoxFit.contain,)),
),
SizedBox(height: 20,),
Texts(
TranslationBase.of(context).vitalSigns,
TranslationBase.of(context)
.vitalSigns,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
)
],
),
@ -458,35 +450,26 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(
height: 15,
),
SizedBox(height: 15,),
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/search_medicine_icon.png',
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/search_medicine_icon.png',
width: 50,
height: 50,
fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
fit: BoxFit.contain,)),
),
SizedBox(height: 20,),
Texts(
TranslationBase.of(context).searchMedicine,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
)
],
),
@ -498,9 +481,8 @@ class _HomePageState extends State<HomePage> {
),
),
Expanded(
child: DashboardItem(
opacity: 1.0,
onTap: () {
child: DashboardItem(opacity: 1.0,
onTap: (){
Navigator.push(
context,
FadePage(
@ -513,35 +495,25 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(
height: 15,
),
SizedBox(height: 15,),
Container(
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/online_payment_icon.png',
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/online_payment_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,
)),
),
SizedBox(
height: 15,
fit: BoxFit.contain,)),
),
SizedBox(height: 15,),
Texts(
TranslationBase.of(context)
.onlinePaymentService,
TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
)
],
),
@ -577,33 +549,34 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).myAppointments,
title: TranslationBase.of(context)
.myAppointments,
imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context)
.myAppointmentsList,
subTitle: TranslationBase.of(context).myAppointmentsList,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(
context, FadePage(page: LabsHomePage())),
onTap: () => Navigator.push(context,
FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png',
subTitle: TranslationBase.of(context).lab,
subTitle:
TranslationBase.of(context).lab,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(
context, FadePage(page: RadiologyHomePage())),
onTap: () => Navigator.push(context,
FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).radiology,
title: TranslationBase.of(context)
.radiology,
imagePath: 'radiology_icon.png',
subTitle: TranslationBase.of(context)
.radiologySubtitle,
@ -626,7 +599,8 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).medicines,
title: TranslationBase.of(context)
.medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
.medicinesSubtitle,
@ -645,7 +619,8 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor,
title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
@ -656,11 +631,12 @@ class _HomePageState extends State<HomePage> {
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context, FadePage(page: InsuranceCard()));
Navigator.push(context,
FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.insuranceSubtitle,
@ -669,6 +645,7 @@ class _HomePageState extends State<HomePage> {
),
],
),
],
),
),
@ -681,7 +658,7 @@ class _HomePageState extends State<HomePage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
opacity: 1.0,
opacity:1.0,
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
@ -691,11 +668,10 @@ class _HomePageState extends State<HomePage> {
Texts(
TranslationBase.of(context).hMGService,
color: Colors.white,
fontWeight: FontWeight.normal,
bold: true,
),
Texts(
TranslationBase.of(context)
.viewAllHabibMedicalService,
TranslationBase.of(context).viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
@ -706,23 +682,21 @@ class _HomePageState extends State<HomePage> {
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
//fontWeight: FontWeight.normal,
bold: true,
)
],
),
),
height: 100,
imageName: 'ask_doctor_bg.png',
//color: Colors.grey[700],
//color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())),
),
DashboardItem(
opacity: 1.0,
opacity:1.0,
onTap: () {
// Navigator.push(
// context, FadePage(page: FeedbackHomePage()));
Navigator.push(
context, FadePage(page: ContactUsPage()));
},
@ -735,13 +709,13 @@ class _HomePageState extends State<HomePage> {
Texts(
TranslationBase.of(context).contactUs,
color: Colors.white,
fontWeight: FontWeight.normal,
bold: true,
),
Texts(
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
fontSize: SizeConfig.textMultiplier * 1.0 ,
),
Expanded(
child: Container(),
@ -749,7 +723,7 @@ class _HomePageState extends State<HomePage> {
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.normal,
bold: true,
)
],
),
@ -806,9 +780,7 @@ class DashboardItem extends StatelessWidget {
this.width,
this.height,
this.color,
this.opacity = 1.0,
this.icon,
this.margin = 0})
this.opacity = 1.0,this.icon,this.margin=0})
: super(key: key);
final bool hasBorder;
final String imageName;

@ -12,20 +12,27 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/slide_up_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_svg/svg.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart';
import '../../locator.dart';
import 'home_page.dart';
@ -43,6 +50,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
int currentTab = 0;
PageController pageController;
ProjectViewModel projectProvider;
///inject the user data
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@ -125,137 +133,137 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
AppGlobal.context = context;
});
_requestIOSPermissions();
pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true);
if (Platform.isIOS) {
_firebaseMessaging.requestNotificationPermissions();
}
_firebaseMessaging.getToken().then((String token) {
sharedPref.setString(PUSH_TOKEN, token);
if (token != null) {
checkUserStatus(token);
}
requestPermissions();
}).catchError((err) {
print(err);
});
pageController = PageController(keepPage: true);
// _firebaseMessaging.setAutoInitEnabled(true);
//
// if (Platform.isIOS) {
// _firebaseMessaging.requestNotificationPermissions();
// }
//
// _firebaseMessaging.getToken().then((String token) {
// sharedPref.setString(PUSH_TOKEN, token);
// if (token != null) {
// checkUserStatus(token);
// }
// requestPermissions();
// }).catchError((err) {
// print(err);
// });
//_firebase Background message handler
// _firebaseMessaging.configure(
// onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message");
// print("onMessage: $message");
// print(message);
// print(message['name']);
// print(message['appointmentdate']);
//
// if (Platform.isIOS) {
// if (message['is_call'] == "true") {
// var route = ModalRoute.of(context);
//
// if (route != null) {
// print(route.settings.name);
// }
//
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap);
// LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData)))
// .then((value) {
// isPageNavigated = false;
// });
// }
// } else {
// print("Is Call Not Found iOS");
// }
// } else {
// print("Is Call Not Found iOS");
// }
//
// if (Platform.isAndroid) {
// if (message['data'].containsKey("is_call")) {
// var route = ModalRoute.of(context);
//
// if (route != null) {
// print(route.settings.name);
// }
//
// Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message['data']);
// print(myMap);
// LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData)))
// .then((value) {
// isPageNavigated = false;
// });
// }
// } else {
// print("Is Call Not Found Android");
// }
// } else {
// print("Is Call Not Found Android");
// }
// },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message");
// showDialog("onLaunch: $message");
// },
// onResume: (Map<String, dynamic> message) async {
// print("onResume: $message");
// print(message);
// print(message['name']);
// print(message['appointmentdate']);
//
// showDialog("onResume: $message");
//
// if (Platform.isIOS) {
// if (message['is_call'] == "true") {
// var route = ModalRoute.of(context);
//
// if (route != null) {
// print(route.settings.name);
// }
//
// Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message);
// print(myMap);
// LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData)))
// .then((value) {
// isPageNavigated = false;
// });
// }
// } else {
// print("Is Call Not Found iOS");
// }
// } else {
// print("Is Call Not Found iOS");
// }
// },
// _firebaseMessaging.configure(
// onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message");
// print("onMessage: $message");
// print(message);
// print(message['name']);
// print(message['appointmentdate']);
//
// if (Platform.isIOS) {
// if (message['is_call'] == "true") {
// var route = ModalRoute.of(context);
//
// if (route != null) {
// print(route.settings.name);
// }
//
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap);
// LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData)))
// .then((value) {
// isPageNavigated = false;
// });
// }
// } else {
// print("Is Call Not Found iOS");
// }
// } else {
// print("Is Call Not Found iOS");
// }
//
// if (Platform.isAndroid) {
// if (message['data'].containsKey("is_call")) {
// var route = ModalRoute.of(context);
//
// if (route != null) {
// print(route.settings.name);
// }
//
// Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message['data']);
// print(myMap);
// LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData)))
// .then((value) {
// isPageNavigated = false;
// });
// }
// } else {
// print("Is Call Not Found Android");
// }
// } else {
// print("Is Call Not Found Android");
// }
// },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message");
// showDialog("onLaunch: $message");
// },
// onResume: (Map<String, dynamic> message) async {
// print("onResume: $message");
// print(message);
// print(message['name']);
// print(message['appointmentdate']);
//
// showDialog("onResume: $message");
//
// if (Platform.isIOS) {
// if (message['is_call'] == "true") {
// var route = ModalRoute.of(context);
//
// if (route != null) {
// print(route.settings.name);
// }
//
// Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message);
// print(myMap);
// LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData)))
// .then((value) {
// isPageNavigated = false;
// });
// }
// } else {
// print("Is Call Not Found iOS");
// }
// } else {
// print("Is Call Not Found iOS");
// }
// },
// );
}
@ -331,55 +339,59 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// projectProvider = Provider.of(context);
// checkValue(projectProvider);
return Scaffold(
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Texts(getText(currentTab).toUpperCase(),bold: true,color: Colors.white,),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.menu),
color: Colors.white,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
),
actions: [
// IconButton(
// iconSize: 70,
// icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
// height: 100, width: 100, fit: BoxFit.cover),
// onPressed: () {
// triggerRobot();
// } //do something,
// )
],
centerTitle: true,
),
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(goToMyProfile: () {_changeCurrentTab(1);},),
MedicalProfilePage(),
BookingOptions(),
Container(),
ToDo(),
], // Please do not remove the BookingOptions from this array
),
title: Text(getText(currentTab).toUpperCase()),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.menu),
color: Colors.white,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
bottomNavigationBar: BottomNavBar(
changeIndex: _changeCurrentTab,
index: currentTab,
),
actions: [
// IconButton(
// iconSize: 70,
// icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
// height: 100, width: 100, fit: BoxFit.cover),
// onPressed: () {
// triggerRobot();
// } //do something,
// )
],
centerTitle: true,
),
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(goToMyProfile: () {_changeCurrentTab(1);},),
MedicalProfilePage(),
BookingOptions(),
Container(),
ToDo(),
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab, index: currentTab,),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: currentTab ==0? FloatingButton(
elevation: true,
onTap: () {
_changeCurrentTab(2);
}):null
);
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: currentTab == 0
? FloatingButton(
elevation: true,
onTap: () {
_changeCurrentTab(2);
})
: null);
}
triggerRobot() {
@ -395,10 +407,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
case 2:
return TranslationBase.of(context).bookAppo;
case 3:
return TranslationBase.of(context).mySchedule;
return TranslationBase.of(context).myFamily;
case 4:
return TranslationBase.of(context).services;
}
}

@ -65,18 +65,13 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Container(
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
'assets/images/timeline_bg.png'),
fit: BoxFit.cover),
),
child: Stack(
children: <Widget>[
Image.asset(
'assets/images/timeline_bg.png',
fit: BoxFit.cover,
width: double.infinity,
// color: Colors.black.withOpacity(0.0)
),
if(model.authenticatedUserObject.isLogin)
ListView.builder(
@ -182,48 +177,52 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Navigator.push(
context,
FadePage(
page: HomePrescriptionsPage(),
page: DoctorHomePage(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.medicines,
imagePath: 'prescription_icon.png',
.myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context)
.medicinesSubtitle,
.myDoctorSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: VitalSignDetailsScreen(),
),
),
onTap: () {
Navigator.push(
context,
FadePage(
page: HomePrescriptionsPage(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.vitalSigns,
imagePath: 'vital_signs.png',
.medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
.vitalSignsSubtitle,
.medicinesSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: ActiveMedicationsPage())),
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myMedical,
imagePath: 'active_medications.png',
.insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.myMedicalSubtitle,
.insuranceSubtitle,
),
),
),
@ -234,20 +233,12 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
);
},
onTap:()=> Navigator.push(context, FadePage(page: AllergiesPage())) ,
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png',
title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
.allergiesSubtitle,
),
),
),
@ -258,13 +249,13 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Navigator.push(
context,
FadePage(
page: EyeMeasurementsPage()));
page: PatientSickLeavePage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png',
title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png',
subTitle: TranslationBase.of(context)
.eyeSubtitle,
.sickSubtitle,
),
),
),
@ -273,82 +264,20 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceCard()));
FadePage(page: InsuranceApproval()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png',
.insuranceApproval,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context)
.insuranceSubtitle,
.insuranceApprovalSubtitle,
),
),
),
],
),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.updateInsurance,
imagePath: 'insurance_update_icon_.png',
subTitle: TranslationBase.of(context)
.updateInsuranceSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceApproval()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insuranceApproval,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context)
.insuranceApprovalSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap:()=> Navigator.push(context, FadePage(page: AllergiesPage())) ,
child: MedicalProfileItem(
title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png',
subTitle: TranslationBase.of(context)
.allergiesSubtitle,
),
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: MyVaccines()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myVaccines,
imagePath: 'my_vaccines_icon.png',
subTitle: TranslationBase.of(context)
.myVaccinesSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
@ -358,164 +287,17 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).medical,
TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context)
.medicalSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: MonthlyReportsPage()));
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png',
subTitle: TranslationBase.of(context)
.monthlySubtitle,
),
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: PatientSickLeavePage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png',
subTitle: TranslationBase.of(context)
.sickSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: MyBalancePage()));
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).myBalance,
imagePath: 'check-in.png',
subTitle: TranslationBase.of(context)
.myBalanceSubtitle,
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
title:
TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png',
subTitle: TranslationBase.of(context)
.patientCallSubtitle,
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
//TODO
onTap: () {
Navigator.push(
context, FadePage(page: SmartWatchInstructions()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.smartWatches,
imagePath: 'smartwatch_icon.png',
subTitle: TranslationBase.of(context)
.smartWatchesSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: MyTrackers()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myTrackers,
imagePath: 'my_tracker_icon.png',
subTitle: TranslationBase.of(context)
.myTrackersSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: (){
Navigator.push(context,
FadePage(page: AskDoctorHomPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).askYour,
imagePath: 'ask_doctor_icon.png',
subTitle: TranslationBase.of(context)
.askYourSubtitle,
),
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
title:
TranslationBase.of(context).internet,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.internetSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
// onTap: () {
// Navigator.push(
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
title:
TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context)
.chatbotSubtitle,
),
),
),
Expanded(
flex: 1,
child: Container(),
),
Expanded(child: Container(),),
Expanded(child: Container(),),
]),
SizedBox(height: MediaQuery.of(context).size.height * 0.12,)
],
),
@ -553,6 +335,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
" " +
model.user.lastName,
color: Colors.white,
bold: true,
),
Texts(

@ -13,9 +13,11 @@ import 'package:diplomaticquarterapp/pages/family/add-family-member.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/symtom-checker.dart';
import 'package:diplomaticquarterapp/splashPage.dart';
const String INIT_ROUTE = '/';
const String HOME = '/';
const String HOME = 'home';
const String SPLASH = '/';
const String LOGIN = 'login';
const String WELCOME_LOGIN = 'welcome-login';
const String LOGIN_TYPE = 'login-type';
@ -32,6 +34,7 @@ const String SYMPTOM_CHECKER = 'symptom-checker';
const String SYMPTOM_CHECKER_INFO = 'symptom-checker-info';
const String SELECT_GENDER = 'select-gender';
var routes = {
SPLASH: (_) => SplashScreen(),
HOME: (_) => LandingPage(),
WELCOME_LOGIN: (_) => WelcomeLogin(),
LOGIN_TYPE: (_) => LoginType(),

@ -0,0 +1,36 @@
import 'dart:async';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:flutter/material.dart';
class SplashScreen extends StatefulWidget {
@override
_SplashScreenState createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
super.initState();
Timer(
Duration(seconds: 3),
() => Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => LandingPage(),
),
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Center(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset('assets/images/DQ/DQ_logo.png'),
),
),
);
}
}

@ -373,8 +373,8 @@ 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 =>
@ -728,6 +728,9 @@ class TranslationBase {
String get selectAge => localizedValues['select-age'][locale.languageCode];
String get iAm => localizedValues['i-am'][locale.languageCode];
String get yearOld => localizedValues['years-old'][locale.languageCode];
String get book => localizedValues['Book'][locale.languageCode];
String get appointmentLabel => localizedValues['AppointmentLabel'][locale.languageCode];
String get bloodType => localizedValues['BloodType'][locale.languageCode];
String get loginToUseService => localizedValues['loginToUseService'][locale.languageCode];
}

@ -5,6 +5,7 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../d_q_icons_icons.dart';
import 'bottom_navigation_item.dart';
class BottomNavBar extends StatefulWidget {
@ -44,8 +45,8 @@ class _BottomNavBarState extends State<BottomNavBar> {
name: TranslationBase.of(context).home,
),
BottomNavigationItem(
icon: EvaIcons.list,
activeIcon: EvaIcons.list,
icon: DQIcons.my_medical_file,
activeIcon: DQIcons.my_medical_file,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 1,
@ -67,7 +68,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
if(widget.index != 0)
BottomNavigationItem(
icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendarOutline,
activeIcon: EvaIcons.calendar,
changeIndex: _changeIndex,
index: _index,
currentIndex: 2,
@ -75,12 +76,12 @@ class _BottomNavBarState extends State<BottomNavBar> {
),
BottomNavigationItem(
icon: EvaIcons.person,
activeIcon: EvaIcons.person,
icon: DQIcons.family,
activeIcon: DQIcons.family,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 3,
name: TranslationBase.of(context).mySchedule,
name: TranslationBase.of(context).myFamily,
),
BottomNavigationItem(
icon: EvaIcons.calendar,

@ -1,24 +1,19 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
/// Button widget
/// [label] button label
/// [icon] button icon its optional
/// FloatingButton widget
/// [onTap] button function
/// [loading] show the progress indicator
/// [elevation] color elevation value
class FloatingButton extends StatefulWidget {
FloatingButton(
{Key key,
this.onTap,
this.elevation: true})
: super(key: key);
FloatingButton({Key key, this.onTap, this.elevation: true}) : super(key: key);
final VoidCallback onTap;
final bool elevation;
@override
_FloatingButtonState createState() => _FloatingButtonState();
}
@ -54,9 +49,9 @@ class _FloatingButtonState extends State<FloatingButton>
super.dispose();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return (GestureDetector(
onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0);
@ -74,9 +69,9 @@ class _FloatingButtonState extends State<FloatingButton>
child: AnimatedContainer(
duration: Duration(milliseconds: 150),
margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.symmetric(vertical: 22, horizontal: 22),
padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.0)),
borderRadius: BorderRadius.all(Radius.circular(54.0)),
color: Theme.of(context).primaryColor,
boxShadow: [
BoxShadow(
@ -87,29 +82,29 @@ class _FloatingButtonState extends State<FloatingButton>
offset: Offset(0, 7.0),
blurRadius: 55.0)
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
child: Center(
child: Column(
children: [
//TODO change the icon
Image.asset("assets/images/blood-drop.png", fit: BoxFit.cover),
Texts('BOOK',bold: true,color: Colors.white,),
Texts('APPPINTEMNT',color: Colors.white,fontSize: 7,),
],
),
child: Container(
child: Column(
children: [
Icon(EvaIcons.calendar,color: Colors.white,size: 23,),
Texts(
TranslationBase.of(context).book,
bold: !projectViewModel.isArabic,
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 17,
),
width: 50,
height: 50,
decoration: BoxDecoration(
shape: BoxShape.circle,
Texts(
TranslationBase.of(context).appointmentLabel,
bold: projectViewModel.isArabic,
color: Colors.white,
fontSize:projectViewModel.isArabic ? 8.8 : 8,
),
)
],
],
),
width: 54,
height: 54,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
),
)),
));

@ -18,7 +18,7 @@ class SecondaryButton extends StatefulWidget {
this.label = "",
this.icon,
this.iconOnly = false,
this.color:const Color.fromRGBO(63, 72, 74, 1),
this.color ,
this.textColor,
this.onTap,
this.loading: false,
@ -185,7 +185,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
height: MediaQuery.of(context).size.width * 2.2,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: widget.color,
color: widget.color?? Theme.of(context).primaryColor,
),
),
),

@ -37,14 +37,7 @@ class MedicalProfileItem extends StatelessWidget {
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(text: subTitle),
],
),
),
Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,),
Align(
alignment: Alignment.bottomRight,
child: Image.asset(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -6,6 +7,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class TimeLineWidget extends StatelessWidget {
final bool isUp;
@ -15,6 +17,7 @@ class TimeLineWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Stack(
children: <Widget>[
Container(
@ -24,14 +27,14 @@ class TimeLineWidget extends StatelessWidget {
child: Center(
child: Divider(
color: Colors.white,
height: 3,
thickness: 3,
height: 2,
thickness: 2,
),
),
),
if (isUp)
Positioned(
top: 15,
top: projectViewModel.isArabic ? 15 : 18,
child: Container(
margin: EdgeInsets.only(left: 2, right: 2),
child: Column(
@ -58,15 +61,15 @@ class TimeLineWidget extends StatelessWidget {
),
Container(
height: 20,
width: 3,
width: 2,
color: Colors.white,
),
Container(
width: 15,
height: 15,
decoration: BoxDecoration(
color: Colors.yellow[700],
border: Border.all(color: Colors.yellow[700], width: 2),
color: Theme.of(context).primaryColor,
border: Border.all(color: Theme.of(context).primaryColor, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(25.0),
@ -90,7 +93,7 @@ class TimeLineWidget extends StatelessWidget {
)
else
Positioned(
top: 65,
top:projectViewModel.isArabic ? 63 : 70,
child: Container(
margin: EdgeInsets.only(left: 2, right: 2),
child: Column(
@ -110,8 +113,8 @@ class TimeLineWidget extends StatelessWidget {
width: 15,
height: 15,
decoration: BoxDecoration(
color: Colors.yellow[700],
border: Border.all(color: Colors.yellow[700], width: 2),
color: Theme.of(context).primaryColor,
border: Border.all(color: Theme.of(context).primaryColor, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(25.0),
@ -120,7 +123,7 @@ class TimeLineWidget extends StatelessWidget {
),
Container(
height: 20,
width: 3,
width: 2,
color: Colors.white,
),
LargeAvatar(

@ -70,7 +70,7 @@ class AppScaffold extends StatelessWidget {
),
title: Texts(authenticatedUserObject.isLogin || !isShowDecPage
? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle,color: Colors.white,),
: TranslationBase.of(context).serviceInformationTitle,color: Colors.white,bold: true,),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();

@ -16,11 +16,7 @@ class ArrowBack extends StatelessWidget {
onTap: Feedback.wrapForTap(() {
onTap != null ? onTap() : Navigator.pop(context);
}, context),
child: Icon(
projectViewModel.isArabic
? Icons.arrow_forward_ios
: Icons.arrow_back_ios,
color: Colors.white),
child: Icon(Icons.arrow_back_ios, color: Colors.white),
);
}
}

@ -46,8 +46,8 @@ class NotAutPage extends StatelessWidget {
height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50,
child: Image.asset(projectViewModel.isArabic
? 'assets/images/wifi-EN.png'
: 'assets/images/Wifi-AR.png'),
? 'assets/images/Wifi-AR.png'
: 'assets/images/wifi-EN.png'),
),
),
SizedBox(

Loading…
Cancel
Save