Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into fix_product_tile

 Conflicts:
	lib/pages/pharmacy/profile/profile.dart
merge-requests/421/head
Mohammad Aljammal 4 years ago
commit b64a5b29c5

@ -271,6 +271,184 @@
"search": [
"roboticon"
]
},
{
"uid": "8ce732688587909ad0a9d8323eaca8ad",
"css": "marquee",
"code": 59590,
"src": "fontelico"
},
{
"uid": "ec8496ef645f3be7b28147ec60cd9ab1",
"css": "crown-minus",
"code": 59589,
"src": "fontelico"
},
{
"uid": "36ef9feb0754335302784521267a9ad4",
"css": "crown-plus",
"code": 59588,
"src": "fontelico"
},
{
"uid": "186dec7a13156bbe2550790c158fb85d",
"css": "crown",
"code": 59587,
"src": "fontelico"
},
{
"uid": "2a46f1d1c9bd036e17a74e46613c1636",
"css": "ie",
"code": 59586,
"src": "fontelico"
},
{
"uid": "9c2b737b16ae2c8d66b7bfd29ba5ecd8",
"css": "chrome",
"code": 59584,
"src": "fontelico"
},
{
"uid": "45861dd1e5ce4fde338bcccf01eeb808",
"css": "opera",
"code": 59585,
"src": "fontelico"
},
{
"uid": "2bd5f98482d86649958312ea2ab5bb40",
"css": "emo-laugh",
"code": 59576,
"src": "fontelico"
},
{
"uid": "fc92480dedc439d274d4e3e4b425edf4",
"css": "emo-squint",
"code": 59575,
"src": "fontelico"
},
{
"uid": "4843d0d6050dd508d4c101a334f46db2",
"css": "emo-shoot",
"code": 59574,
"src": "fontelico"
},
{
"uid": "04688d76a33ce7a7950e40fae79c08ac",
"css": "emo-cry",
"code": 59573,
"src": "fontelico"
},
{
"uid": "e4b163acaaa08255819f2f78afe8f075",
"css": "cart_menu_icon",
"code": 59412,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M367.1 624.3H972.6A33.2 33.2 0 0 0 1004.7 601.7L1138.2 164.7A29.6 29.6 0 0 0 1132.9 137.3 34.3 34.3 0 0 0 1106.3 124.9H289.9L266.3 24.5A33 33 0 0 0 233.7 0H33.4A32.4 32.4 0 0 0 0 31.2 32.4 32.4 0 0 0 33.4 62.4H206.9L327.4 569.6A93.8 93.8 0 0 0 267.1 655.5 97.1 97.1 0 0 0 367.2 749.1H972.6A31.3 31.3 0 1 0 972.6 686.7H367.2A31.3 31.3 0 1 1 367.2 624.3ZM1061.9 187.3L947.4 561.9H394L305 187.3ZM1061.9 187.3M315.3 894.6A105.4 105.4 0 1 0 420.7 789.2 105.4 105.4 0 0 0 315.3 894.6ZM420.7 859.4A35.2 35.2 0 1 1 385.6 894.6 35.2 35.2 0 0 1 420.7 859.4ZM420.7 859.4M735.4 894.6A105.4 105.4 0 1 0 840.9 789.2 105.4 105.4 0 0 0 735.4 894.6ZM840.9 859.4A35.2 35.2 0 1 1 805.7 894.6 35.2 35.2 0 0 1 840.9 859.4ZM840.9 859.4",
"width": 1140
},
"search": [
"cart_menu_icon"
]
},
{
"uid": "45f50872f02e050e19f0910ca3e0e8e6",
"css": "categories_menu_icon",
"code": 59413,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M332.7 458.9H126.3A126.3 126.3 0 0 1 0 332.7V126.3A126.3 126.3 0 0 1 126.3 0H332.7A126.3 126.3 0 0 1 459 126.3V332.7A126.3 126.3 0 0 1 332.7 458.9ZM126.3 61.2A65.1 65.1 0 0 0 61.2 126.3V332.7A65.1 65.1 0 0 0 126.3 397.8H332.7A65.1 65.1 0 0 0 397.8 332.7V126.3A65.1 65.1 0 0 0 332.7 61.2ZM873.8 458.9H667.3A126.3 126.3 0 0 1 541 332.6V126.3A126.3 126.3 0 0 1 667.3 0H873.9A126.3 126.3 0 0 1 1000.2 126.3V332.7A126.3 126.3 0 0 1 873.8 458.9ZM667.3 61.2A65.1 65.1 0 0 0 602.2 126.3V332.7A65.1 65.1 0 0 0 667.3 397.8H873.9A65.1 65.1 0 0 0 938.9 332.7V126.3A65.1 65.1 0 0 0 873.9 61.3ZM332.7 999.9H126.3A126.3 126.3 0 0 1 0 873.7V667.3A126.3 126.3 0 0 1 126.3 541H332.7A126.3 126.3 0 0 1 459 667.3V873.9A126.3 126.3 0 0 1 332.7 999.9ZM126.3 602.2A65.1 65.1 0 0 0 61.2 667.3V873.9A65.1 65.1 0 0 0 126.3 938.8H332.7A65.1 65.1 0 0 0 397.8 873.8V667.3A65.1 65.1 0 0 0 332.7 602.3ZM873.8 999.9H667.3A126.3 126.3 0 0 1 541 873.7V667.3A126.3 126.3 0 0 1 667.3 541H873.8A126.3 126.3 0 0 1 1000.1 667.3V873.9A126.3 126.3 0 0 1 873.8 999.9ZM667.3 602.2A65.1 65.1 0 0 0 602.2 667.3V873.9A65.1 65.1 0 0 0 667.3 938.8H873.8A65.1 65.1 0 0 0 938.8 873.8V667.3A65.1 65.1 0 0 0 873.8 602.3Z",
"width": 1000
},
"search": [
"categories_menu_icon"
]
},
{
"uid": "de65d94899c08a719eb8f9b723f73fc4",
"css": "hmg_logo_icon",
"code": 59414,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M146 835.7S180.9 835.5 205.5 835.5L392.2 836.4C414.4 836.4 433 812.7 434 778.5L434 622.5C434 589.3 448.9 563.3 472 561.7L529.2 561.2C552.3 562.7 568.1 588.9 568.1 622L568.1 778.9C569.2 813.1 584.7 835.5 607.1 835.5L858.4 836.1 858.8 643.3C858.8 610.2 842.9 584.4 819.8 583L718.8 582.5C696.5 582.5 678.9 558.9 677.9 524.7L677.5 472.6C678.6 438.4 696.4 414.8 718.7 414.8L820.2 415.1C843.3 413.6 858.3 386.4 858.3 353.3L858.5 112.8A102.4 102.4 0 0 1 780.8 161.4L610.2 161.4C587.9 161.4 569.4 185.7 568.3 219.9V374.6C567.2 408.8 549.8 432.9 527.5 432.9L475.8 432C453.4 432 435.6 408.6 434.5 374.7L434.5 218.4C433.4 184.3 415.6 161.2 393.4 161.2L145.6 161.2 145.6 353.4C145.6 386.6 161.2 413.1 184.3 414.7L285.8 414.3C308.8 415.8 325.1 443.2 325.1 476.2L324.8 520.7C324.8 553.8 309.1 580.4 286 581.9L184.3 581.7C161.2 583.3 145.6 609.5 145.6 642.6ZM999.3 99.1V902.8A102.2 102.2 0 0 1 896 1000H102.8A101.9 101.9 0 0 1 0 902.8L0 97.6A102.3 102.3 0 0 1 103 0L895.4 0.3A104 104 0 0 1 999.3 99.1Z",
"width": 999
},
"search": [
"hmg_logo_icon"
]
},
{
"uid": "baf8798b7336aad03b1d61cacc015142",
"css": "user_menu_icon",
"code": 59415,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M853.6 146.4A500 500 0 0 0 146.4 853.6 500 500 0 0 0 853.6 146.4ZM217 838.5A286.1 286.1 0 0 1 500 586.7 285 285 0 0 1 783 838.5 440.5 440.5 0 0 1 217 838.5ZM500 526.3A151.8 151.8 0 1 1 651.8 374.5 152.1 152.1 0 0 1 500 526.3ZM833.4 788.8A344.4 344.4 0 0 0 617.6 548.7 210.5 210.5 0 1 0 382.1 548.7 344.2 344.2 0 0 0 166.3 788.7 441.4 441.4 0 1 1 833.2 788.7ZM833.4 788.8",
"width": 1000
},
"search": [
"user_menu_icon"
]
},
{
"uid": "d3f621623139837ff2fb5fe09cf16994",
"css": "cart_menu_icon-1",
"code": 59416,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M367.1 624.3H972.6A33.2 33.2 0 0 0 1004.7 601.7L1138.2 164.7A29.6 29.6 0 0 0 1132.9 137.3 34.3 34.3 0 0 0 1106.3 124.9H289.9L266.3 24.5A33 33 0 0 0 233.7 0H33.4A32.4 32.4 0 0 0 0 31.2 32.4 32.4 0 0 0 33.4 62.4H206.9L327.4 569.6A93.8 93.8 0 0 0 267.1 655.5 97.1 97.1 0 0 0 367.2 749.1H972.6A31.3 31.3 0 1 0 972.6 686.7H367.2A31.3 31.3 0 1 1 367.2 624.3ZM1061.9 187.3L947.4 561.9H394L305 187.3ZM1061.9 187.3M315.3 894.6A105.4 105.4 0 1 0 420.7 789.2 105.4 105.4 0 0 0 315.3 894.6ZM420.7 859.4A35.2 35.2 0 1 1 385.6 894.6 35.2 35.2 0 0 1 420.7 859.4ZM420.7 859.4M735.4 894.6A105.4 105.4 0 1 0 840.9 789.2 105.4 105.4 0 0 0 735.4 894.6ZM840.9 859.4A35.2 35.2 0 1 1 805.7 894.6 35.2 35.2 0 0 1 840.9 859.4ZM840.9 859.4",
"width": 1140
},
"search": [
"cart_menu_icon"
]
},
{
"uid": "6aac6f399374da0b9c4811b6a7110627",
"css": "categories_menu_icon-1",
"code": 59417,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M332.7 458.9H126.3A126.3 126.3 0 0 1 0 332.7V126.3A126.3 126.3 0 0 1 126.3 0H332.7A126.3 126.3 0 0 1 459 126.3V332.7A126.3 126.3 0 0 1 332.7 458.9ZM126.3 61.2A65.1 65.1 0 0 0 61.2 126.3V332.7A65.1 65.1 0 0 0 126.3 397.8H332.7A65.1 65.1 0 0 0 397.8 332.7V126.3A65.1 65.1 0 0 0 332.7 61.2ZM873.8 458.9H667.3A126.3 126.3 0 0 1 541 332.6V126.3A126.3 126.3 0 0 1 667.3 0H873.9A126.3 126.3 0 0 1 1000.2 126.3V332.7A126.3 126.3 0 0 1 873.8 458.9ZM667.3 61.2A65.1 65.1 0 0 0 602.2 126.3V332.7A65.1 65.1 0 0 0 667.3 397.8H873.9A65.1 65.1 0 0 0 938.9 332.7V126.3A65.1 65.1 0 0 0 873.9 61.3ZM332.7 999.9H126.3A126.3 126.3 0 0 1 0 873.7V667.3A126.3 126.3 0 0 1 126.3 541H332.7A126.3 126.3 0 0 1 459 667.3V873.9A126.3 126.3 0 0 1 332.7 999.9ZM126.3 602.2A65.1 65.1 0 0 0 61.2 667.3V873.9A65.1 65.1 0 0 0 126.3 938.8H332.7A65.1 65.1 0 0 0 397.8 873.8V667.3A65.1 65.1 0 0 0 332.7 602.3ZM873.8 999.9H667.3A126.3 126.3 0 0 1 541 873.7V667.3A126.3 126.3 0 0 1 667.3 541H873.8A126.3 126.3 0 0 1 1000.1 667.3V873.9A126.3 126.3 0 0 1 873.8 999.9ZM667.3 602.2A65.1 65.1 0 0 0 602.2 667.3V873.9A65.1 65.1 0 0 0 667.3 938.8H873.8A65.1 65.1 0 0 0 938.8 873.8V667.3A65.1 65.1 0 0 0 873.8 602.3Z",
"width": 1000
},
"search": [
"categories_menu_icon"
]
},
{
"uid": "0a4cf1ff2671b9ea852d635e27df1e69",
"css": "hmg_logo_icon-1",
"code": 59418,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M146 835.7S180.9 835.5 205.5 835.5L392.2 836.4C414.4 836.4 433 812.7 434 778.5L434 622.5C434 589.3 448.9 563.3 472 561.7L529.2 561.2C552.3 562.7 568.1 588.9 568.1 622L568.1 778.9C569.2 813.1 584.7 835.5 607.1 835.5L858.4 836.1 858.8 643.3C858.8 610.2 842.9 584.4 819.8 583L718.8 582.5C696.5 582.5 678.9 558.9 677.9 524.7L677.5 472.6C678.6 438.4 696.4 414.8 718.7 414.8L820.2 415.1C843.3 413.6 858.3 386.4 858.3 353.3L858.5 112.8A102.4 102.4 0 0 1 780.8 161.4L610.2 161.4C587.9 161.4 569.4 185.7 568.3 219.9V374.6C567.2 408.8 549.8 432.9 527.5 432.9L475.8 432C453.4 432 435.6 408.6 434.5 374.7L434.5 218.4C433.4 184.3 415.6 161.2 393.4 161.2L145.6 161.2 145.6 353.4C145.6 386.6 161.2 413.1 184.3 414.7L285.8 414.3C308.8 415.8 325.1 443.2 325.1 476.2L324.8 520.7C324.8 553.8 309.1 580.4 286 581.9L184.3 581.7C161.2 583.3 145.6 609.5 145.6 642.6ZM999.3 99.1V902.8A102.2 102.2 0 0 1 896 1000H102.8A101.9 101.9 0 0 1 0 902.8L0 97.6A102.3 102.3 0 0 1 103 0L895.4 0.3A104 104 0 0 1 999.3 99.1Z",
"width": 999
},
"search": [
"hmg_logo_icon"
]
},
{
"uid": "d19eb878f1dee49848276b6d0faa6602",
"css": "wishlist_menu_icon",
"code": 59411,
"src": "custom_icons",
"selected": false,
"svg": {
"path": "M877.6 0A394.8 394.8 0 0 0 600.7 112.2 394.8 394.8 0 0 0 323.8 0 332.4 332.4 0 0 0 0 349 515.4 515.4 0 0 0 138.3 679.5 1351.1 1351.1 0 0 0 580.3 995.3 46.9 46.9 0 0 0 621.1 995.3 1351.1 1351.1 0 0 0 1063.1 679.5 515.4 515.4 0 0 0 1201.4 349 332.5 332.5 0 0 0 877.6 0ZM991.8 618.5A1233.8 1233.8 0 0 1 600.7 900.8 1233.7 1233.7 0 0 1 209.5 618.5 418.4 418.4 0 0 1 93.8 349 239.1 239.1 0 0 1 323.8 93.8 297.2 297.2 0 0 1 500.6 150.7 283.5 283.5 0 0 1 562 209.5 46.5 46.5 0 0 0 600.5 230H600.5A46.9 46.9 0 0 0 639.1 209.3 301.2 301.2 0 0 1 877.2 93.8 239.2 239.2 0 0 1 1107.1 349 418.4 418.4 0 0 1 991.8 618.5Z",
"width": 1201
},
"search": [
"wishlist_menu_icon"
]
}
]
}

@ -11,7 +11,7 @@
/// fonts:
/// - asset: fonts/DQIcons.ttf
///
///
///
///
import 'package:flutter/widgets.dart';
@ -19,25 +19,80 @@ class DQIcons {
DQIcons._();
static const _kFontFam = 'DQIcons';
static const _kFontPkg = null;
static const String _kFontPkg = null;
static const IconData blood_pressure = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bmi = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData heart = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData outline = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_type_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData online_payment_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
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);
static const IconData roboticon = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_pressure =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bmi =
IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData heart =
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height =
IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData outline =
IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData thermometer =
IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale =
IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon =
IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_type_icon =
IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height_icon =
IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData online_payment_icon =
IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
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);
static const IconData roboticon =
IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData cart_menu_icon =
IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData categories_menu_icon =
IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData hmg_logo_icon =
IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData user_menu_icon =
IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData cart_menu_icon_1 =
IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData categories_menu_icon_1 =
IconData(0xe819, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData hmg_logo_icon_1 =
IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData emo_cry =
IconData(0xe8b5, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData emo_shoot =
IconData(0xe8b6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData emo_squint =
IconData(0xe8b7, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData emo_laugh =
IconData(0xe8b8, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData chrome =
IconData(0xe8c0, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData opera =
IconData(0xe8c1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ie =
IconData(0xe8c2, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData crown =
IconData(0xe8c3, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData crown_plus =
IconData(0xe8c4, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData crown_minus =
IconData(0xe8c5, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData marquee =
IconData(0xe8c6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
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/pages/pharmacies/screens/product-details/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';

@ -3,7 +3,7 @@ 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/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/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/wishlist.dart';

@ -2,7 +2,7 @@ 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/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/pages/sub_categorise_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';

File diff suppressed because it is too large Load Diff

@ -12,6 +12,9 @@ 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/product-brands.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/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/home/BannerPager.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart';

@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
class IconWithBg extends StatelessWidget {
final IconData icon;
final Color color;
final Function onPress;
const IconWithBg({Key key, this.icon, this.color, this.onPress})
: super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 25),
width: 40,
height: 40,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(30),
),
child: IconButton(
icon: Icon(icon),
color: color,
onPressed: () async {
onPress();
},
));
}
}

@ -0,0 +1,66 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import '../cart-order-page.dart';
import 'CustomIcon.dart';
class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Column(
children: [
SizedBox(
height: 30,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
IconWithBg(
icon: Icons.arrow_back_ios,
color: Colors.grey,
onPress: () {
Navigator.pop(context);
},
),
],
),
Row(
children: [
IconWithBg(
icon: Icons.shopping_cart,
color: Colors.grey,
onPress: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CartOrderPage()),
);
}),
IconWithBg(
icon: FontAwesomeIcons.ellipsisV,
color: Colors.grey,
onPress: () {
//TODO Elham*
// settingModalBottomSheet(context);
},
),
],
)
],
),
],
),
);
}
@override
// TODO: implement preferredSize
@override
Size get preferredSize => Size(double.maxFinite, 50);
}

@ -0,0 +1,85 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:flutter/material.dart';
class AvailabilityInfo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<ProductDetailViewModel>(
onModelReady: (model) => model.getProductLocationData(),
builder: (_, model, wi) => NetworkBaseView(
baseViewModel: model,
child: model.productLocationService.length == 0
? Container(
padding: EdgeInsets.all(15),
alignment: Alignment.center,
child: Text(
TranslationBase.of(context).noLocationAvailable,
),
)
: ListView.builder(
physics: ScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.productLocationService.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Image.network(model
.productLocationService[index].projectImageUrl),
),
SizedBox(
width: 10,
),
Expanded(
flex: 4,
child: Text(
model.productLocationService[index]
.locationDescription +
"\n" +
convertCityName(
model.productLocationService[0].cityName
.toString(),
),
style: TextStyle(fontSize: 12),
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.location_on),
color: Colors.red,
onPressed: () {},
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.phone),
color: Colors.red,
onPressed: () {},
),
),
],
),
Divider(height: 1.2, color: Colors.grey)
],
),
);
},
),
),
);
}
}

@ -0,0 +1,56 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
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:flutter/material.dart';
import 'package:provider/provider.dart';
class DetailsInfo extends StatelessWidget {
final PharmacyProduct product;
const DetailsInfo({Key key, this.product}) : super(key: key);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
child: Texts(
TranslationBase.of(context)
.description,
fontSize: 17,
color: Colors.grey,
),
),
SizedBox(
height: 10,
),
Divider(height: 1, color: Colors.grey),
SizedBox(
height: 15,
),
Container(
child: Texts(
projectViewModel.isArabic
? product.fullDescriptionn
: product
.fullDescription ??
"",
fontSize: 16,
),
),
SizedBox(
height: 20,
),
]),
);
}
}

@ -0,0 +1,48 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart';
class DiscountDescription extends StatelessWidget {
final PharmacyProduct product;
const DiscountDescription({Key key, this.product}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height: 50,
color: Colors.yellowAccent,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerRight,
child: Text(
product
.discountDescription,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 17),
),
),
),
SizedBox(
width: 10,
),
Expanded(
flex: 0,
child: Container(
child: Image(
image: AssetImage(
'assets/images/offer.png'),
),
),
),
],
),
);
}
}

@ -0,0 +1,240 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/footor/quantity_box.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../cart-order-page.dart';
class FooterWidget extends StatefulWidget {
final bool isAvailable;
final int maxQuantity;
final int minQuantity;
final int quantityLimit;
final PharmacyProduct item;
final Function addToCartFunction;
int price;
bool isOverQuantity;
FooterWidget(this.isAvailable, this.maxQuantity, this.minQuantity,
this.quantityLimit, this.item,
{this.price, this.isOverQuantity = false, this.addToCartFunction});
@override
_FooterWidgetState createState() => _FooterWidgetState();
}
class _FooterWidgetState extends State<FooterWidget> {
double quantityUI = 70;
bool showUI = false;
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
width: double.infinity,
height: quantityUI,
child: Column(
children: [
showUI
? Container(
width: double.infinity,
height: 100,
color: Colors.white,
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
Row(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Quantity",
style: TextStyle(
fontSize: 15, fontWeight: FontWeight.bold),
),
),
InkWell(
child: Icon(Icons.close, color: Colors.black),
onTap: () {
setState(() {
quantityUI = 70;
showUI = false;
});
},
)
],
mainAxisAlignment: MainAxisAlignment.spaceBetween,
),
Container(
height: 50.0,
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
SizedBox(
width: 5,
),
for (int i = 1; i <= 10; i++)
QuantityBox(
label: i,
onTapFunc: onChangeValue,
isSelected: widget.price == i),
Column(
children: [
Container(
width: 100,
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey[300]),
color: Colors.white,
),
child: TextField(
decoration: InputDecoration(
labelText: 'quantity #'),
onChanged: (text) {
print(widget.price);
print(widget.quantityLimit);
if (int.tryParse(text) == null) {
text = '';
} else {
setState(() {
widget.price = int.parse(text);
if (widget.price >=
widget.quantityLimit) {
widget.isOverQuantity = true;
} else {
widget.isOverQuantity = false;
}
});
}
},
),
),
],
),
],
),
)
],
),
),
)
: Container(
height: 20,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 70,
height: 50,
child: FlatButton(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
flex: 4,
child: Text(
widget.price.toString(),
style: TextStyle(fontSize: 20),
),
),
Expanded(
flex: 5,
child: Text(
TranslationBase.of(context).quantityShortcut,
style: TextStyle(fontSize: 16),
),
),
],
),
onPressed: () {
setState(() {
if (showUI) {
quantityUI = 70;
showUI = false;
} else {
quantityUI = 150;
showUI = true;
}
});
},
),
),
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: SecondaryButton(
label: TranslationBase.of(context).addToCart.toUpperCase(),
disabled: !widget.isAvailable && widget.price > 0 ||
widget.price > widget.quantityLimit ||
widget.item.rxMessage != null,
onTap: () {
widget.addToCartFunction(
widget.price, widget.item.id, context);
},
borderRadius: 5,
color: Colors.green,
),
),
SizedBox(
width: 5,
),
Container(
width: MediaQuery.of(context).size.width * 0.3,
child: SecondaryButton(
label: TranslationBase.of(context).buyNow.toUpperCase(),
disabled: !widget.isAvailable && widget.price > 0 ||
widget.price > widget.quantityLimit ||
widget.item.rxMessage != null,
onTap: () {
widget.addToCartFunction(
widget.price, widget.item.id, context);
Navigator.push(
context,
FadePage(page: CartOrderPage()),
);
},
borderRadius: 5,
color: !widget.isAvailable && widget.price > 0 ||
widget.price > widget.quantityLimit ||
widget.item.rxMessage != null
? Colors.grey
: Colors.grey[800],
),
),
],
),
],
),
);
}
onChangeValue(int i) {
setState(() {
///TODO Elham* Check this if its good
widget.price = i;
if (widget.price >= widget.quantityLimit) {
widget.isOverQuantity = true;
} else {
widget.isOverQuantity = false;
return widget.price;
}
});
}
}

@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
class QuantityBox extends StatelessWidget {
final int label;
final bool isSelected;
final Function(int) onTapFunc;
QuantityBox({
Key key,
this.label,
this.onTapFunc, this.isSelected = false,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
children: [
InkWell(
child: Container(
decoration: BoxDecoration(
border: Border.all(color:isSelected?Colors.green: Colors.grey[300]),
color: Colors.white,
),
alignment: Alignment.center,
width: 50.0,
child: Text(
'$label',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
),
),
onTap:(){
onTapFunc(label);
}
),
SizedBox(
width: 5,
)
],
);
}
}

@ -0,0 +1,966 @@
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/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-name-and-price.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/recommended_products.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/reviews_info.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:diplomaticquarterapp/widgets/others/app_scafold_detail_page.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.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/core/model/pharmacies/recommendedProduct_model.dart';
import '../cart-order-page.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'ProductAppBar.dart';
import 'availability_info.dart';
import 'details_info.dart';
import 'discount_description.dart';
import 'footor/footer-widget.dart';
int price = 0;
bool isOverQuantity = false;
bool isInWishList = false;
bool isSelected = true;
String itemID;
var customerId;
CompareList compareItems = new CompareList();
PharmacyProduct specificationData;
class ProductDetailPage extends StatefulWidget {
final PharmacyProduct product;
ProductDetailPage(this.product);
@override
__ProductDetailPageState createState() => __ProductDetailPageState();
}
class __ProductDetailPageState extends State<ProductDetailPage>
with SingleTickerProviderStateMixin {
TabController _tabController;
AppSharedPreferences sharedPref = AppSharedPreferences();
bool isTrue = true;
bool isDetails = true;
bool isReviews = false;
bool isAvailability = false;
int _activeTab = 0;
checkWishlist() async {
GifLoaderDialogUtils.showMyDialog(context);
ProductDetailViewModel x = new ProductDetailViewModel();
await x.checkWishlistData();
for (int i = 0; i < x.wishListItems.length; i++) {
if (itemID == x.wishListItems[i].product.id) {
isInWishList = true;
break;
} else {
isInWishList = false;
}
}
GifLoaderDialogUtils.hideDialog(context);
setState(() {});
}
void initState() {
price = 1;
specificationData = widget.product;
_tabController = TabController(length: 3, vsync: this);
userInfo();
super.initState();
}
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
void userInfo() async {
print(specificationData);
customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
if (customerId != null) {
itemID = widget.product.id;
checkWishlist();
}
setState(() {});
}
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
final screenSize = MediaQuery.of(context).size;
return customerId != null
? AppScaffold(
appBarTitle: TranslationBase.of(context).productDetails,
isShowAppBar: true,
isPharmacy: true,
isShowDecPage: false,
customAppBar: ProductAppBar(),
body: SingleChildScrollView(
child: Column(
children: [
Container(
width: double.infinity,
color: Colors.white,
child: Column(
children: [
if (widget.product.images.isNotEmpty)
Container(
height: MediaQuery.of(context).size.height * .40,
child: Image.network(
widget.product.images[0].src.trim(),
fit: BoxFit.contain,
),
),
if (widget.product.discountDescription != null)
DiscountDescription(product: widget.product)
],
),
),
SizedBox(
height: 4,
),
Container(
color: Colors.white,
child: ProductNameAndPrice(
context,
widget.product,
customerId: customerId,
addToWishlistFunction: addToWishlistFunction,
deleteFromWishlistFunction: deleteFromWishlistFunction,
notifyMeWhenAvailable: notifyMeWhenAvailable,
isInWishList: isInWishList,
),
),
SizedBox(
height: 6,
),
Container(
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 15, horizontal: 10),
child: Texts(
TranslationBase.of(context).specification,
fontSize: 15,
fontWeight: FontWeight.bold,
),
width: double.infinity,
),
// Divider(color: Colors.grey),
],
),
),
SizedBox(
height: 6,
),
// Container(
// height: 500,
// color: Colors.white,
// child: Scaffold(
// backgroundColor: Colors.white,
// extendBodyBehindAppBar: false,
// appBar: PreferredSize(
// preferredSize: Size.fromHeight(
// MediaQuery.of(context).size.height * 0.070),
// child: Container(
// height: MediaQuery.of(context).size.height * 0.070,
// decoration: BoxDecoration(
// border: Border(
// bottom: BorderSide(
// color: Theme.of(context).dividerColor,
// width: 0.5), //width: 0.7
// ),
// color: Colors.white),
// child: Center(
// child: TabBar(
// isScrollable: false,
// controller: _tabController,
// // indicatorColor: Colors.transparent,
// indicatorWeight: 1.0,
// indicatorSize: TabBarIndicatorSize.tab,
// indicatorColor:Colors.green,
// labelColor: Theme.of(context).primaryColor,
// labelPadding: EdgeInsets.only(
// top: 0, left: 0, right: 0, bottom: 0),
// unselectedLabelColor: Colors.grey[800],
// tabs: [
// tabWidget(screenSize, _activeTab == 0,
// TranslationBase.of(context).details,
// ),
// tabWidget(screenSize, _activeTab == 1,
// TranslationBase.of(context).review,
// ),
// tabWidget(screenSize, _activeTab == 2,
// TranslationBase.of(context).availability),
// ],
// ),
// ),
// ),
// ),
// body: Column(
// children: [
// Expanded(
// child: TabBarView(
// physics: BouncingScrollPhysics(),
// controller: _tabController,
// children: [
// DetailsInfo(
// product: widget.product,
// ),
// ReviewsInfo(
// product: widget.product,
// ),
// AvailabilityInfo()
// ],
// ),
// ),
//
// ],
// ),
// ),
// ),
SizedBox(
height: 6,
),
//TODO Elham* Remove this
Container(
// width: 500,
margin: EdgeInsets.only(bottom: 6),
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
children: [
FlatButton(
onPressed: () {
setState(() {
isDetails = true;
isReviews = false;
isAvailability = false;
});
},
child: Text(
TranslationBase.of(context).details,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold),
),
color: Colors.white,
),
CustomDivider(
color: isDetails
? Colors.green
: Colors.transparent,
)
],
),
SizedBox(
width: 20,
),
Column(
children: [
FlatButton(
onPressed: () {
setState(() {
isDetails = false;
isReviews = true;
isAvailability = false;
});
},
child: Text(
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold),
),
color: Colors.white,
),
CustomDivider(
color: isReviews
? Colors.green
: Colors.transparent,
),
],
),
SizedBox(
width: 20,
),
Column(
children: [
FlatButton(
onPressed: () {
setState(() {
isDetails = false;
isReviews = false;
isAvailability = true;
});
},
child: Text(
TranslationBase.of(context).availability,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold),
),
color: Colors.white,
),
CustomDivider(
color: isAvailability
? Colors.green
: Colors.transparent,
),
],
),
],
),
SizedBox(
height: 10,
),
isDetails
? DetailsInfo(
product: widget.product,
)
: isReviews
? ReviewsInfo(
product: widget.product,
)
: isAvailability
? AvailabilityInfo()
: Container(),
],
),
),
///TODO Elham* check if we need recommanded
// Row(
// children: [
// customerId != null
// ? Container(
// width: 410,
// height: 50,
// color: Colors.white,
// child: Texts(
// TranslationBase.of(context).recommended,
// bold: true,
// ),
// )
// : Container(),
// ],
// ),
// RecommendedProducts(product: widget.product)
SizedBox(
height: 80,
)
],
),
),
bottomSheet: FooterWidget(
widget.product.stockAvailability != 'Out of stock',
widget.product.orderMaximumQuantity,
widget.product.orderMinimumQuantity,
widget.product.stockQuantity,
widget.product,
price: price,
isOverQuantity: isOverQuantity,
addToCartFunction: addToCartFunction,
),
)
: AppScaffold(
appBarTitle: TranslationBase.of(context).productDetails,
isShowAppBar: true,
isPharmacy: true,
isShowDecPage: false,
showPharmacyCart: false,
showHomeAppBarIcon: false,
body: SingleChildScrollView(
child: Column(
children: [
Container(
width: double.infinity,
color: Colors.white,
child: Column(
children: [
Image.network(
widget.product.images[0].src.trim(),
),
widget.product.discountDescription != null
? Container(
width: double.infinity,
height: 50,
color: Colors.yellowAccent,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerRight,
child: projectViewModel.isArabic
? Text(
widget.product
.discountDescriptionn,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 17),
)
: Text(
widget.product
.discountDescription,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 17),
),
),
),
SizedBox(
width: 10,
),
Expanded(
flex: 0,
child: Container(
child: Image(
image: AssetImage(
'assets/images/offer.png'),
),
),
),
],
),
)
: Container(),
],
),
),
SizedBox(
height: 4,
),
Container(
width: 500,
height: 150,
color: Colors.white,
child: ProductNameAndPrice(
context,
widget.product,
customerId: customerId,
addToWishlistFunction: addToWishlistFunction,
deleteFromWishlistFunction: deleteFromWishlistFunction,
notifyMeWhenAvailable: notifyMeWhenAvailable,
isInWishList: isInWishList,
),
),
SizedBox(
height: 6,
),
Container(
width: 500,
height: 120,
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Text(
TranslationBase.of(context).specification,
style: TextStyle(fontWeight: FontWeight.bold),
),
),
),
Divider(color: Colors.grey)
],
),
),
SizedBox(
height: 6,
),
Container(
width: 500,
margin: EdgeInsets.only(bottom: 100),
// height: 350,
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
children: [
FlatButton(
onPressed: () {
setState(() {
isDetails = true;
isReviews = false;
isAvailability = false;
});
},
child: Text(
TranslationBase.of(context).details,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold),
),
color: Colors.white,
),
isDetails
? Container(
width: 100,
height: 5,
color: Colors.green,
)
: Container()
],
),
SizedBox(
width: 20,
),
Column(
children: [
FlatButton(
onPressed: () {
setState(() {
isDetails = false;
isReviews = true;
isAvailability = false;
});
},
child: Text(
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold),
),
color: Colors.white,
),
isReviews
? Container(
width: 100,
height: 5,
color: Colors.green,
)
: Container(),
],
),
SizedBox(
width: 20,
),
Column(
children: [
FlatButton(
onPressed: () {
setState(() {
isDetails = false;
isReviews = false;
isAvailability = true;
});
},
child: Text(
TranslationBase.of(context).availability,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold),
),
color: Colors.white,
),
isAvailability
? Container(
width: 100,
height: 5,
color: Colors.green,
)
: Container(),
],
),
],
),
SizedBox(
height: 10,
),
isDetails
? 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),
),
),
SizedBox(
height: 6,
),
Divider(height: 1, color: Colors.grey),
SizedBox(
height: 10,
),
Container(
child: Text(
projectViewModel.isArabic
? 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(
projectViewModel.isArabic
? widget.product.fullDescriptionn
: widget.product.fullDescription,
style: TextStyle(
fontSize: 16,
fontFamily: 'WorkSans-Regular'),
),
),
],
),
)
: isReviews
? BaseView<ProductDetailViewModel>(
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,
),
),
],
),
),
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(
TranslationBase.of(context)
.noReviewsAvailable),
),
)
: isAvailability
? BaseView<ProductDetailViewModel>(
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) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Image.network(model
.productLocationService[
index]
.projectImageUrl),
),
SizedBox(
width: 10,
),
Expanded(
flex: 4,
child: Text(
model
.productLocationService[
index]
.locationDescription +
"\n" +
convertCityName(
model
.productLocationService[
0]
.cityName
.toString(),
),
style: TextStyle(
fontSize: 12),
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons
.location_on),
color: Colors.red,
onPressed: () {},
),
),
Expanded(
flex: 1,
child: IconButton(
icon:
Icon(Icons.phone),
color: Colors.red,
onPressed: () {},
),
),
],
),
Divider(
height: 1.2,
color: Colors.grey)
],
),
);
},
),
)
: Container(),
],
),
),
],
),
),
bottomSheet: FooterWidget(
widget.product.stockAvailability != 'Out of stock',
widget.product.orderMaximumQuantity,
widget.product.orderMinimumQuantity,
widget.product.stockQuantity,
widget.product,
price: price,
isOverQuantity: isOverQuantity,
addToCartFunction: addToCartFunction,
),
);
}
}
class CustomDivider extends StatelessWidget {
const CustomDivider({
Key key,
this.color,
}) : super(key: key);
final Color color;
@override
Widget build(BuildContext context) {
return Container(
width: 120,
height: 2,
color: color,
);
}
}
convertCityName(txt) {
String stringTxt;
String newTxt;
stringTxt = txt.toString();
newTxt = stringTxt.split('.')[1];
return newTxt;
}
addToCartFunction(quantity, itemID, BuildContext context) async {
GifLoaderDialogUtils.showMyDialog(context);
ProductDetailViewModel x = new ProductDetailViewModel();
await x.addToCartData(quantity, itemID).then((value) {
GifLoaderDialogUtils.hideDialog(context);
});
}
notifyMeWhenAvailable(context, itemId) async {
ProductDetailViewModel x = new ProductDetailViewModel();
await x.notifyMe(customerId, itemId);
}
addToWishlistFunction(itemID) async {
ProductDetailViewModel x = new ProductDetailViewModel();
isInWishList = true;
await x.addToWishlistData(itemID);
}
deleteFromWishlistFunction(itemID) async {
ProductDetailViewModel x = new ProductDetailViewModel();
isInWishList = false;
await x.deletWishlistData(itemID);
}
//TODO Elham* move to file
Widget tabWidget(
Size screenSize,
bool isActive,
String title,
) {
return Center(
child: Container(
height: screenSize.height * 0.070,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
title,
fontSize: SizeConfig.textMultiplier * 1.5,
// color: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
],
),
),
);
}

@ -0,0 +1,192 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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: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 'CustomIcon.dart';
class ProductNameAndPrice extends StatefulWidget {
BuildContext context;
PharmacyProduct item;
final customerId;
final bool isInWishList;
final Function notifyMeWhenAvailable;
final Function addToWishlistFunction;
final Function deleteFromWishlistFunction;
ProductNameAndPrice(this.context, this.item,
{this.customerId,
this.isInWishList,
this.notifyMeWhenAvailable,
this.addToWishlistFunction,
this.deleteFromWishlistFunction});
@override
_ProductNameAndPriceState createState() => _ProductNameAndPriceState();
}
class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
FractionallySizedBox(
widthFactor: 0.95,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(widget.item.price.toString() + " " + "SAR",
fontWeight: FontWeight.bold, fontSize: 20),
Texts(
projectViewModel.isArabic
? widget.item.stockAvailabilityn
: widget.item.stockAvailability,
fontWeight: FontWeight.bold,
fontSize: 15,
color: widget.item.stockAvailability == 'Out of stock'
? Colors.red
: Colors.green,
),
// SizedBox(width: 20),
widget.item.stockAvailability == 'Out of stock' &&
widget.customerId != null
? InkWell(
onTap: () =>
widget.notifyMeWhenAvailable(context, widget.item.id),
child: Row(children: [
Texts(
TranslationBase.of(context).notifyMe,
decoration: TextDecoration.underline,
color: Colors.blue,
),
SizedBox(width: 4),
Icon(
FontAwesomeIcons.bell,
color: Colors.blue,
size: 15.0,
)
]),
)
: IconWithBg(
icon: !widget.isInWishList
? Icons.favorite_border
: Icons.favorite,
color: !widget.isInWishList ? Colors.white : Colors.red,
onPress: () async {
{
if (widget.customerId != null) {
if (!widget.isInWishList) {
GifLoaderDialogUtils.showMyDialog(context);
await widget
.addToWishlistFunction(widget.item.id);
GifLoaderDialogUtils.hideDialog(context);
} else {
await widget
.deleteFromWishlistFunction(widget.item.id);
}
} else {
return;
}
setState(() {});
}
},
)
],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
margin: EdgeInsets.only(left: 5),
child: Align(
alignment: projectViewModel.isArabic
? Alignment.topRight
: Alignment.topLeft,
child: Text(
projectViewModel.isArabic
? widget.item.namen
: widget.item.name,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
),
),
),
),
FractionallySizedBox(
widthFactor: 0.95,
child: Row(
children: [
Container(
child: Align(
alignment: Alignment.bottomLeft,
child: Row(
children: [
RatingBar.readOnly(
initialRating: double.parse(
widget.item.approvedRatingSum.toString()),
size: 15.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[400],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
SizedBox(
width: 10,
),
Texts(
"${widget.item.approvedRatingSum}",
fontWeight: FontWeight.bold,
fontSize: 12,
),
SizedBox(
width: 30,
),
Texts(
"(${widget.item.approvedTotalReviews}${TranslationBase.of(context).review})",
fontSize: 12,
),
],
),
),
),
Expanded(
flex: 1,
child: Container(
child: widget.item.rxMessage != null
? Text(
projectViewModel.isArabic
? widget.item.rxMessagen.toString()
: widget.item.rxMessage.toString(),
style: TextStyle(color: Colors.red, fontSize: 10),
)
: Container()),
),
widget.item.rxMessage != null
? Icon(
FontAwesomeIcons.questionCircle,
color: Colors.red,
size: 15.0,
)
: Container(),
],
),
),
SizedBox(
height: 10,
),
],
);
}
}

@ -0,0 +1,388 @@
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/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.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/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
class RecommendedProducts extends StatefulWidget {
final PharmacyProduct product;
const RecommendedProducts({Key key, this.product}) : super(key: key);
@override
_RecommendedProductsState createState() => _RecommendedProductsState();
}
class _RecommendedProductsState extends State<RecommendedProducts> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return SingleChildScrollView(
child: Container(
width: 410,
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
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<PharmacyModuleViewModel>(
onModelReady: (model) => model
.getRecommendedProducts(widget.product.id),
builder: (_, model, wi) => Container(
child:
model.recommendedProductList.length != null
? ListView.builder(
scrollDirection:
Axis.horizontal,
shrinkWrap: true,
physics: ScrollPhysics(),
// physics: NeverScrollableScrollPhysics(),
itemCount: model
.recommendedProductList
.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () async {
GifLoaderDialogUtils
.showMyDialog(
context);
RecommendedProductModel
data =
model.recommendedProductList[
index];
var json = data.toJson();
PharmacyProduct product =
new PharmacyProduct
.fromJson(json);
await Navigator
.pushReplacement(
context,
FadePage(
page:
ProductDetailPage(
product),
),
);
GifLoaderDialogUtils
.hideDialog(context);
},
child: 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:
IconButton(
icon: Icon(model.recommendedProductList[index].isinwishlist !=
true
? Icons
.favorite_border
: Icons
.favorite),
color: model.recommendedProductList[index].isinwishlist !=
true
? Colors
.grey
: Colors
.red,
onPressed:
() async {
if (customerId !=
null) {
if (!isInWishList &&
model.recommendedProductList[index].isinwishlist !=
true) {
GifLoaderDialogUtils.showMyDialog(
context);
await addToWishlistFunction(model
.recommendedProductList[index]
.id);
// checkWishlist();
GifLoaderDialogUtils.hideDialog(
context);
setState(
() {
model.recommendedProductList[index].isinwishlist =
true;
});
} else {
GifLoaderDialogUtils.showMyDialog(
context);
await deleteFromWishlistFunction(model
.recommendedProductList[index]
.id);
GifLoaderDialogUtils.hideDialog(
context);
setState(
() {
model.recommendedProductList[index].isinwishlist =
false;
});
}
} else {
return;
}
setState(
() {
// checkWishlist();
});
},
),
),
),
Container(
margin: EdgeInsets
.fromLTRB(
0,
16,
10,
16),
alignment:
Alignment
.center,
child: (model.recommendedProductList[index].images !=
null &&
model.recommendedProductList[index].images.length >
0)
? Image
.network(
model
.recommendedProductList[index]
.images[0]
.src
.toString(),
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: model.recommendedProductList[index]
.rxMessage !=
null
? Texts(
projectViewModel.isArabic
? model.recommendedProductList[index].rxMessagen
: model.recommendedProductList[index].rxMessage,
color: Colors
.white,
regular:
true,
fontSize:
10,
fontWeight:
FontWeight.w400,
)
: Texts(""),
),
]),
Container(
margin: EdgeInsets
.symmetric(
horizontal: 6,
vertical: 0,
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
Text(
projectViewModel
.isArabic
? 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),
child:
Align(
alignment:
Alignment
.topLeft,
child: RatingBar
.readOnly(
initialRating: model
.recommendedProductList[index]
.approvedRatingSum
.toDouble(),
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].notApprovedTotalReviews.toString()})",
// bold: true,
fontSize:
12,
),
]),
],
),
),
),
);
})
: Container(
// color: Colors.white,
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(
TranslationBase.of(context)
.nonRecommended,
color: Colors.black,
),
],
),
),
),
),
),
],
),
),
);
}
}

@ -0,0 +1,96 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.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/others/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
class ReviewsInfo extends StatelessWidget {
final PharmacyProduct product;
const ReviewsInfo({Key key, this.product}) : super(key: key);
@override
Widget build(BuildContext context) {
return BaseView<ProductDetailViewModel>(
onModelReady: (model) => model.getProductReviewsData(product.id),
builder: (_, model, wi) => NetworkBaseView(
baseViewModel:model ,
child: 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,
),
),
],
),
),
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(
TranslationBase.of(context).noReviewsAvailable,
),
// Text('No Reviews Available'),
),
),
);
}
}

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/phramacy-product-detail-page.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';

@ -2,7 +2,7 @@ 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/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';

@ -1,6 +1,6 @@
import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';

@ -29,7 +29,7 @@ class SecondaryButton extends StatefulWidget {
this.small = false,
this.disabled = false,
this.borderColor,
this.noBorderRadius = false})
this.noBorderRadius = false, this.borderRadius})
: super(key: key);
final String label;
@ -43,6 +43,9 @@ class SecondaryButton extends StatefulWidget {
final bool iconOnly;
final bool disabled;
final bool noBorderRadius;
final double borderRadius;
@override
_SecondaryButtonState createState() => _SecondaryButtonState();
@ -169,7 +172,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
child: ClipRRect(
borderRadius: widget.noBorderRadius
? BorderRadius.all(Radius.circular(0.0))
: BorderRadius.all(Radius.circular(10.0)),
: BorderRadius.all(Radius.circular(widget.borderRadius??10.0)),
child: Stack(
children: <Widget>[
Positioned(

@ -62,6 +62,8 @@ class AppScaffold extends StatelessWidget {
locator<AuthenticatedUserObject>();
AppBarWidget appBar;
final Widget customAppBar;
AppScaffold(
{@required this.body,
this.appBarTitle = '',
@ -85,7 +87,9 @@ class AppScaffold extends StatelessWidget {
this.infoList,
this.isHelp = false,
this.showHomeAppBarIcon = true,
this.imagesInfo});
this.imagesInfo,
appBar,
this.customAppBar});
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
_onCartClick = onClick;
@ -99,16 +103,18 @@ class AppScaffold extends StatelessWidget {
backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar
? appBar = AppBarWidget(
appBarTitle: appBarTitle,
appBarIcons: appBarIcons,
showHomeAppBarIcon: showHomeAppBarIcon,
isPharmacy: isPharmacy,
showPharmacyCart: showPharmacyCart,
isOfferPackages: isOfferPackages,
showOfferPackagesCart: showOfferPackagesCart,
isShowDecPage: isShowDecPage,
)
? customAppBar != null
? customAppBar
: appBar = AppBarWidget(
appBarTitle: appBarTitle,
appBarIcons: appBarIcons,
showHomeAppBarIcon: showHomeAppBarIcon,
isPharmacy: isPharmacy,
showPharmacyCart: showPharmacyCart,
isOfferPackages: isOfferPackages,
showOfferPackagesCart: showOfferPackagesCart,
isShowDecPage: isShowDecPage,
)
: null,
bottomSheet: bottomSheet,
body: SafeArea(
@ -223,7 +229,8 @@ class AppBarWidgetState extends State<AppBarWidget> {
// ? IconButton(
// icon: Badge(
// shape: BadgeShape.circle,
// badgeContent: Text(_badgeText, style: TextStyle(color: Colors.white)),
// badgeContent:
Text(_badgeText, style: TextStyle(color: Colors.white)),
// child: Icon(Icons.shopping_cart)),
// color: Colors.white,
// onPressed: () {
@ -368,10 +375,10 @@ class _RobotIcon extends State<RobotIcon> {
bottom: -15);
}
// setAnimation() async {
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
// // var animation =
// // IS_TEXT_COMPLETED == ? true : false;
// setAnimation() async {
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
// // var animation =
// // IS_TEXT_COMPLETED == ? true : false;
// }
// }
}

@ -6,7 +6,9 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart';
import 'package:diplomaticquarterapp/routes.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/others/bottom_bar.dart';
@ -23,7 +25,7 @@ import '../progress_indicator/app_loader_widget.dart';
import 'arrow_back.dart';
import 'network_base_view.dart';
import 'not_auh_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart';
class DetailPageScafold extends StatefulWidget {
@ -183,6 +185,18 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
),
centerTitle: true,
actions: <Widget>[
/// TODO Elham* fix this
if(isPharmacy)
IconButton(
icon: Icon(Icons.shopping_cart),
color: Colors.grey,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CartOrderPage()),
);
}),
image != null
? InkWell(
onTap: () => Navigator.push(
@ -219,4 +233,49 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
@override
Size get preferredSize => Size(double.maxFinite, 60);
settingModalBottomSheet(context) {
showModalBottomSheet(
context: context,
builder: (BuildContext bc) {
return Container(
child: new Wrap(
children: <Widget>[
new ListTile(
leading: Icon(Icons.shopping_cart),
title: Text(
TranslationBase.of(context).addToCart,
),
onTap: () => {
if (price > 0)
{addToCartFunction(price, itemID, context)}
else
{
AppToast.showErrorToast(
message: "you should add quantity")
}
}),
ListTile(
leading: Icon(Icons.favorite_border),
title: Text(
TranslationBase.of(context).addToWishlist,
),
onTap: () => {addToWishlistFunction(itemID)},
),
ListTile(
leading: Icon(Icons.compare),
title: Text(
TranslationBase.of(context).compare,
),
onTap: () => {
Provider.of<CompareList>(context, listen: false)
.addItem(specificationData),
},
),
],
),
);
});
}
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/d_q_icons_icons.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -17,7 +18,6 @@ class BottomNavPharmacyBar extends StatefulWidget {
}
class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
_changeIndex(int index) {
widget.changeIndex(index);
}
@ -43,8 +43,8 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
title: TranslationBase.of(context).Alhabibapp,
),
BottomNavPharmacyItem(
icon: EvaIcons.list,
activeIcon: EvaIcons.list,
icon: DQIcons.categories_menu_icon,
activeIcon: DQIcons.categories_menu_icon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 1,
@ -59,16 +59,16 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
isHome: true,
title: TranslationBase.of(context).home),
BottomNavPharmacyItem(
icon: EvaIcons.person,
activeIcon: EvaIcons.person,
icon: DQIcons.user_menu_icon,
activeIcon: DQIcons.user_menu_icon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 2,
title: TranslationBase.of(context).myAccount,
),
BottomNavPharmacyItem(
icon: EvaIcons.shoppingCartOutline,
activeIcon: EvaIcons.shoppingCartOutline,
icon: DQIcons.cart_menu_icon,
activeIcon: DQIcons.cart_menu_icon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 3,

@ -38,14 +38,15 @@ class BottomNavPharmacyItem extends StatelessWidget {
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
onTap: () {
if(!Provider.of<ProjectViewModel>(context, listen: false).isLogin && (currentIndex == 2|| currentIndex == 3))
if (!Provider.of<ProjectViewModel>(context, listen: false)
.isLogin &&
(currentIndex == 2 || currentIndex == 3))
Navigator.push(
context,
FadePage(page: WelcomeLogin()),
);
else
changeIndex(currentIndex);
changeIndex(currentIndex);
},
child: Column(
mainAxisSize: MainAxisSize.min,

@ -0,0 +1,50 @@
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';
class AccountItem extends StatelessWidget {
final String title;
final String itemIcon;
final bool isTerms;
const AccountItem({this.title, this.itemIcon, this.isTerms = false});
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
isTerms == false
? Container(
height: 35.0,
width: 35.0,
child: SvgPicture.asset(
'$itemIcon',
width: 35,
height: 35,
),
)
: Container(
height: 35.0,
width: 35.0,
child: Image.asset(
'$itemIcon',
width: 35,
height: 35,
),
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
width: 20,
),
Texts(
title,
fontSize: 15.0,
),
],
)
],
);
}
}

@ -0,0 +1,52 @@
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class AccountServices extends StatelessWidget {
final String title;
final String serviceImage;
final Function onTap;
const AccountServices({this.title, this.onTap, this.serviceImage});
@override
Widget build(BuildContext context) {
return Expanded(
child: InkWell(
onTap: onTap,
// () {
// if (customerId == null) {
// AppToast.showErrorToast(
// message: "Customer not found");
// return;
// }
// Navigator.push(
// context,
// FadePage(
// page: OrderPage(
// customerID: customerId)));
// },
child: Column(
children: <Widget>[
// Image(image: AssetImage('assets/images/pharmacy/orders_icon.svg')),
SvgPicture.asset(
'$serviceImage',
width: 55,
height: 55,
),
SizedBox(
height: 7,
),
Texts(
title,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
],
),
),
);
}
}
Loading…
Cancel
Save