Merge branch 'master' into dev_aamir
# Conflicts: # lib/presentation/home/landing_page.dart # lib/theme/colors.dartpull/8/head
| @ -0,0 +1,12 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1124.14 1256.39"> | ||||
|   <defs> | ||||
|     <style> | ||||
|       .cls-1 { | ||||
|         fill: #231f20; | ||||
|       } | ||||
|     </style> | ||||
|   </defs> | ||||
|   <path class="cls-1" d="M699.62,1113.02h0c-20.06,44.48-33.32,92.75-38.4,143.37l424.51-90.24c20.06-44.47,33.31-92.75,38.4-143.37l-424.51,90.24Z"/> | ||||
|   <path class="cls-1" d="M1085.73,895.8c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.33v-135.2l292.27-62.11c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.27V66.13c-50.67,28.45-95.67,66.32-132.25,110.99v403.35l-132.25,28.11V0c-50.67,28.44-95.67,66.32-132.25,110.99v525.69l-295.91,62.88c-20.06,44.47-33.33,92.75-38.42,143.37l334.33-71.05v170.26l-358.3,76.14c-20.06,44.47-33.32,92.75-38.4,143.37l375.04-79.7c30.53-6.35,56.77-24.4,73.83-49.24l68.78-101.97v-.02c7.14-10.55,11.3-23.27,11.3-36.97v-149.98l132.25-28.11v270.4l424.53-90.28Z"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 923 B | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path d="M4.29538 1.40028C5.26048 0.48376 6.73969 0.48376 7.70478 1.40028C8.45145 2.10937 9.36634 3.0868 10.0972 4.20796C10.8249 5.32409 11.3959 6.62189 11.3959 7.96258C11.3959 10.5688 9.34991 13.2546 6.00008 13.2546C2.65026 13.2546 0.604248 10.5688 0.604248 7.96258C0.604248 6.62189 1.17529 5.32408 1.90291 4.20796C2.63382 3.0868 3.54872 2.10937 4.29538 1.40028Z" fill="#ED1C2B"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 489 B | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M0.729248 7.01497C0.729248 10.4782 3.53683 13.2858 7.00008 13.2858C10.4633 13.2858 13.2709 10.4782 13.2709 7.01497C13.2709 3.55172 10.4633 0.744141 7.00008 0.744141C3.53683 0.744141 0.729248 3.55172 0.729248 7.01497ZM9.72775 4.83505C9.96517 5.05263 9.98092 5.42188 9.76334 5.65929L6.555 9.15929C6.44767 9.27654 6.29658 9.34481 6.13791 9.34831C5.97866 9.35181 5.82524 9.28999 5.71266 9.17741L4.25433 7.71908C4.02624 7.49158 4.02624 7.12171 4.25433 6.89421C4.48183 6.66612 4.85167 6.66612 5.07917 6.89421L6.10699 7.92148L8.90349 4.87065C9.12107 4.63324 9.49033 4.61747 9.72775 4.83505Z" fill="#18C273"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 758 B | 
| @ -0,0 +1,4 @@ | ||||
| <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <rect width="40" height="40" rx="10" fill="#EFEFF0"/> | ||||
|     <path d="M13.7111 11.5912C14.306 11.0863 15.1364 10.9755 15.8433 11.3376C16.1565 11.4981 16.3759 11.7476 16.5314 11.9451C16.6881 12.144 16.8637 12.403 17.0592 12.6911L17.0778 12.7186C17.3879 13.1757 17.2687 13.7975 16.8116 14.1076C16.3546 14.4176 15.7327 14.2984 15.4227 13.8414C15.2131 13.5324 15.0804 13.3377 14.9758 13.2025L14.9731 13.208C14.8944 13.3687 14.8007 13.5974 14.6506 13.9663L11.6352 21.375H15.5253C15.9697 21.375 16.3408 21.375 16.6454 21.3958C16.9625 21.4174 17.262 21.464 17.5524 21.5843C17.9648 21.7552 18.3254 22.022 18.6071 22.3579C18.9902 22.0555 19.474 21.875 20 21.875C20.526 21.875 21.0098 22.0555 21.3929 22.3579C21.6746 22.022 22.0352 21.7552 22.4476 21.5843C22.738 21.464 23.0375 21.4174 23.3546 21.3958C23.6592 21.375 24.0303 21.375 24.4747 21.375L28.3651 21.375L25.3498 13.9663C25.1996 13.5974 25.106 13.3687 25.0273 13.208L25.0246 13.2025C24.92 13.3377 24.7872 13.5324 24.5777 13.8414C24.2676 14.2984 23.6458 14.4176 23.1887 14.1076C22.7317 13.7975 22.6125 13.1757 22.9225 12.7186L22.9412 12.6911C23.1366 12.403 23.3123 12.144 23.4689 11.9451C23.6245 11.7476 23.8439 11.4981 24.1571 11.3376C24.8639 10.9755 25.6943 11.0863 26.2893 11.5912C26.5522 11.8143 26.712 12.1003 26.8239 12.3291C26.9364 12.5591 27.0558 12.8527 27.19 13.1823L30.6763 21.7481C30.8452 22.1631 30.7153 22.6253 30.3872 22.8962L30.2042 23.1708C29.9446 23.5602 29.8788 23.666 29.8365 23.7736C29.8121 23.8359 29.7926 23.9 29.7785 23.9654C29.7539 24.0784 29.75 24.2028 29.75 24.6708V24.708C29.75 25.3568 29.75 25.8982 29.7067 26.3372C29.6614 26.7964 29.563 27.2234 29.3137 27.6114C29.1004 27.9433 28.8183 28.2254 28.4864 28.4387C28.0984 28.688 27.6714 28.7864 27.2122 28.8317C26.7732 28.875 26.2318 28.875 25.583 28.875L24.4747 28.875C24.0303 28.875 23.6592 28.875 23.3546 28.8542C23.0375 28.8326 22.738 28.786 22.4476 28.6657C21.7738 28.3866 21.2384 27.8512 20.9593 27.1774C20.839 26.887 20.7924 26.5875 20.7708 26.2704C20.75 25.9658 20.75 25.5947 20.75 25.1503V25.0997C20.75 24.7237 20.75 24.4002 20.7626 24.125H20.75C20.75 23.7108 20.4142 23.375 20 23.375C19.5858 23.375 19.25 23.7108 19.25 24.125H19.2374C19.25 24.4002 19.25 24.7237 19.25 25.0997V25.1503C19.25 25.5947 19.25 25.9658 19.2292 26.2704C19.2076 26.5875 19.161 26.887 19.0407 27.1774C18.7616 27.8512 18.2262 28.3866 17.5524 28.6657C17.262 28.786 16.9625 28.8326 16.6454 28.8542C16.3408 28.875 15.9697 28.875 15.5253 28.875L14.417 28.875C13.7682 28.875 13.2268 28.875 12.7878 28.8317C12.3286 28.7864 11.9016 28.688 11.5136 28.4387C11.1817 28.2254 10.8996 27.9433 10.6863 27.6114C10.437 27.2234 10.3386 26.7964 10.2933 26.3372C10.25 25.8982 10.25 25.3568 10.25 24.708L10.25 24.6708C10.25 24.2028 10.2461 24.0784 10.2216 23.9654C10.2074 23.9 10.1879 23.8359 10.1635 23.7736C10.1212 23.666 10.0554 23.5602 9.79584 23.1708L9.61231 22.8955C9.38239 22.7053 9.25004 22.4209 9.25 22.1249C9.24998 21.9993 9.27378 21.8716 9.32404 21.7481L12.8103 13.1824C12.9445 12.8527 13.064 12.5591 13.1765 12.3291C13.2884 12.1003 13.4481 11.8143 13.7111 11.5912Z" fill="#8F9AA3"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 3.1 KiB | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path d="M4.13162 0.328148C4.73211 0.327882 5.14726 0.327698 5.51993 0.467448C6.33395 0.772701 6.69117 1.49554 6.96651 2.05271C7.04898 2.21764 7.19894 2.51724 7.24086 2.58312C7.25372 2.60466 7.29431 2.64877 7.35382 2.65293C7.43149 2.66097 7.53673 2.6615 7.72112 2.6615L9.79452 2.6615C10.3889 2.6615 10.8683 2.66149 11.2529 2.70062C11.6499 2.741 11.9942 2.82666 12.2987 3.03017C12.5376 3.18976 12.7427 3.39484 12.9023 3.63369C13.1058 3.93826 13.1914 4.28254 13.2318 4.67954C13.2709 5.06414 13.2709 5.59173 13.2709 6.18616V6.1862C13.2709 7.18938 13.2709 7.97578 13.2072 8.60193C13.1423 9.24053 13.0074 9.76079 12.7056 10.2125C12.4609 10.5787 12.1465 10.8932 11.7802 11.1379C11.3285 11.4397 10.8083 11.5745 10.1697 11.6395C9.54353 11.7032 8.75712 11.7032 7.75394 11.7032H7.7539H6.96661C5.62005 11.7032 4.56478 11.7032 3.74141 11.5925C2.89865 11.4792 2.23363 11.2427 1.71166 10.7208C1.18969 10.1988 0.95324 9.53377 0.839934 8.69101C0.729235 7.86764 0.729241 6.81237 0.729248 5.46581V5.46581L0.729248 3.62955V3.62955C0.729243 3.11695 0.729239 2.70353 0.75867 2.36966C0.788994 2.02565 0.853138 1.7246 1.00656 1.44968C1.20424 1.09545 1.49653 0.803165 1.85075 0.605486C2.12568 0.452061 2.42672 0.387917 2.77074 0.357593C3.10461 0.328162 3.61902 0.328143 4.13162 0.328148Z" fill="#2E3039"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.4 KiB | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="180" height="178" viewBox="0 0 180 178" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path opacity="0.04" d="M38.4774 98.2239C38.4774 98.2239 45.8946 101.364 51.112 103.616L90.5471 120.856C95.2716 122.895 101.294 119.726 104.542 112.799L118.4 80.81C121.345 73.986 126.797 70.0037 131.807 71.8047L143.968 76.94C148.727 79.339 149.754 86.1791 146.821 92.9753L132.896 125.148C130.072 132.254 131.393 138.261 136.134 140.308L189.274 163.412L206.45 123.888C209.387 117.084 208.294 110.34 203.515 107.926L182.197 98.5995C177.473 96.5603 175.841 90.118 178.665 82.9984L183.199 72.263C186.464 65.3477 192.283 62.1336 197.02 64.1781L218.478 73.5107C223.49 75.3125 229.087 71.0973 232.018 64.3051L253.379 14.9559C253.379 14.9559 243.78 21.9979 232.614 17.8279L196.493 2.20009C191.785 0.168026 185.693 3.44396 182.452 10.365L168.766 42.0738C165.52 48.9853 159.683 52.3457 154.951 50.303L144.054 45.5029C139.313 43.4567 137.591 37.0251 140.392 29.9475L154.258 -2.09937C157.083 -9.20921 155.36 -15.5607 150.63 -17.6025L98.1839 -40.2105L81.1523 -0.789779C78.2129 6.02033 79.1446 12.8949 83.8997 15.3205L105.424 24.5066C110.15 26.9129 111.169 34.0162 108.245 40.7904L104.239 49.89C101.302 56.6961 95.6285 60.7106 90.6139 58.9147L69.1144 49.5762C64.0802 47.786 58.4703 51.7616 55.5387 58.5538L38.4774 98.2239ZM284.355 25.0281L213.173 189.948C208.108 200.955 194.658 205.369 182.696 200.456L14.7741 127.978C9.15358 125.627 4.63848 121.248 2.18363 115.767C-0.271212 110.286 -0.473314 104.134 1.62003 98.6103L72.9514 -66.6163C75.5422 -71.9323 80.1625 -76.0099 85.8393 -77.9904C91.5162 -79.971 97.8066 -79.7001 103.386 -77.2346L271.122 -4.75463C276.772 -2.3133 281.296 2.13931 283.759 7.68255C286.222 13.2258 286.435 19.4357 284.355 25.0281Z" fill="#EC1C2B"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.7 KiB | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M5.99944 0.712891C5.0187 0.712891 4.22138 1.04419 3.52597 1.40446C3.31583 1.51333 3.12062 1.62101 2.93408 1.72392C2.47765 1.9757 2.07309 2.19888 1.62884 2.34062C1.36792 2.42386 1.13679 2.49761 0.972917 2.56182C0.818673 2.62226 0.635361 2.70509 0.505299 2.84964C0.388469 2.97948 0.328448 3.12525 0.288653 3.26468C0.252527 3.39125 0.221647 3.56261 0.192023 3.727C-0.530109 7.73199 1.04897 11.5261 4.90507 13.0025C5.28409 13.1477 5.56323 13.2546 6.00136 13.2546C6.43949 13.2546 6.71861 13.1476 7.09762 13.0025C10.9536 11.5261 12.5311 7.73181 11.8088 3.72698C11.7791 3.56256 11.7482 3.39117 11.7121 3.26459C11.6723 3.12514 11.6123 2.97936 11.4954 2.84951C11.3653 2.70497 11.182 2.62217 11.0278 2.56174C10.8639 2.49755 10.6328 2.42385 10.3719 2.34065C9.92738 2.1989 9.52251 1.97569 9.06573 1.72386C8.87912 1.62098 8.68377 1.51328 8.4736 1.40446C7.77784 1.0442 6.98019 0.712891 5.99944 0.712891ZM9.11141 5.78375C9.41509 5.67619 9.57409 5.34282 9.46653 5.03914C9.35898 4.73546 9.0256 4.57646 8.72192 4.68402C8.20968 4.86544 7.72002 5.21143 7.29032 5.58828C6.85457 5.97043 6.44718 6.41409 6.10109 6.82896C5.84483 7.13613 5.61825 7.43228 5.4344 7.68355C5.26595 7.4818 5.09815 7.33435 4.93816 7.22769C4.77809 7.12098 4.57217 6.98388 4.25 6.98388C3.92783 6.98388 3.66667 7.24505 3.66667 7.56722C3.66667 7.87097 3.89883 8.12049 4.19539 8.14803C4.31441 8.15908 4.63785 8.48062 4.89492 8.99476C4.98894 9.1828 5.17687 9.3057 5.38684 9.31645C5.59675 9.3272 5.79629 9.22407 5.90904 9.04669C5.90904 9.04669 6.11214 8.74193 6.20849 8.60544C6.4016 8.33186 6.67504 7.96218 6.99695 7.57631C7.31998 7.18909 7.68465 6.79421 8.05956 6.46542C8.44051 6.13133 8.80012 5.894 9.11141 5.78375Z" fill="#18C273"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.8 KiB | 
| @ -0,0 +1,4 @@ | ||||
| <svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M12.5476 0.25C14.3866 0.249991 15.8308 0.249984 16.9694 0.378599C18.1316 0.509878 19.074 0.783621 19.8574 1.40229C20.0919 1.58749 20.3093 1.79205 20.507 2.0138C21.1732 2.76101 21.4707 3.66669 21.6124 4.77785C21.75 5.85727 21.75 7.22325 21.75 8.94725V9.05275C21.75 10.4717 21.75 11.6481 21.6733 12.6218C21.6575 12.8225 21.6496 12.9229 21.5872 12.9766C21.5249 13.0303 21.4085 13.0222 21.1757 13.0061C21.1177 13.002 21.0591 13 21 13H20.4C20.2114 13 20.1172 13 20.0586 12.9414C20 12.8828 20 12.7886 20 12.6V12C20 10.6193 18.8807 9.5 17.5 9.5C16.1193 9.5 15 10.6193 15 12V12.6C15 12.7886 15 12.8828 14.9414 12.9414C14.8828 13 14.7886 13 14.6 13H14C12.6193 13 11.5 14.1193 11.5 15.5C11.5 16.1781 11.77 16.7932 12.2083 17.2436C12.4577 17.4998 12.5824 17.6279 12.5566 17.689C12.5308 17.7501 12.3673 17.7501 12.0402 17.7501L9.45246 17.75C7.61345 17.75 6.16917 17.75 5.03058 17.6214C3.86842 17.4901 2.926 17.2164 2.14263 16.5977C1.90811 16.4125 1.69068 16.2079 1.49298 15.9862C0.826808 15.239 0.529323 14.3333 0.387626 13.2222C0.249977 12.1427 0.249987 10.7768 0.25 9.05276V8.94726C0.249987 7.22326 0.249977 5.85727 0.387626 4.77785C0.529323 3.66669 0.826808 2.76101 1.49298 2.0138C1.69068 1.79205 1.90811 1.58749 2.14263 1.40229C2.926 0.783621 3.86842 0.509878 5.03058 0.378599C6.16917 0.249984 7.61344 0.249991 9.45245 0.25H12.5476ZM8 9C8 7.34315 9.34315 6 11 6C12.6569 6 14 7.34315 14 9C14 10.6569 12.6569 12 11 12C9.34315 12 8 10.6569 8 9ZM5.5 9C5.5 8.44771 5.05229 8 4.5 8H4.49102C3.93873 8 3.49102 8.44771 3.49102 9C3.49102 9.55229 3.93873 10 4.49102 10H4.5C5.05229 10 5.5 9.55229 5.5 9Z" fill="white"/> | ||||
|     <path d="M18.5 12C18.5 11.4477 18.0523 11 17.5 11C16.9477 11 16.5 11.4477 16.5 12V14.5H14C13.4477 14.5 13 14.9477 13 15.5C13 16.0523 13.4477 16.5 14 16.5H16.5V19C16.5 19.5523 16.9477 20 17.5 20C18.0523 20 18.5 19.5523 18.5 19V16.5H21C21.5523 16.5 22 16.0523 22 15.5C22 14.9477 21.5523 14.5 21 14.5H18.5V12Z" fill="white"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.0 KiB | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21C13.4013 21 15.6049 20.1536 17.3287 18.7429L21.2929 22.7071C21.6834 23.0976 22.3166 23.0976 22.7071 22.7071C23.0976 22.3166 23.0976 21.6834 22.7071 21.2929L18.7429 17.3287C20.1536 15.6049 21 13.4013 21 11C21 5.47715 16.5228 1 11 1ZM3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11Z" fill="#2E3039"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 575 B | 
| @ -0,0 +1,4 @@ | ||||
| <svg width="22" height="16" viewBox="0 0 22 16" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M11 11.75C8.92893 11.75 7.25 10.0711 7.25 8C7.25 5.92893 8.92893 4.25 11 4.25C13.0711 4.25 14.75 5.92893 14.75 8C14.75 10.0711 13.0711 11.75 11 11.75ZM8.75 8C8.75 9.24264 9.75736 10.25 11 10.25C12.2426 10.25 13.25 9.24264 13.25 8C13.25 6.75736 12.2426 5.75 11 5.75C9.75736 5.75 8.75 6.75736 8.75 8Z" fill="white"/> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M11 0.25C8.42944 0.25 6.22595 1.38141 4.52031 2.71298C2.81313 4.04576 1.55126 5.61974 0.84541 6.60952L0.792192 6.68373C0.539036 7.03581 0.25 7.43779 0.25 8C0.25 8.56221 0.539036 8.96419 0.792192 9.31627L0.845411 9.39048C1.55126 10.3803 2.81313 11.9542 4.52031 13.287C6.22595 14.6186 8.42944 15.75 11 15.75C13.5706 15.75 15.774 14.6186 17.4797 13.287C19.1869 11.9542 20.4487 10.3803 21.1546 9.39048L21.2078 9.31626C21.461 8.96418 21.75 8.5622 21.75 8C21.75 7.43779 21.461 7.03581 21.2078 6.68373L21.1546 6.60952C20.4487 5.61974 19.1869 4.04576 17.4797 2.71298C15.774 1.38141 13.5706 0.25 11 0.25ZM2.06667 7.48045C2.72687 6.55469 3.89238 5.10618 5.44336 3.89534C6.99587 2.68331 8.88134 1.75 11 1.75C13.1187 1.75 15.0041 2.68331 16.5566 3.89534C18.1076 5.10618 19.2731 6.55469 19.9333 7.48045C20.0967 7.70947 20.1744 7.8213 20.2207 7.91032C20.2502 7.96691 20.2501 7.98242 20.25 7.99761L20.25 8L20.25 8.00239C20.2501 8.01758 20.2502 8.03309 20.2207 8.08968C20.1744 8.1787 20.0967 8.29053 19.9333 8.51955C19.2731 9.44531 18.1076 10.8938 16.5566 12.1047C15.0041 13.3167 13.1187 14.25 11 14.25C8.88134 14.25 6.99588 13.3167 5.44336 12.1047C3.89238 10.8938 2.72687 9.44531 2.06667 8.51955C1.90335 8.29053 1.82562 8.1787 1.77928 8.08968C1.74983 8.03309 1.74991 8.01758 1.74999 8.00239L1.75 8L1.74999 7.99761C1.74991 7.98242 1.74983 7.96691 1.77928 7.91032C1.82562 7.8213 1.90335 7.70947 2.06667 7.48045Z" fill="white"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.9 KiB | 
| @ -0,0 +1,79 @@ | ||||
| import 'package:hmg_patient_app_new/core/api/api_client.dart'; | ||||
| import 'package:hmg_patient_app_new/core/api_consts.dart'; | ||||
| import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart'; | ||||
| import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart'; | ||||
| import 'package:dartz/dartz.dart'; | ||||
| import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/services/logger_service.dart'; | ||||
| 
 | ||||
| abstract class LabRepo { | ||||
|   Future<Either<Failure, GenericApiModel<List<PatientLabOrdersResponseModel>>>> getPatientLabOrders({required String patientId}); | ||||
| } | ||||
| 
 | ||||
| class LabRepoImp implements LabRepo { | ||||
|   final ApiClient apiClient; | ||||
|   final LoggerService loggerService; | ||||
| 
 | ||||
|   LabRepoImp({required this.loggerService, required this.apiClient}); | ||||
| 
 | ||||
|   @override | ||||
|   Future<Either<Failure, GenericApiModel<List<PatientLabOrdersResponseModel>>>> getPatientLabOrders({required String patientId}) async { | ||||
|     final mapDevice = { | ||||
|       "isDentalAllowedBackend": false, | ||||
|       "VersionID": 50.0, | ||||
|       "Channel": 3, | ||||
|       "LanguageID": 2, | ||||
|       "IPAdress": "10.20.10.20", | ||||
|       "generalid": "Cs2020@2016\$2958", | ||||
|       "Latitude": 0.0, | ||||
|       "Longitude": 0.0, | ||||
|       "DeviceTypeID": 1, | ||||
|       "PatientType": 1, | ||||
|       "PatientTypeID": 1, | ||||
|       "TokenID": "@dm!n", | ||||
|       "PatientID": "2663907", | ||||
|       "PatientOutSA": "0", | ||||
|       "SessionID": "03478TYC02N80874CTYN04883475!?" | ||||
|     }; | ||||
| 
 | ||||
|     try { | ||||
|       GenericApiModel<List<PatientLabOrdersResponseModel>>? apiResponse; | ||||
|       Failure? failure; | ||||
|       await apiClient.post( | ||||
|         GET_Patient_LAB_ORDERS, | ||||
|         body: mapDevice, | ||||
|         onFailure: (error, statusCode, {messageStatus, failureType}) { | ||||
|           failure = failureType; | ||||
|         }, | ||||
|         onSuccess: (response, statusCode, {messageStatus}) { | ||||
|           try { | ||||
|             final list = response['ListPLO']; | ||||
|             if (list == null || list.isEmpty) { | ||||
|               throw Exception("lab list is empty"); | ||||
|             } | ||||
| 
 | ||||
|             // final labOrders = list.map((item) => PatientLabOrdersResponseModel.fromJson(item as Map<String, dynamic>)).toList(); | ||||
|             final labOrders = list | ||||
|                 .map((item) => PatientLabOrdersResponseModel.fromJson(item as Map<String, dynamic>)) | ||||
|                 .toList() | ||||
|                 .cast<PatientLabOrdersResponseModel>(); | ||||
| 
 | ||||
|             apiResponse = GenericApiModel<List<PatientLabOrdersResponseModel>>( | ||||
|               messageStatus: messageStatus, | ||||
|               statusCode: statusCode, | ||||
|               errorMessage: null, | ||||
|               data: labOrders, | ||||
|             ); | ||||
|           } catch (e) { | ||||
|             failure = DataParsingFailure(e.toString()); | ||||
|           } | ||||
|         }, | ||||
|       ); | ||||
|       if (failure != null) return Left(failure!); | ||||
|       if (apiResponse == null) return Left(ServerFailure("Unknown error")); | ||||
|       return Right(apiResponse!); | ||||
|     } catch (e) { | ||||
|       return Left(UnknownFailure(e.toString())); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,45 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hmg_patient_app_new/features/lab/lab_repo.dart'; | ||||
| import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/services/error_handler_service.dart'; | ||||
| 
 | ||||
| class LabViewModel extends ChangeNotifier { | ||||
|   bool isLabOrdersLoading = false; | ||||
|   bool isLabResultsLoading = false; | ||||
| 
 | ||||
|   LabRepo labRepo; | ||||
|   ErrorHandlerService errorHandlerService; | ||||
| 
 | ||||
|   List<PatientLabOrdersResponseModel> patientLabOrders = []; | ||||
| 
 | ||||
|   LabViewModel({required this.labRepo, required this.errorHandlerService}); | ||||
| 
 | ||||
|   initLabProvider() { | ||||
|     patientLabOrders.clear(); | ||||
|     isLabOrdersLoading = true; | ||||
|     isLabResultsLoading = true; | ||||
|     getPatientLabOrders(); | ||||
|     notifyListeners(); | ||||
|   } | ||||
| 
 | ||||
|   Future<void> getPatientLabOrders({Function(dynamic)? onSuccess, Function(String)? onError}) async { | ||||
|     final result = await labRepo.getPatientLabOrders(patientId: "1231755"); | ||||
| 
 | ||||
|     result.fold( | ||||
|       (failure) async => await errorHandlerService.handleError(failure: failure), | ||||
|       (apiResponse) { | ||||
|         if (apiResponse.messageStatus == 2) { | ||||
|           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | ||||
|         } else if (apiResponse.messageStatus == 1) { | ||||
|           patientLabOrders = apiResponse.data!; | ||||
|           isLabOrdersLoading = false; | ||||
|           isLabResultsLoading = false; | ||||
|           notifyListeners(); | ||||
|           if (onSuccess != null) { | ||||
|             onSuccess(apiResponse); | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,245 @@ | ||||
| class PatientLabOrdersResponseModel { | ||||
|   int? actualDoctorRate; | ||||
|   dynamic? admissionDate; | ||||
|   dynamic? admissionNumber; | ||||
|   dynamic? appointmentDate; | ||||
|   dynamic? appointmentNo; | ||||
|   dynamic? appointmentTime; | ||||
|   String? clinicDescription; | ||||
|   String? clinicDescriptionEnglish; | ||||
|   dynamic? clinicDescriptionN; | ||||
|   int? clinicID; | ||||
|   String? createdOn; | ||||
|   num? decimalDoctorRate; | ||||
|   int? doctorID; | ||||
|   String? doctorImageURL; | ||||
|   String? doctorName; | ||||
|   String? doctorNameEnglish; | ||||
|   dynamic? doctorNameN; | ||||
|   int? doctorRate; | ||||
|   num? doctorStarsRate; | ||||
|   String? doctorTitle; | ||||
|   int? gender; | ||||
|   String? genderDescription; | ||||
|   String? invoiceNo; | ||||
|   dynamic? invoiceNoVP; | ||||
|   String? invoiceType; | ||||
|   bool? isActiveDoctorProfile; | ||||
|   bool? isDoctorAllowVedioCall; | ||||
|   bool? isDrReviewReq; | ||||
|   bool? isExecludeDoctor; | ||||
|   bool? isInOutPatient; | ||||
|   String? isInOutPatientDescription; | ||||
|   String? isInOutPatientDescriptionN; | ||||
|   bool? isLiveCareAppointment; | ||||
|   bool? isRead; | ||||
|   bool? isSendEmail; | ||||
|   String? nationalityFlagURL; | ||||
|   int? noOfPatientsRate; | ||||
|   String? orderDate; | ||||
|   String? orderNo; | ||||
|   dynamic? orderProjectID; | ||||
|   String? patientID; | ||||
|   String? projectID; | ||||
|   String? projectName; | ||||
|   dynamic? projectNameN; | ||||
|   String? qR; | ||||
|   String? setupID; | ||||
|   List<String>? speciality; | ||||
|   int? status; | ||||
|   String? statusDesc; | ||||
|   String? strOrderDate; | ||||
|   List<TestDetails>? testDetails; | ||||
| 
 | ||||
|   PatientLabOrdersResponseModel( | ||||
|       {this.actualDoctorRate, | ||||
|       this.admissionDate, | ||||
|       this.admissionNumber, | ||||
|       this.appointmentDate, | ||||
|       this.appointmentNo, | ||||
|       this.appointmentTime, | ||||
|       this.clinicDescription, | ||||
|       this.clinicDescriptionEnglish, | ||||
|       this.clinicDescriptionN, | ||||
|       this.clinicID, | ||||
|       this.createdOn, | ||||
|       this.decimalDoctorRate, | ||||
|       this.doctorID, | ||||
|       this.doctorImageURL, | ||||
|       this.doctorName, | ||||
|       this.doctorNameEnglish, | ||||
|       this.doctorNameN, | ||||
|       this.doctorRate, | ||||
|       this.doctorStarsRate, | ||||
|       this.doctorTitle, | ||||
|       this.gender, | ||||
|       this.genderDescription, | ||||
|       this.invoiceNo, | ||||
|       this.invoiceNoVP, | ||||
|       this.invoiceType, | ||||
|       this.isActiveDoctorProfile, | ||||
|       this.isDoctorAllowVedioCall, | ||||
|       this.isDrReviewReq, | ||||
|       this.isExecludeDoctor, | ||||
|       this.isInOutPatient, | ||||
|       this.isInOutPatientDescription, | ||||
|       this.isInOutPatientDescriptionN, | ||||
|       this.isLiveCareAppointment, | ||||
|       this.isRead, | ||||
|       this.isSendEmail, | ||||
|       this.nationalityFlagURL, | ||||
|       this.noOfPatientsRate, | ||||
|       this.orderDate, | ||||
|       this.orderNo, | ||||
|       this.orderProjectID, | ||||
|       this.patientID, | ||||
|       this.projectID, | ||||
|       this.projectName, | ||||
|       this.projectNameN, | ||||
|       this.qR, | ||||
|       this.setupID, | ||||
|       this.speciality, | ||||
|       this.status, | ||||
|       this.statusDesc, | ||||
|       this.strOrderDate, | ||||
|       this.testDetails}); | ||||
| 
 | ||||
|   PatientLabOrdersResponseModel.fromJson(Map<String, dynamic> json) { | ||||
|     actualDoctorRate = json['ActualDoctorRate']; | ||||
|     admissionDate = json['AdmissionDate']; | ||||
|     admissionNumber = json['AdmissionNumber']; | ||||
|     appointmentDate = json['AppointmentDate']; | ||||
|     appointmentNo = json['AppointmentNo']; | ||||
|     appointmentTime = json['AppointmentTime']; | ||||
|     clinicDescription = json['ClinicDescription']; | ||||
|     clinicDescriptionEnglish = json['ClinicDescriptionEnglish']; | ||||
|     clinicDescriptionN = json['ClinicDescriptionN']; | ||||
|     clinicID = json['ClinicID']; | ||||
|     createdOn = json['CreatedOn']; | ||||
|     decimalDoctorRate = json['DecimalDoctorRate']; | ||||
|     doctorID = json['DoctorID']; | ||||
|     doctorImageURL = json['DoctorImageURL']; | ||||
|     doctorName = json['DoctorName']; | ||||
|     doctorNameEnglish = json['DoctorNameEnglish']; | ||||
|     doctorNameN = json['DoctorNameN']; | ||||
|     doctorRate = json['DoctorRate']; | ||||
|     doctorStarsRate = json['DoctorStarsRate']; | ||||
|     doctorTitle = json['DoctorTitle']; | ||||
|     gender = json['Gender']; | ||||
|     genderDescription = json['GenderDescription']; | ||||
|     invoiceNo = json['InvoiceNo']; | ||||
|     invoiceNoVP = json['InvoiceNo_VP']; | ||||
|     invoiceType = json['InvoiceType']; | ||||
|     isActiveDoctorProfile = json['IsActiveDoctorProfile']; | ||||
|     isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; | ||||
|     isDrReviewReq = json['IsDrReviewReq']; | ||||
|     isExecludeDoctor = json['IsExecludeDoctor']; | ||||
|     isInOutPatient = json['IsInOutPatient']; | ||||
|     isInOutPatientDescription = json['IsInOutPatientDescription']; | ||||
|     isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; | ||||
|     isLiveCareAppointment = json['IsLiveCareAppointment']; | ||||
|     isRead = json['IsRead']; | ||||
|     isSendEmail = json['IsSendEmail']; | ||||
|     nationalityFlagURL = json['NationalityFlagURL']; | ||||
|     noOfPatientsRate = json['NoOfPatientsRate']; | ||||
|     orderDate = json['OrderDate']; | ||||
|     orderNo = json['OrderNo']; | ||||
|     orderProjectID = json['OrderProjectID']; | ||||
|     patientID = json['PatientID']; | ||||
|     projectID = json['ProjectID']; | ||||
|     projectName = json['ProjectName']; | ||||
|     projectNameN = json['ProjectNameN']; | ||||
|     qR = json['QR']; | ||||
|     setupID = json['SetupID']; | ||||
|     speciality = json['Speciality'].cast<String>(); | ||||
|     status = json['Status']; | ||||
|     statusDesc = json['StatusDesc']; | ||||
|     strOrderDate = json['StrOrderDate']; | ||||
|     if (json['TestDetails'] != dynamic) { | ||||
|       testDetails = <TestDetails>[]; | ||||
|       json['TestDetails'].forEach((v) { | ||||
|         testDetails!.add(new TestDetails.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ActualDoctorRate'] = this.actualDoctorRate; | ||||
|     data['AdmissionDate'] = this.admissionDate; | ||||
|     data['AdmissionNumber'] = this.admissionNumber; | ||||
|     data['AppointmentDate'] = this.appointmentDate; | ||||
|     data['AppointmentNo'] = this.appointmentNo; | ||||
|     data['AppointmentTime'] = this.appointmentTime; | ||||
|     data['ClinicDescription'] = this.clinicDescription; | ||||
|     data['ClinicDescriptionEnglish'] = this.clinicDescriptionEnglish; | ||||
|     data['ClinicDescriptionN'] = this.clinicDescriptionN; | ||||
|     data['ClinicID'] = this.clinicID; | ||||
|     data['CreatedOn'] = this.createdOn; | ||||
|     data['DecimalDoctorRate'] = this.decimalDoctorRate; | ||||
|     data['DoctorID'] = this.doctorID; | ||||
|     data['DoctorImageURL'] = this.doctorImageURL; | ||||
|     data['DoctorName'] = this.doctorName; | ||||
|     data['DoctorNameEnglish'] = this.doctorNameEnglish; | ||||
|     data['DoctorNameN'] = this.doctorNameN; | ||||
|     data['DoctorRate'] = this.doctorRate; | ||||
|     data['DoctorStarsRate'] = this.doctorStarsRate; | ||||
|     data['DoctorTitle'] = this.doctorTitle; | ||||
|     data['Gender'] = this.gender; | ||||
|     data['GenderDescription'] = this.genderDescription; | ||||
|     data['InvoiceNo'] = this.invoiceNo; | ||||
|     data['InvoiceNo_VP'] = this.invoiceNoVP; | ||||
|     data['InvoiceType'] = this.invoiceType; | ||||
|     data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; | ||||
|     data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; | ||||
|     data['IsDrReviewReq'] = this.isDrReviewReq; | ||||
|     data['IsExecludeDoctor'] = this.isExecludeDoctor; | ||||
|     data['IsInOutPatient'] = this.isInOutPatient; | ||||
|     data['IsInOutPatientDescription'] = this.isInOutPatientDescription; | ||||
|     data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; | ||||
|     data['IsLiveCareAppointment'] = this.isLiveCareAppointment; | ||||
|     data['IsRead'] = this.isRead; | ||||
|     data['IsSendEmail'] = this.isSendEmail; | ||||
|     data['NationalityFlagURL'] = this.nationalityFlagURL; | ||||
|     data['NoOfPatientsRate'] = this.noOfPatientsRate; | ||||
|     data['OrderDate'] = this.orderDate; | ||||
|     data['OrderNo'] = this.orderNo; | ||||
|     data['OrderProjectID'] = this.orderProjectID; | ||||
|     data['PatientID'] = this.patientID; | ||||
|     data['ProjectID'] = this.projectID; | ||||
|     data['ProjectName'] = this.projectName; | ||||
|     data['ProjectNameN'] = this.projectNameN; | ||||
|     data['QR'] = this.qR; | ||||
|     data['SetupID'] = this.setupID; | ||||
|     data['Speciality'] = this.speciality; | ||||
|     data['Status'] = this.status; | ||||
|     data['StatusDesc'] = this.statusDesc; | ||||
|     data['StrOrderDate'] = this.strOrderDate; | ||||
|     if (this.testDetails != dynamic) { | ||||
|       data['TestDetails'] = this.testDetails!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class TestDetails { | ||||
|   String? description; | ||||
|   String? testCode; | ||||
|   String? testID; | ||||
| 
 | ||||
|   TestDetails({this.description, this.testCode, this.testID}); | ||||
| 
 | ||||
|   TestDetails.fromJson(Map<String, dynamic> json) { | ||||
|     description = json['Description']; | ||||
|     testCode = json['TestCode']; | ||||
|     testID = json['TestID']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['Description'] = this.description; | ||||
|     data['TestCode'] = this.testCode; | ||||
|     data['TestID'] = this.testID; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,212 @@ | ||||
| import 'dart:async'; | ||||
| 
 | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; | ||||
| import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/date_util.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/utils.dart'; | ||||
| import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; | ||||
| import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; | ||||
| import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | ||||
| import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; | ||||
| import 'package:hmg_patient_app_new/theme/colors.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| 
 | ||||
| class LabOrdersPage extends StatefulWidget { | ||||
|   const LabOrdersPage({super.key}); | ||||
| 
 | ||||
|   @override | ||||
|   State<LabOrdersPage> createState() => _LabOrdersPageState(); | ||||
| } | ||||
| 
 | ||||
| class _LabOrdersPageState extends State<LabOrdersPage> { | ||||
|   late LabViewModel labProvider; | ||||
| 
 | ||||
|   int? expandedIndex; | ||||
| 
 | ||||
|   // Sample data for demonstration | ||||
|   final List<String> labOrders = [ | ||||
|     'Mohammad Al Harbi', | ||||
|     'Mohammad Al Harbi', | ||||
|     'Mohammad Al Harbi', | ||||
|     'Mohammad Al Harbi', | ||||
|   ]; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     scheduleMicrotask(() { | ||||
|       labProvider.initLabProvider(); | ||||
|     }); | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     labProvider = Provider.of<LabViewModel>(context); | ||||
|     return Scaffold( | ||||
|       backgroundColor: AppColors.bgScaffoldColor, | ||||
|       appBar: AppBar( | ||||
|         title: const Text('Lab Results'), | ||||
|         backgroundColor: AppColors.bgScaffoldColor, | ||||
|       ), | ||||
|       body: Padding( | ||||
|         padding: EdgeInsets.all(24.h), | ||||
|         child: SingleChildScrollView( | ||||
|           child: Consumer<LabViewModel>( | ||||
|             builder: (context, model, child) { | ||||
|               return Column( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 children: [ | ||||
|                   Row( | ||||
|                     mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                     children: [ | ||||
|                       LocaleKeys.labResults.tr(context: context).toText24(isBold: true), | ||||
|                       Utils.buildSvgWithAssets(icon: AppAssets.search_icon), | ||||
|                     ], | ||||
|                   ), | ||||
|                   SizedBox(height: 16.h), | ||||
|                   // Build Tab Bar | ||||
|                   SizedBox(height: 16.h), | ||||
|                   // Expandable list | ||||
|                   ListView.builder( | ||||
|                     shrinkWrap: true, | ||||
|                     physics: NeverScrollableScrollPhysics(), | ||||
|                     itemCount: model.isLabOrdersLoading ? 5 : model.patientLabOrders.length, | ||||
|                     itemBuilder: (context, index) { | ||||
|                       final isExpanded = expandedIndex == index; | ||||
|                       return model.isLabOrdersLoading | ||||
|                           ? const MoviesShimmerWidget() | ||||
|                           : AnimationConfiguration.staggeredList( | ||||
|                               position: index, | ||||
|                               duration: const Duration(milliseconds: 500), | ||||
|                               child: SlideAnimation( | ||||
|                                 verticalOffset: 100.0, | ||||
|                                 child: FadeInAnimation( | ||||
|                                   child: AnimatedContainer( | ||||
|                                     duration: Duration(milliseconds: 300), | ||||
|                                     curve: Curves.easeInOut, | ||||
|                                     margin: EdgeInsets.symmetric(vertical: 8.h), | ||||
|                                     decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true), | ||||
|                                     child: InkWell( | ||||
|                                       onTap: () { | ||||
|                                         setState(() { | ||||
|                                           expandedIndex = isExpanded ? null : index; | ||||
|                                         }); | ||||
|                                       }, | ||||
|                                       child: Column( | ||||
|                                         children: [ | ||||
|                                           Padding( | ||||
|                                             padding: EdgeInsets.all(16.h), | ||||
|                                             child: Column( | ||||
|                                               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                               children: [ | ||||
|                                                 Row( | ||||
|                                                   mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: LocaleKeys.pending.tr(context: context), | ||||
|                                                       onPressed: () {}, | ||||
|                                                       backgroundColor: getLabOrderStatusColor(model.patientLabOrders[index].status!).withOpacity(0.15), | ||||
|                                                       borderColor: getLabOrderStatusColor(model.patientLabOrders[index].status!).withOpacity(0.01), | ||||
|                                                       textColor: getLabOrderStatusColor(model.patientLabOrders[index].status!), | ||||
|                                                       fontSize: 10, | ||||
|                                                       fontWeight: FontWeight.w500, | ||||
|                                                       borderRadius: 8, | ||||
|                                                       padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                                                       height: 30.h, | ||||
|                                                     ), | ||||
|                                                     Icon(isExpanded ? Icons.expand_less : Icons.expand_more), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                                 SizedBox(height: 8.h), | ||||
|                                                 Row( | ||||
|                                                   children: [ | ||||
|                                                     Image.network( | ||||
|                                                       model.patientLabOrders[index].doctorImageURL!, | ||||
|                                                       width: 24.h, | ||||
|                                                       height: 24.h, | ||||
|                                                       fit: BoxFit.fill, | ||||
|                                                     ).circle(100), | ||||
|                                                     SizedBox(width: 4.h), | ||||
|                                                     model.patientLabOrders[index].doctorName!.toText16(isBold: true) | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                                 SizedBox(height: 8.h), | ||||
|                                                 Row( | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(model.patientLabOrders[index].createdOn), false), | ||||
|                                                       onPressed: () {}, | ||||
|                                                       backgroundColor: AppColors.greyColor, | ||||
|                                                       borderColor: AppColors.greyColor, | ||||
|                                                       textColor: AppColors.blackColor, | ||||
|                                                       fontSize: 12, | ||||
|                                                       fontWeight: FontWeight.w500, | ||||
|                                                       borderRadius: 8, | ||||
|                                                       padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                                                       height: 24.h, | ||||
|                                                     ), | ||||
|                                                     SizedBox(width: 8.h), | ||||
|                                                     CustomButton( | ||||
|                                                       text: model.patientLabOrders[index].clinicDescription!, | ||||
|                                                       onPressed: () {}, | ||||
|                                                       backgroundColor: AppColors.greyColor, | ||||
|                                                       borderColor: AppColors.greyColor, | ||||
|                                                       textColor: AppColors.blackColor, | ||||
|                                                       fontSize: 12, | ||||
|                                                       fontWeight: FontWeight.w500, | ||||
|                                                       borderRadius: 8, | ||||
|                                                       padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                                                       height: 24.h, | ||||
|                                                     ), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                               ], | ||||
|                                             ), | ||||
|                                           ), | ||||
|                                           AnimatedCrossFade( | ||||
|                                             firstChild: SizedBox.shrink(), | ||||
|                                             secondChild: Padding( | ||||
|                                               padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h), | ||||
|                                               child: Text('Details for ${model.patientLabOrders[index].clinicDescription}'), | ||||
|                                             ), | ||||
|                                             crossFadeState: isExpanded ? CrossFadeState.showSecond : CrossFadeState.showFirst, | ||||
|                                             duration: Duration(milliseconds: 300), | ||||
|                                           ), | ||||
|                                         ], | ||||
|                                       ), | ||||
|                                     ), | ||||
|                                   ), | ||||
|                                 ), | ||||
|                               ), | ||||
|                             ); | ||||
|                     }, | ||||
|                   ), | ||||
|                 ], | ||||
|               ); | ||||
|             }, | ||||
|           ), | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Color getLabOrderStatusColor(num status) { | ||||
|     switch (status) { | ||||
|       case 44: | ||||
|         return AppColors.warningColorYellow; | ||||
|       case 45: | ||||
|         return AppColors.warningColorYellow; | ||||
|       case 16: | ||||
|         return AppColors.successColor; | ||||
|       case 17: | ||||
|         return AppColors.successColor; | ||||
|       default: | ||||
|         return AppColors.greyColor; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,44 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/utils.dart'; | ||||
| import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; | ||||
| import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; | ||||
| 
 | ||||
| class MedicalFileCard extends StatelessWidget { | ||||
|   final String label; | ||||
| 
 | ||||
|   // final Color svgColor; | ||||
|   final Color textColor; | ||||
|   final Color backgroundColor; | ||||
|   final String svgIcon; | ||||
| 
 | ||||
|   MedicalFileCard({ | ||||
|     required this.label, | ||||
|     // required this.svgColor, | ||||
|     required this.textColor, | ||||
|     required this.backgroundColor, | ||||
|     this.svgIcon = "", | ||||
|   }); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Container( | ||||
|       decoration: RoundedRectangleBorder().toSmoothCornerDecoration( | ||||
|         color: backgroundColor, | ||||
|         borderRadius: 20, | ||||
|       ), | ||||
|       child: Padding( | ||||
|         padding: EdgeInsets.all(8.h), | ||||
|         child: Column( | ||||
|           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|           mainAxisAlignment: MainAxisAlignment.center, | ||||
|           children: [ | ||||
|             Utils.buildSvgWithAssets(icon: svgIcon, width: 30.h, height: 30.h, fit: BoxFit.contain), | ||||
|             SizedBox(height: 12.h), | ||||
|             label.toText11(color: textColor, isBold: true), | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -1,12 +0,0 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| 
 | ||||
| class BottomNavigationProvider extends ChangeNotifier { | ||||
|   int _currentIndex = 0; | ||||
| 
 | ||||
|   int get currentIndex => _currentIndex; | ||||
| 
 | ||||
|   void setIndex(int index) { | ||||
|     _currentIndex = index; | ||||
|     notifyListeners(); | ||||
|   } | ||||
| } | ||||