Merge branch 'dev_aamir' into faiz_dev1
# Conflicts: # lib/core/enums.dart # lib/features/authentication/authentication_view_model.dart # lib/presentation/authentication/register.dart # lib/presentation/home/landing_page.dartpull/12/head
| @ -0,0 +1,3 @@ | ||||
| <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M21.0823 0.5738C19.2911 0.332976 16.9968 0.33299 14.0759 0.333008H13.9234C11.0025 0.33299 8.70826 0.332976 6.91704 0.5738C5.0815 0.820582 3.62516 1.33663 2.48089 2.48089C1.33663 3.62516 0.820582 5.0815 0.5738 6.91704C0.332976 8.70826 0.33299 11.0025 0.333008 13.9234V14.0759C0.33299 16.9968 0.332976 19.2911 0.5738 21.0823C0.820582 22.9179 1.33663 24.3742 2.48089 25.5185C3.62516 26.6627 5.0815 27.1788 6.91704 27.4256C8.70825 27.6664 11.0025 27.6664 13.9234 27.6663H14.0759C16.9968 27.6664 19.2911 27.6664 21.0823 27.4256C22.9179 27.1788 24.3742 26.6627 25.5185 25.5185C26.6627 24.3742 27.1788 22.9179 27.4256 21.0823C27.6664 19.2911 27.6664 16.9969 27.6663 14.0759V13.9235C27.6664 11.0025 27.6664 8.70825 27.4256 6.91704C27.1788 5.0815 26.6627 3.62516 25.5185 2.48089C24.3742 1.33663 22.9179 0.820582 21.0823 0.5738ZM15.333 8.66634C15.333 7.92996 14.7361 7.33301 13.9997 7.33301C13.2633 7.33301 12.6663 7.92996 12.6663 8.66634V12.6663H8.66634C7.92996 12.6663 7.33301 13.2633 7.33301 13.9997C7.33301 14.7361 7.92996 15.333 8.66634 15.333H12.6663V19.333C12.6663 20.0694 13.2633 20.6663 13.9997 20.6663C14.7361 20.6663 15.333 20.0694 15.333 19.333V15.333H19.333C20.0694 15.333 20.6663 14.7361 20.6663 13.9997C20.6663 13.2633 20.0694 12.6663 19.333 12.6663H15.333V8.66634Z" fill="#ED1C2B"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.4 KiB | 
| @ -0,0 +1,8 @@ | ||||
| <svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path d="M4.66667 6.35482C4.26396 6.35482 3.9375 6.68128 3.9375 7.08398C3.9375 7.48669 4.26396 7.81315 4.66667 7.81315H4.6719C5.07461 7.81315 5.40107 7.48669 5.40107 7.08398C5.40107 6.68128 5.07461 6.35482 4.6719 6.35482H4.66667Z" fill="#2E3039"/> | ||||
|     <path d="M6.99738 6.35482C6.59468 6.35482 6.26822 6.68128 6.26822 7.08398C6.26822 7.48669 6.59468 7.81315 6.99738 7.81315H7.00262C7.40532 7.81315 7.73178 7.48669 7.73178 7.08398C7.73178 6.68128 7.40532 6.35482 7.00262 6.35482H6.99738Z" fill="#2E3039"/> | ||||
|     <path d="M9.3281 6.35482C8.92539 6.35482 8.59893 6.68128 8.59893 7.08398C8.59893 7.48669 8.92539 7.81315 9.3281 7.81315H9.33333C9.73604 7.81315 10.0625 7.48669 10.0625 7.08398C10.0625 6.68128 9.73604 6.35482 9.33333 6.35482H9.3281Z" fill="#2E3039"/> | ||||
|     <path d="M4.66667 8.68815C4.26396 8.68815 3.9375 9.01461 3.9375 9.41732C3.9375 9.82003 4.26396 10.1465 4.66667 10.1465H4.6719C5.07461 10.1465 5.40107 9.82003 5.40107 9.41732C5.40107 9.01461 5.07461 8.68815 4.6719 8.68815H4.66667Z" fill="#2E3039"/> | ||||
|     <path d="M6.99738 8.68815C6.59468 8.68815 6.26822 9.01461 6.26822 9.41732C6.26822 9.82003 6.59468 10.1465 6.99738 10.1465H7.00262C7.40532 10.1465 7.73178 9.82003 7.73178 9.41732C7.73178 9.01461 7.40532 8.68815 7.00262 8.68815H6.99738Z" fill="#2E3039"/> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M4.08333 0.667318C4.08333 0.345152 3.82217 0.0839844 3.5 0.0839844C3.17783 0.0839844 2.91667 0.345152 2.91667 0.667318V0.929148C2.47265 1.06999 2.08678 1.29145 1.76051 1.64417C1.2772 2.16666 1.06913 2.8214 0.970761 3.61237C0.874981 4.38253 0.874989 5.36552 0.875 6.60207L0.875 6.98255C0.874989 8.2191 0.874981 9.20211 0.970761 9.97227C1.06913 10.7632 1.2772 11.418 1.76051 11.9405C2.2498 12.4694 2.87312 12.7032 3.62561 12.8126C4.34666 12.9174 5.26336 12.9173 6.39986 12.9173H7.60011C8.73661 12.9173 9.65334 12.9174 10.3744 12.8126C11.1269 12.7032 11.7502 12.4694 12.2395 11.9405C12.7228 11.418 12.9309 10.7632 13.0292 9.97227C13.125 9.2021 13.125 8.21911 13.125 6.98254V6.6021C13.125 5.36553 13.125 4.38254 13.0292 3.61237C12.9309 2.8214 12.7228 2.16666 12.2395 1.64417C11.9132 1.29145 11.5274 1.06999 11.0833 0.929147V0.667318C11.0833 0.345152 10.8222 0.0839844 10.5 0.0839844C10.1778 0.0839844 9.91667 0.345152 9.91667 0.667318V0.720827C9.27673 0.667291 8.50865 0.667304 7.60013 0.667318L6.39988 0.667318C5.49136 0.667304 4.72327 0.667291 4.08333 0.720827V0.667318ZM2.62373 4.75065C2.3562 4.75065 2.22244 4.75065 2.13725 4.83475C2.05206 4.91884 2.05034 5.05091 2.04692 5.31503C2.04183 5.70771 2.04167 6.14726 2.04167 6.64255V6.94209C2.04167 8.22826 2.04273 9.13855 2.12851 9.82829C2.21274 10.5056 2.36987 10.8811 2.61696 11.1483C2.85808 11.4089 3.18774 11.57 3.79342 11.658C4.42084 11.7492 5.25248 11.7507 6.44583 11.7507H7.55417C8.74752 11.7507 9.57916 11.7492 10.2066 11.658C10.8123 11.57 11.1419 11.4089 11.383 11.1483C11.6301 10.8811 11.7873 10.5056 11.8715 9.82829C11.9573 9.13855 11.9583 8.22826 11.9583 6.94209V6.64255C11.9583 6.14726 11.9582 5.70771 11.9531 5.31503C11.9497 5.05091 11.9479 4.91884 11.8628 4.83475C11.7776 4.75065 11.6438 4.75065 11.3763 4.75065L2.62373 4.75065Z" fill="#2E3039"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 3.2 KiB | 
| @ -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="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path d="M17.7495 6.00047C17.7495 5.62691 17.5839 5.28034 17.427 5.02011C17.2577 4.7393 17.0301 4.44937 16.7803 4.16669C16.2794 3.59962 15.6257 2.99064 14.9913 2.43977C14.3532 1.88567 13.7173 1.37546 13.2423 1.00468C13.0044 0.818986 12.8059 0.66755 12.6665 0.562239C12.5968 0.509569 12.5418 0.468397 12.5039 0.440203L12.4604 0.407818L12.4488 0.399264L12.4448 0.396304C12.1113 0.150642 11.6414 0.221533 11.3957 0.555035C11.1501 0.888521 11.2213 1.358 11.5547 1.60367L11.5674 1.61308L11.6075 1.64285C11.6429 1.66925 11.6953 1.7085 11.7623 1.75911C11.8964 1.86036 12.0885 2.00695 12.3193 2.18713C12.7818 2.5481 13.3959 3.04099 14.0078 3.57235C14.6234 4.10694 15.2197 4.66576 15.6562 5.15983C15.6838 5.19108 15.7105 5.2218 15.7364 5.25195L0.999512 5.25196C0.585298 5.25196 0.249512 5.58774 0.249512 6.00195C0.249512 6.41617 0.585299 6.75196 0.999512 6.75196L15.7338 6.75195C15.7088 6.78116 15.6829 6.81088 15.6562 6.84111C15.2197 7.33518 14.6234 7.89401 14.0078 8.4286C13.3959 8.95995 12.7818 9.45285 12.3193 9.81382C12.0885 9.99399 11.8964 10.1406 11.7623 10.2418C11.6953 10.2925 11.6429 10.3317 11.6075 10.3581L11.5674 10.3879L11.5547 10.3973C11.2213 10.6429 11.1501 11.1124 11.3957 11.4459C11.6414 11.7794 12.1113 11.8503 12.4448 11.6046L12.4488 11.6017L12.4604 11.5931L12.5039 11.5607C12.5418 11.5326 12.5968 11.4914 12.6665 11.4387C12.8059 11.3334 13.0044 11.182 13.2423 10.9963C13.7173 10.6255 14.3532 10.1153 14.9913 9.56118C15.6257 9.01031 16.2794 8.40133 16.7803 7.83425C17.0301 7.55158 17.2577 7.26165 17.427 6.98083C17.5829 6.72217 17.7475 6.37819 17.7495 6.0072" fill="white"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.7 KiB | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M8.52381 0.995945C9.35968 0.526884 10.1339 0.25 11 0.25C11.8661 0.25 12.6403 0.526884 13.4762 0.995945C14.2861 1.45043 15.2141 2.12145 16.3811 2.96522L17.8902 4.05633C18.8267 4.73347 19.5747 5.2743 20.1389 5.77487C20.7215 6.29173 21.1573 6.807 21.4337 7.45513C21.7108 8.10469 21.7778 8.77045 21.7406 9.53808C21.7047 10.2789 21.5674 11.1726 21.3961 12.2871L21.0808 14.3387C20.8374 15.9225 20.6437 17.1837 20.359 18.1662C20.0646 19.1821 19.6499 19.9887 18.9086 20.6052C18.1704 21.2192 17.2911 21.4926 16.2169 21.6231C15.172 21.75 13.8539 21.75 12.1889 21.75H9.8111C8.14615 21.75 6.828 21.75 5.78306 21.6231C4.7089 21.4926 3.82957 21.2192 3.0914 20.6052C2.35016 19.9887 1.93544 19.1821 1.64105 18.1662C1.35635 17.1836 1.16256 15.9225 0.919183 14.3387L0.603927 12.2872C0.432639 11.1727 0.295279 10.2789 0.259413 9.53808C0.222248 8.77045 0.289254 8.10469 0.566298 7.45513C0.842739 6.807 1.27855 6.29173 1.86109 5.77487C2.42528 5.27429 3.1733 4.73346 4.10984 4.05632L5.61887 2.96524C6.78586 2.12145 7.7139 1.45043 8.52381 0.995945ZM12 14C12 13.4477 11.5523 13 11 13C10.4477 13 10 13.4477 10 14V17C10 17.5523 10.4477 18 11 18C11.5523 18 12 17.5523 12 17V14Z" fill="#2E3039"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.3 KiB | 
| @ -0,0 +1,4 @@ | ||||
| <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="M6.99559 21.1542C7.90452 21.2489 12.4772 21.2499 14.1239 21.2499H14.3966C14.8108 21.2499 15.1466 21.5857 15.1466 21.9999C15.1466 22.4141 14.8108 22.7499 14.3966 22.7499H14.0805C12.4867 22.7499 7.83587 22.7499 6.8401 22.6461C5.82336 22.5401 4.9873 22.3191 4.27208 21.8152C3.89028 21.5462 3.54979 21.2261 3.26171 20.8639C2.71682 20.1788 2.47647 19.3732 2.36208 18.4011C2.25096 17.4566 2.25096 16.2691 2.25098 14.7753V12.1544C2.25098 10.696 2.25098 9.56422 2.31122 8.65085C2.37229 7.72505 2.49752 6.97162 2.77267 6.27732C3.61078 4.16243 5.37562 2.51123 7.59092 1.73357C8.69059 1.34754 9.98937 1.26945 11.9744 1.25377L13.0183 1.25002C14.6535 1.24968 15.6725 1.24947 16.5132 1.54458C17.8622 2.01816 18.9438 3.02627 19.4588 4.32588C19.6335 4.76661 19.7085 5.23452 19.7444 5.77945C19.7795 6.31201 19.7795 6.96751 19.7795 7.79182V8.98969C19.7795 9.4039 19.4437 9.73969 19.0295 9.73969C18.6153 9.73969 18.2795 9.4039 18.2795 8.98969V7.81823C18.2795 6.96172 18.2791 6.3556 18.2476 5.87817C18.2166 5.40744 18.1576 5.11394 18.0643 4.8785C17.7178 4.00402 16.9772 3.29723 16.0163 2.95991C15.4605 2.7648 14.7402 2.75056 12.9598 2.75006C11.552 2.77206 10.4176 3.92009 10.4176 5.33307C10.4176 5.4802 10.4241 5.63838 10.4323 5.81598L10.4354 5.8818C10.4427 6.03666 10.4506 6.20536 10.4541 6.37344C10.462 6.75353 10.45 7.19707 10.3353 7.62522C10.1118 8.45919 9.46039 9.1106 8.62641 9.33406C8.19827 9.44878 7.75473 9.46079 7.37463 9.45289C7.20655 9.4494 7.03803 9.44148 6.88316 9.43421L6.81718 9.43112C6.63958 9.42288 6.4814 9.4164 6.33427 9.4164C4.91296 9.4164 3.75974 10.5642 3.75099 11.9835L3.75098 14.7272C3.75098 16.28 3.75219 17.3792 3.8518 18.2258C3.94934 19.0547 4.13284 19.5494 4.43565 19.9301C4.63332 20.1786 4.86892 20.4007 5.13602 20.5889C5.55319 20.8829 6.09863 21.0607 6.99559 21.1542ZM6.33427 7.91641C5.37914 7.91641 4.50061 8.24434 3.80512 8.79375L3.80797 8.74958C3.86414 7.89797 3.97337 7.31895 4.16716 6.82994C4.8368 5.14018 6.26061 3.7903 8.08776 3.1489C8.67511 2.94271 9.07519 2.84304 9.8021 2.79489C9.24838 3.4918 8.9176 4.37381 8.9176 5.33307C8.9176 5.51883 8.92571 5.70844 8.93393 5.88549L8.9371 5.95343C8.94445 6.11008 8.95136 6.25755 8.95441 6.40458C8.96149 6.74522 8.9451 7.01781 8.88637 7.23699C8.80161 7.55332 8.55452 7.80041 8.23819 7.88517C8.01901 7.9439 7.74642 7.96029 7.40578 7.95322C7.25873 7.95016 7.11124 7.94325 6.95456 7.9359L6.88669 7.93273C6.70963 7.92451 6.52003 7.91641 6.33427 7.91641Z" fill="#2E3039"/> | ||||
|     <path d="M14.722 19.3201C14.846 19.5841 15.111 19.7501 15.4 19.7501C15.4169 19.7501 15.4339 19.7491 15.4508 19.7481C15.7598 19.7271 16.023 19.5201 16.116 19.2251L17.741 14.0561L18.516 15.6991L18.5166 15.7004C18.8493 16.4046 19.0503 16.8303 19.49 17.1181C19.943 17.4171 20.427 17.4171 21.161 17.4171H22.001C22.415 17.4171 22.751 17.0811 22.751 16.6671C22.751 16.2531 22.415 15.9171 22.001 15.9171H21.161C20.767 15.9171 20.394 15.9171 20.314 15.8641C20.226 15.8061 20.054 15.4431 19.872 15.0571L18.28 11.6801C18.149 11.4011 17.859 11.2321 17.551 11.2521C17.242 11.2731 16.979 11.4801 16.886 11.7751L15.261 16.9441L14.4854 15.2998C14.1528 14.5956 13.9517 14.1699 13.512 13.8821C13.059 13.5831 12.575 13.5831 11.841 13.5831H11.001C10.587 13.5831 10.251 13.9191 10.251 14.3331C10.251 14.7471 10.587 15.0831 11.001 15.0831H11.841C12.235 15.0831 12.608 15.0831 12.688 15.1361C12.776 15.1941 12.948 15.5571 13.13 15.9431L14.722 19.3201Z" fill="#2E3039"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 3.5 KiB | 
| @ -0,0 +1,5 @@ | ||||
| <svg width="17" height="14" viewBox="0 0 17 14" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M8.54506 0.437605L3.32411 0.437604C2.84467 0.437559 2.4139 0.437518 2.06523 0.484153C1.68457 0.535068 1.29404 0.653291 0.974158 0.971528C0.793763 1.15099 0.677307 1.3528 0.600865 1.5626L5.49996 1.5626C6.43194 1.5626 7.18746 2.31812 7.18746 3.2501C7.18746 4.15168 6.48043 4.88812 5.59059 4.93521C5.65332 5.11182 5.68746 5.30198 5.68746 5.5001C5.68746 6.43208 4.93194 7.1876 3.99996 7.1876L0.437465 7.1876L0.437466 9.21693C0.437448 9.53248 0.437432 9.81647 0.458872 10.0518C0.481892 10.3045 0.534171 10.5718 0.682959 10.8282C0.843783 11.1053 1.0751 11.3355 1.35366 11.4955C1.61136 11.6435 2.12009 11.7101 2.37407 11.733C2.68727 12.7906 3.67059 13.5626 4.83516 13.5626C5.99726 13.5626 6.97888 12.7939 7.29424 11.7397L9.70556 11.7397C10.0209 12.7939 11.0025 13.5626 12.1646 13.5626C13.3292 13.5626 14.3125 12.7906 14.6257 11.733C14.8797 11.7101 15.3884 11.6435 15.6461 11.4955C15.9247 11.3355 16.156 11.1053 16.3168 10.8282C16.4656 10.5718 16.5179 10.3045 16.5409 10.0518C16.5624 9.81644 16.5624 9.53251 16.5623 9.21692L16.5624 7.18478C16.5628 6.94077 16.5632 6.69385 16.4958 6.45188C16.4285 6.20991 16.3004 5.99839 16.1739 5.78936L14.8845 3.65164C14.7411 3.41373 14.6079 3.19281 14.4767 3.01653C14.3315 2.8214 14.1572 2.63587 13.9109 2.49714C13.6646 2.35841 13.415 2.30518 13.1721 2.28169C12.9527 2.26047 12.6937 2.2605 12.4149 2.26052L11.4066 2.26052C11.3555 1.88182 11.2149 1.28976 10.895 0.971527C10.5751 0.65329 10.1846 0.535068 9.80393 0.484153C9.45526 0.437518 9.0245 0.437559 8.54506 0.437605ZM11.4322 8.56412C11.6645 8.49536 11.9105 8.45843 12.1652 8.45843C13.3244 8.45843 14.3041 9.22339 14.6219 10.2736C14.9602 10.2736 15.097 10.0518 15.097 9.91677L15.097 6.84114L13.1897 3.71885L11.4322 3.71885L11.4322 8.56412ZM4.83571 9.91677C4.22852 9.91677 3.73629 10.4065 3.73629 11.0105C3.73629 11.6146 4.22852 12.1043 4.83571 12.1043C5.44291 12.1043 5.93514 11.6146 5.93514 11.0105C5.93514 10.4065 5.44291 9.91677 4.83571 9.91677ZM11.0658 11.0105C11.0658 10.4065 11.558 9.91677 12.1652 9.91677C12.7724 9.91677 13.2646 10.4065 13.2646 11.0105C13.2646 11.6146 12.7724 12.1043 12.1652 12.1043C11.558 12.1043 11.0658 11.6146 11.0658 11.0105Z" fill="#18C273"/> | ||||
|     <path d="M0.999965 2.6876C0.689305 2.6876 0.437465 2.93944 0.437466 3.2501C0.437465 3.56076 0.689305 3.8126 0.999965 3.8126L5.49996 3.8126C5.81062 3.8126 6.06246 3.56076 6.06246 3.2501C6.06247 2.93944 5.81063 2.6876 5.49996 2.6876L0.999965 2.6876Z" fill="#18C273"/> | ||||
|     <path d="M0.999965 4.9376C0.689305 4.9376 0.437464 5.18944 0.437465 5.5001C0.437464 5.81076 0.689305 6.0626 0.999965 6.0626L3.99996 6.0626C4.31062 6.0626 4.56246 5.81076 4.56246 5.5001C4.56246 5.18944 4.31063 4.9376 3.99997 4.9376L0.999965 4.9376Z" fill="#18C273"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.8 KiB | 
| @ -0,0 +1,5 @@ | ||||
| <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path d="M8.61828 8.81338C8.56618 8.81254 8.50595 8.81251 8.43164 8.81251C8.12098 8.81251 7.86914 8.56067 7.86914 8.25001C7.86914 7.93935 8.12098 7.68751 8.43164 7.68751L8.45747 7.68751C8.61131 7.68745 8.77766 7.68738 8.91807 7.70626C9.08256 7.72837 9.2927 7.78525 9.46955 7.9621C9.6464 8.13895 9.70328 8.34909 9.7254 8.51358C9.74427 8.654 9.74421 8.82034 9.74415 8.97418L9.74414 12.75C9.74414 13.0607 9.4923 13.3125 9.18164 13.3125C8.87098 13.3125 8.61914 13.0607 8.61914 12.75L8.61914 9.00001C8.61914 8.9257 8.61912 8.86547 8.61828 8.81338Z" fill="#898A8D"/> | ||||
|     <path d="M8.99414 5.25C8.57993 5.25 8.24414 5.58579 8.24414 6C8.24414 6.41421 8.57993 6.75 8.99414 6.75H9.00088C9.41509 6.75 9.75088 6.41421 9.75088 6C9.75088 5.58579 9.41509 5.25 9.00088 5.25H8.99414Z" fill="#898A8D"/> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M0.9375 9C0.9375 13.4528 4.5472 17.0625 9 17.0625C13.4528 17.0625 17.0625 13.4528 17.0625 9C17.0625 4.5472 13.4528 0.9375 9 0.9375C4.5472 0.9375 0.9375 4.5472 0.9375 9ZM9 15.9375C5.16852 15.9375 2.0625 12.8315 2.0625 9C2.0625 5.16852 5.16852 2.0625 9 2.0625C12.8315 2.0625 15.9375 5.16852 15.9375 9C15.9375 12.8315 12.8315 15.9375 9 15.9375Z" fill="#898A8D"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.3 KiB | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path d="M6.99772 0.228516C7.6098 0.228516 8.09193 0.690826 8.39973 1.31463L9.42758 3.38736C9.45875 3.45151 9.53263 3.54184 9.64371 3.62447C9.75466 3.70702 9.86332 3.75256 9.9348 3.76457L11.7954 4.07626C12.4675 4.18919 13.0308 4.51864 13.2137 5.09229C13.3964 5.66547 13.1287 6.26112 12.6454 6.74531L12.6449 6.74578L11.1995 8.20318C11.1422 8.26094 11.078 8.36976 11.0378 8.51152C10.9978 8.65233 10.9942 8.78058 11.0124 8.86345L11.0126 8.8646L11.4262 10.6675C11.5977 11.4179 11.5409 12.1619 11.0116 12.551C10.4806 12.9413 9.7549 12.7683 9.09564 12.3756L7.35149 11.3346C7.27825 11.2908 7.15246 11.2554 7.00064 11.2554C6.84993 11.2554 6.7215 11.2904 6.64349 11.3358L6.64239 11.3364L4.90168 12.3754C4.2432 12.7694 3.5184 12.9394 2.98731 12.5486C2.45845 12.1596 2.39875 11.4169 2.57081 10.6671L2.98427 8.8646L2.98453 8.86345C3.00266 8.78058 2.99911 8.65233 2.95913 8.51152C2.91888 8.36976 2.85471 8.26094 2.79742 8.20318L1.35091 6.74472C0.87071 6.26055 0.603871 5.66542 0.785136 5.09308C0.96693 4.51907 1.52917 4.18923 2.20169 4.07622L4.06077 3.76479L4.06136 3.76469C4.12952 3.75287 4.23658 3.70784 4.34728 3.62508C4.45819 3.54217 4.53226 3.45164 4.56349 3.38736L4.56506 3.38416L5.59161 1.31408L5.59202 1.31327C5.90273 0.689977 6.38635 0.228516 6.99772 0.228516Z" fill="#FFAF15"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.3 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,6 @@ | ||||
| <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="M18.0365 1.25H17.9635C17.2243 1.24999 16.6168 1.24998 16.1253 1.29671C15.6146 1.34527 15.1522 1.44953 14.7317 1.70725C14.3141 1.96311 13.9631 2.31414 13.7072 2.73166C13.4495 3.15221 13.3453 3.61456 13.2967 4.12529C13.25 4.61679 13.25 5.2243 13.25 5.96344V6.03655C13.25 6.77569 13.25 7.38322 13.2967 7.87471C13.3453 8.38545 13.4495 8.84779 13.7072 9.26834C13.9631 9.68586 14.3141 10.0369 14.7317 10.2928C15.1522 10.5505 15.6146 10.6547 16.1253 10.7033C16.6168 10.75 17.2243 10.75 17.9634 10.75H18.0366C18.7757 10.75 19.3832 10.75 19.8747 10.7033C20.3854 10.6547 20.8478 10.5505 21.2683 10.2928C21.6859 10.0369 22.0369 9.68586 22.2928 9.26834C22.5505 8.84779 22.6547 8.38545 22.7033 7.87471C22.75 7.38322 22.75 6.7757 22.75 6.03656V5.96344C22.75 5.2243 22.75 4.61679 22.7033 4.12529C22.6547 3.61456 22.5505 3.15221 22.2928 2.73166C22.0369 2.31414 21.6859 1.96311 21.2683 1.70725C20.8478 1.44953 20.3854 1.34527 19.8747 1.29671C19.3832 1.24998 18.7757 1.24999 18.0365 1.25ZM15.5154 2.98621C15.6607 2.8972 15.8663 2.8281 16.2673 2.78997C16.6794 2.75079 17.2153 2.75 18 2.75C18.7847 2.75 19.3206 2.75079 19.7327 2.78997C20.1337 2.8281 20.3393 2.8972 20.4846 2.98621C20.7003 3.11838 20.8816 3.29972 21.0138 3.51541C21.1028 3.66067 21.1719 3.86634 21.21 4.26727C21.2492 4.67937 21.25 5.21526 21.25 6C21.25 6.78474 21.2492 7.32063 21.21 7.73273C21.1719 8.13367 21.1028 8.33934 21.0138 8.48459C20.8816 8.70028 20.7003 8.88162 20.4846 9.01379C20.3393 9.10281 20.1337 9.17191 19.7327 9.21003C19.3206 9.24921 18.7847 9.25 18 9.25C17.2153 9.25 16.6794 9.24921 16.2673 9.21003C15.8663 9.17191 15.6607 9.10281 15.5154 9.01379C15.2997 8.88162 15.1184 8.70028 14.9862 8.48459C14.8972 8.33934 14.8281 8.13367 14.79 7.73273C14.7508 7.32063 14.75 6.78474 14.75 6C14.75 5.21526 14.7508 4.67937 14.79 4.26727C14.8281 3.86634 14.8972 3.66067 14.9862 3.51541C15.1184 3.29972 15.2997 3.11838 15.5154 2.98621Z" fill="#2B353E"/> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M5.96345 1.25H6.03655C6.77569 1.24999 7.38322 1.24998 7.87471 1.29671C8.38545 1.34527 8.84779 1.44953 9.26834 1.70725C9.68586 1.96311 10.0369 2.31414 10.2928 2.73166C10.5505 3.15221 10.6547 3.61456 10.7033 4.12529C10.75 4.61678 10.75 5.22428 10.75 5.96341V6.03656C10.75 6.77569 10.75 7.38322 10.7033 7.87471C10.6547 8.38545 10.5505 8.84779 10.2928 9.26834C10.0369 9.68586 9.68586 10.0369 9.26834 10.2928C8.84779 10.5505 8.38545 10.6547 7.87471 10.7033C7.38322 10.75 6.77572 10.75 6.03659 10.75H5.96344C5.22431 10.75 4.61678 10.75 4.12529 10.7033C3.61456 10.6547 3.15221 10.5505 2.73166 10.2928C2.31414 10.0369 1.96311 9.68586 1.70725 9.26834C1.44953 8.84779 1.34527 8.38545 1.29671 7.87471C1.24998 7.38322 1.24999 6.7757 1.25 6.03656V5.96345C1.24999 5.22431 1.24998 4.61679 1.29671 4.12529C1.34527 3.61456 1.44953 3.15221 1.70725 2.73166C1.96311 2.31414 2.31414 1.96311 2.73166 1.70725C3.15221 1.44953 3.61456 1.34527 4.12529 1.29671C4.61679 1.24998 5.22431 1.24999 5.96345 1.25ZM4.26727 2.78997C3.86634 2.8281 3.66067 2.8972 3.51541 2.98621C3.29972 3.11838 3.11838 3.29972 2.98621 3.51541C2.8972 3.66067 2.8281 3.86634 2.78997 4.26727C2.75079 4.67937 2.75 5.21526 2.75 6C2.75 6.78474 2.75079 7.32063 2.78997 7.73273C2.8281 8.13367 2.8972 8.33934 2.98621 8.48459C3.11838 8.70028 3.29972 8.88162 3.51541 9.01379C3.66067 9.10281 3.86634 9.17191 4.26727 9.21003C4.67937 9.24921 5.21526 9.25 6 9.25C6.78474 9.25 7.32063 9.24921 7.73273 9.21003C8.13367 9.17191 8.33934 9.10281 8.48459 9.01379C8.70028 8.88162 8.88162 8.70028 9.01379 8.48459C9.10281 8.33934 9.17191 8.13367 9.21003 7.73273C9.24921 7.32063 9.25 6.78474 9.25 6C9.25 5.21526 9.24921 4.67937 9.21003 4.26727C9.17191 3.86634 9.10281 3.66067 9.01379 3.51541C8.88162 3.29972 8.70028 3.11838 8.48459 2.98621C8.33934 2.8972 8.13367 2.8281 7.73273 2.78997C7.32063 2.75079 6.78474 2.75 6 2.75C5.21526 2.75 4.67937 2.75079 4.26727 2.78997Z" fill="#2B353E"/> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M5.96345 13.25C5.22433 13.25 4.61678 13.25 4.12529 13.2967C3.61456 13.3453 3.15221 13.4495 2.73166 13.7072C2.31414 13.9631 1.96311 14.3141 1.70725 14.7317C1.44953 15.1522 1.34527 15.6146 1.29671 16.1253C1.24998 16.6168 1.24999 17.2243 1.25 17.9635V18.0365C1.24999 18.7757 1.24998 19.3832 1.29671 19.8747C1.34527 20.3854 1.44953 20.8478 1.70725 21.2683C1.96311 21.6859 2.31414 22.0369 2.73166 22.2928C3.15221 22.5505 3.61456 22.6547 4.12529 22.7033C4.61679 22.75 5.2243 22.75 5.96344 22.75H6.03656C6.7757 22.75 7.38322 22.75 7.87471 22.7033C8.38545 22.6547 8.84779 22.5505 9.26834 22.2928C9.68586 22.0369 10.0369 21.6859 10.2928 21.2683C10.5505 20.8478 10.6547 20.3854 10.7033 19.8747C10.75 19.3832 10.75 18.7757 10.75 18.0366V17.9634C10.75 17.2243 10.75 16.6168 10.7033 16.1253C10.6547 15.6146 10.5505 15.1522 10.2928 14.7317C10.0369 14.3141 9.68586 13.9631 9.26834 13.7072C8.84779 13.4495 8.38545 13.3453 7.87471 13.2967C7.38322 13.25 6.77572 13.25 6.03659 13.25H5.96345ZM3.51541 14.9862C3.66067 14.8972 3.86634 14.8281 4.26727 14.79C4.67937 14.7508 5.21526 14.75 6 14.75C6.78474 14.75 7.32063 14.7508 7.73273 14.79C8.13367 14.8281 8.33934 14.8972 8.48459 14.9862C8.70028 15.1184 8.88162 15.2997 9.01379 15.5154C9.10281 15.6607 9.17191 15.8663 9.21003 16.2673C9.24921 16.6794 9.25 17.2153 9.25 18C9.25 18.7847 9.24921 19.3206 9.21003 19.7327C9.17191 20.1337 9.10281 20.3393 9.01379 20.4846C8.88162 20.7003 8.70028 20.8816 8.48459 21.0138C8.33934 21.1028 8.13367 21.1719 7.73273 21.21C7.32063 21.2492 6.78474 21.25 6 21.25C5.21526 21.25 4.67937 21.2492 4.26727 21.21C3.86634 21.1719 3.66067 21.1028 3.51541 21.0138C3.29972 20.8816 3.11838 20.7003 2.98621 20.4846C2.8972 20.3393 2.8281 20.1337 2.78997 19.7327C2.75079 19.3206 2.75 18.7847 2.75 18C2.75 17.2153 2.75079 16.6794 2.78997 16.2673C2.8281 15.8663 2.8972 15.6607 2.98621 15.5154C3.11838 15.2997 3.29972 15.1184 3.51541 14.9862Z" fill="#2B353E"/> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M19.8747 13.2967C19.3832 13.25 18.7757 13.25 18.0365 13.25H17.9635C17.2243 13.25 16.6168 13.25 16.1253 13.2967C15.6146 13.3453 15.1522 13.4495 14.7317 13.7072C14.3141 13.9631 13.9631 14.3141 13.7072 14.7317C13.4495 15.1522 13.3453 15.6146 13.2967 16.1253C13.25 16.6168 13.25 17.2243 13.25 17.9635V18.0365C13.25 18.7757 13.25 19.3832 13.2967 19.8747C13.3453 20.3854 13.4495 20.8478 13.7072 21.2683C13.9631 21.6859 14.3141 22.0369 14.7317 22.2928C15.1522 22.5505 15.6146 22.6547 16.1253 22.7033C16.6168 22.75 17.2243 22.75 17.9634 22.75H18.0366C18.7757 22.75 19.3832 22.75 19.8747 22.7033C20.3854 22.6547 20.8478 22.5505 21.2683 22.2928C21.6859 22.0369 22.0369 21.6859 22.2928 21.2683C22.5505 20.8478 22.6547 20.3854 22.7033 19.8747C22.75 19.3832 22.75 18.7757 22.75 18.0366V17.9634C22.75 17.2243 22.75 16.6168 22.7033 16.1253C22.6547 15.6146 22.5505 15.1522 22.2928 14.7317C22.0369 14.3141 21.6859 13.9631 21.2683 13.7072C20.8478 13.4495 20.3854 13.3453 19.8747 13.2967ZM15.5154 14.9862C15.6607 14.8972 15.8663 14.8281 16.2673 14.79C16.6794 14.7508 17.2153 14.75 18 14.75C18.7847 14.75 19.3206 14.7508 19.7327 14.79C20.1337 14.8281 20.3393 14.8972 20.4846 14.9862C20.7003 15.1184 20.8816 15.2997 21.0138 15.5154C21.1028 15.6607 21.1719 15.8663 21.21 16.2673C21.2492 16.6794 21.25 17.2153 21.25 18C21.25 18.7847 21.2492 19.3206 21.21 19.7327C21.1719 20.1337 21.1028 20.3393 21.0138 20.4846C20.8816 20.7003 20.7003 20.8816 20.4846 21.0138C20.3393 21.1028 20.1337 21.1719 19.7327 21.21C19.3206 21.2492 18.7847 21.25 18 21.25C17.2153 21.25 16.6794 21.2492 16.2673 21.21C15.8663 21.1719 15.6607 21.1028 15.5154 21.0138C15.2997 20.8816 15.1184 20.7003 14.9862 20.4846C14.8972 20.3393 14.8281 20.1337 14.79 19.7327C14.7508 19.3206 14.75 18.7847 14.75 18C14.75 17.2153 14.7508 16.6794 14.79 16.2673C14.8281 15.8663 14.8972 15.6607 14.9862 15.5154C15.1184 15.2997 15.2997 15.1184 15.5154 14.9862Z" fill="#2B353E"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 7.7 KiB | 
| @ -0,0 +1,3 @@ | ||||
| <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6755 0.250001H10.3249H10.3249C9.57944 0.249979 8.95503 0.249961 8.44574 0.310259C7.90564 0.374204 7.4198 0.512689 6.98229 0.839704C6.54707 1.16501 6.27137 1.59351 6.04579 2.09636C5.84333 2.54769 5.65709 3.11709 5.43793 3.79842C5.03855 3.8204 4.67016 3.85235 4.33103 3.89881C3.20972 4.05243 2.29737 4.37711 1.5785 5.10965C0.86155 5.84022 0.545531 6.76413 0.395669 7.89997C0.249973 9.00424 0.249985 10.4149 0.25 12.1947V12.1947V12.3053V12.3053C0.249985 14.0851 0.249973 15.4958 0.395669 16.6C0.545531 17.7359 0.86155 18.6598 1.5785 19.3904C2.29737 20.1229 3.20972 20.4476 4.33103 20.6012C5.41745 20.75 6.80415 20.75 8.54827 20.75H8.54833H10.0065C10.4207 20.75 10.7565 20.4142 10.7565 20C10.7565 19.5858 10.4207 19.25 10.0065 19.25H8.60546C6.79124 19.25 5.50744 19.2483 4.53463 19.1151C3.58487 18.985 3.04401 18.7421 2.64909 18.3397C2.25225 17.9353 2.01137 17.3784 1.88278 16.4038C1.75154 15.4091 1.75 14.0975 1.75 12.25C1.75 10.4025 1.75154 9.09092 1.88278 8.09618C2.01137 7.12159 2.25225 6.56467 2.64909 6.16028C3.04401 5.75785 3.58487 5.51505 4.53463 5.38493C5.50744 5.25165 6.79125 5.25 8.60546 5.25H12.4082C14.2224 5.25 15.5062 5.25165 16.479 5.38493C17.4288 5.51505 17.9696 5.75785 18.3646 6.16028C18.9865 6.79405 19.2039 7.77267 19.2502 10.0155C19.2587 10.4296 19.6013 10.7584 20.0155 10.7498C20.4296 10.7413 20.7584 10.3987 20.7498 9.98453C20.705 7.80913 20.5271 6.22233 19.4352 5.10965C18.7163 4.37711 17.8039 4.05243 16.6826 3.89881C16.3397 3.85183 15.9668 3.81968 15.5622 3.79768C15.3432 3.11668 15.157 2.54753 14.9546 2.09636C14.729 1.59351 14.4533 1.16501 14.0181 0.839704C13.5806 0.512689 13.0948 0.374204 12.5547 0.310259C12.0454 0.249961 11.421 0.249979 10.6755 0.250001H10.6755ZM13.9709 3.75428C13.8263 3.31583 13.7073 2.98059 13.586 2.71031C13.4168 2.33303 13.2741 2.1563 13.1201 2.04117C12.9683 1.92775 12.7682 1.84602 12.3783 1.79985C11.9675 1.75122 11.4324 1.75 10.6318 1.75H10.3686C9.56803 1.75 9.03288 1.75122 8.6221 1.79985C8.2322 1.84602 8.03207 1.92775 7.88033 2.04117C7.72631 2.1563 7.58364 2.33303 7.41439 2.71031C7.29313 2.98062 7.17408 3.3159 7.02944 3.7544C7.50262 3.74999 8.00836 3.75 8.54836 3.75H12.4653C13.0002 3.75 13.5016 3.74999 13.9709 3.75428ZM16.5 12.75C14.4289 12.75 12.75 14.4289 12.75 16.5C12.75 18.5711 14.4289 20.25 16.5 20.25C18.5711 20.25 20.25 18.5711 20.25 16.5C20.25 14.4289 18.5711 12.75 16.5 12.75ZM11.25 16.5C11.25 13.6005 13.6005 11.25 16.5 11.25C19.3995 11.25 21.75 13.6005 21.75 16.5C21.75 19.3995 19.3995 21.75 16.5 21.75C13.6005 21.75 11.25 19.3995 11.25 16.5ZM16.5088 13.725C16.923 13.725 17.2588 14.0608 17.2588 14.475V16.5C17.2588 16.9142 16.923 17.25 16.5088 17.25C16.0946 17.25 15.7588 16.9142 15.7588 16.5V14.475C15.7588 14.0608 16.0946 13.725 16.5088 13.725ZM15.75 18.525C15.75 18.1108 16.0858 17.775 16.5 17.775H16.5081C16.9223 17.775 17.2581 18.1108 17.2581 18.525C17.2581 18.9392 16.9223 19.275 16.5081 19.275H16.5C16.0858 19.275 15.75 18.9392 15.75 18.525Z" fill="#2B353E"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 3.0 KiB | 
| @ -0,0 +1,5 @@ | ||||
| <svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||
|     <path d="M0.750003 0.5C1.16422 0.5 1.5 0.835786 1.5 1.25L1.5 9.5C1.5 10.7586 1.5016 11.6272 1.58942 12.2804C1.62819 12.5687 1.67538 12.8924 1.83848 13.1422C1.95715 12.8856 2.07191 12.6272 2.18665 12.3689C2.47248 11.7253 2.75821 11.0819 3.10416 10.4668C3.43746 9.87424 3.83965 9.27939 4.33108 8.82579C4.82903 8.36617 5.46164 8.01415 6.22936 8.01415C7.27311 8.01415 7.92788 8.68468 8.3481 9.11502L8.39122 9.15913C8.88116 9.65927 9.11532 9.85377 9.45987 9.85377C9.81442 9.85377 10.0587 9.72072 10.2997 9.45678C10.5904 9.13855 10.797 8.74892 10.9993 8.36753C11.035 8.30022 11.0706 8.23315 11.1065 8.16679C11.6292 7.1996 12.4126 5.75 14.2497 5.75C14.6639 5.75 14.9997 6.08579 14.9997 6.5C14.9997 6.91421 14.6639 7.25 14.2497 7.25C13.3951 7.25 12.9972 7.82361 12.4106 8.90856L12.3554 9.01102C12.1052 9.47556 11.8051 10.0328 11.4073 10.4683C10.9456 10.9739 10.3217 11.3538 9.45987 11.3538C8.43569 11.3538 7.78734 10.6885 7.37321 10.2636C7.33984 10.2294 7.30593 10.1938 7.27138 10.1575C6.98691 9.85872 6.65883 9.51415 6.22936 9.51415C5.95327 9.51415 5.66691 9.63409 5.34846 9.92803C5.02348 10.228 4.71182 10.6683 4.41154 11.2022C4.08981 11.7742 3.82488 12.3731 3.55988 12.9722C3.42272 13.2822 3.28554 13.5923 3.14046 13.8988C3.16661 13.9031 3.19299 13.907 3.2196 13.9106C3.87283 13.9984 4.74136 14 6 14L14.25 14C14.6642 14 15 14.3358 15 14.75C15 15.1642 14.6642 15.5 14.25 15.5L5.946 15.5C4.7545 15.5 3.78462 15.5 3.01973 15.3972C2.22174 15.2899 1.53552 15.0585 0.988517 14.5115C0.441518 13.9645 0.210083 13.2783 0.102796 12.4803C-3.90597e-05 11.7154 -2.12493e-05 10.7455 6.35895e-07 9.55404L6.35895e-07 1.25C6.35895e-07 0.835786 0.335789 0.5 0.750003 0.5Z" fill="#ED1C2B"/> | ||||
|     <path d="M4.5 2C4.91421 2 5.25 1.66421 5.25 1.25C5.25 0.835786 4.91421 0.5 4.5 0.5L3.75 0.5C3.33579 0.5 3 0.835786 3 1.25C3 1.66421 3.33579 2 3.75 2L4.5 2Z" fill="#ED1C2B"/> | ||||
|     <path d="M6.75 5C7.16421 5 7.5 4.66421 7.5 4.25C7.5 3.83579 7.16421 3.5 6.75 3.5L3.75 3.5C3.33579 3.5 3 3.83579 3 4.25C3 4.66421 3.33579 5 3.75 5L6.75 5Z" fill="#ED1C2B"/> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.1 KiB | 
| @ -0,0 +1,29 @@ | ||||
| import 'dart:convert'; | ||||
| 
 | ||||
| class NationalityCountries { | ||||
|   String? id; | ||||
|   String? name; | ||||
|   String? nameN; | ||||
| 
 | ||||
|   NationalityCountries({ | ||||
|     this.id, | ||||
|     this.name, | ||||
|     this.nameN, | ||||
|   }); | ||||
| 
 | ||||
|   factory NationalityCountries.fromRawJson(String str) => NationalityCountries.fromJson(json.decode(str)); | ||||
| 
 | ||||
|   String toRawJson() => json.encode(toJson()); | ||||
| 
 | ||||
|   factory NationalityCountries.fromJson(Map<String, dynamic> json) => NationalityCountries( | ||||
|     id: json["ID"], | ||||
|     name: json["Name"], | ||||
|     nameN: json["NameN"], | ||||
|   ); | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() => { | ||||
|     "ID": id, | ||||
|     "Name": name, | ||||
|     "NameN": nameN, | ||||
|   }; | ||||
| } | ||||
| @ -0,0 +1,78 @@ | ||||
| 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": "1018977", | ||||
|       "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() | ||||
|                 .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,174 @@ | ||||
| class PatientPrescriptionsResponseModel { | ||||
|   String? setupID; | ||||
|   int? projectID; | ||||
|   int? patientID; | ||||
|   int? appointmentNo; | ||||
|   String? appointmentDate; | ||||
|   String? doctorName; | ||||
|   String? clinicDescription; | ||||
|   String? name; | ||||
|   int? episodeID; | ||||
|   num? actualDoctorRate; | ||||
|   int? admission; | ||||
|   int? clinicID; | ||||
|   String? companyName; | ||||
|   num? decimalDoctorRate; | ||||
|   String? despensedStatus; | ||||
|   String? dischargeDate; | ||||
|   int? dischargeNo; | ||||
|   int? doctorID; | ||||
|   String? doctorImageURL; | ||||
|   num? doctorRate; | ||||
|   num? doctorStarsRate; | ||||
|   String? doctorTitle; | ||||
|   int? gender; | ||||
|   String? genderDescription; | ||||
|   bool? isActiveDoctorProfile; | ||||
|   bool? isDoctorAllowVedioCall; | ||||
|   bool? isExecludeDoctor; | ||||
|   bool? isHomeMedicineDeliverySupported; | ||||
|   bool? isInOutPatient; | ||||
|   String? isInOutPatientDescription; | ||||
|   String? isInOutPatientDescriptionN; | ||||
|   bool? isInsurancePatient; | ||||
|   bool? isLiveCareAppointment; | ||||
|   String? nationalityFlagURL; | ||||
|   int? noOfPatientsRate; | ||||
|   String? qR; | ||||
| 
 | ||||
|   // List<String>? speciality; | ||||
|   String? strAppointmentDate; | ||||
| 
 | ||||
|   PatientPrescriptionsResponseModel( | ||||
|       {this.setupID, | ||||
|       this.projectID, | ||||
|       this.patientID, | ||||
|       this.appointmentNo, | ||||
|       this.appointmentDate, | ||||
|       this.doctorName, | ||||
|       this.clinicDescription, | ||||
|       this.name, | ||||
|       this.episodeID, | ||||
|       this.actualDoctorRate, | ||||
|       this.admission, | ||||
|       this.clinicID, | ||||
|       this.companyName, | ||||
|       this.decimalDoctorRate, | ||||
|       this.despensedStatus, | ||||
|       this.dischargeDate, | ||||
|       this.dischargeNo, | ||||
|       this.doctorID, | ||||
|       this.doctorImageURL, | ||||
|       this.doctorRate, | ||||
|       this.doctorStarsRate, | ||||
|       this.doctorTitle, | ||||
|       this.gender, | ||||
|       this.genderDescription, | ||||
|       this.isActiveDoctorProfile, | ||||
|       this.isDoctorAllowVedioCall, | ||||
|       this.isExecludeDoctor, | ||||
|       this.isHomeMedicineDeliverySupported, | ||||
|       this.isInOutPatient, | ||||
|       this.isInOutPatientDescription, | ||||
|       this.isInOutPatientDescriptionN, | ||||
|       this.isInsurancePatient, | ||||
|       this.isLiveCareAppointment, | ||||
|       this.nationalityFlagURL, | ||||
|       this.noOfPatientsRate, | ||||
|       this.qR, | ||||
|       // this.speciality, | ||||
|       this.strAppointmentDate}); | ||||
| 
 | ||||
|   PatientPrescriptionsResponseModel.fromJson(Map<String, dynamic> json) { | ||||
|     setupID = json['SetupID']; | ||||
|     projectID = json['ProjectID']; | ||||
|     patientID = json['PatientID']; | ||||
|     appointmentNo = json['AppointmentNo']; | ||||
|     appointmentDate = json['AppointmentDate']; | ||||
|     doctorName = json['DoctorName']; | ||||
|     clinicDescription = json['ClinicDescription']; | ||||
|     name = json['Name']; | ||||
|     episodeID = json['EpisodeID']; | ||||
|     actualDoctorRate = json['ActualDoctorRate']; | ||||
|     admission = json['Admission']; | ||||
|     clinicID = json['ClinicID']; | ||||
|     companyName = json['CompanyName']; | ||||
|     decimalDoctorRate = json['DecimalDoctorRate']; | ||||
|     despensedStatus = json['Despensed_Status']; | ||||
|     dischargeDate = json['DischargeDate']; | ||||
|     dischargeNo = json['DischargeNo']; | ||||
|     doctorID = json['DoctorID']; | ||||
|     doctorImageURL = json['DoctorImageURL']; | ||||
|     doctorRate = json['DoctorRate']; | ||||
|     doctorStarsRate = json['DoctorStarsRate']; | ||||
|     doctorTitle = json['DoctorTitle']; | ||||
|     gender = json['Gender']; | ||||
|     genderDescription = json['GenderDescription']; | ||||
|     isActiveDoctorProfile = json['IsActiveDoctorProfile']; | ||||
|     isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; | ||||
|     isExecludeDoctor = json['IsExecludeDoctor']; | ||||
|     isHomeMedicineDeliverySupported = json['IsHomeMedicineDeliverySupported']; | ||||
|     isInOutPatient = json['IsInOutPatient']; | ||||
|     isInOutPatientDescription = json['IsInOutPatientDescription']; | ||||
|     isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; | ||||
|     isInsurancePatient = json['IsInsurancePatient']; | ||||
|     isLiveCareAppointment = json['IsLiveCareAppointment']; | ||||
|     nationalityFlagURL = json['NationalityFlagURL']; | ||||
|     noOfPatientsRate = json['NoOfPatientsRate']; | ||||
|     qR = json['QR']; | ||||
|     // speciality = json['Speciality'].cast<String>(); | ||||
|     strAppointmentDate = json['StrAppointmentDate']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['SetupID'] = this.setupID; | ||||
|     data['ProjectID'] = this.projectID; | ||||
|     data['PatientID'] = this.patientID; | ||||
|     data['AppointmentNo'] = this.appointmentNo; | ||||
|     data['AppointmentDate'] = this.appointmentDate; | ||||
|     data['DoctorName'] = this.doctorName; | ||||
|     data['ClinicDescription'] = this.clinicDescription; | ||||
|     data['Name'] = this.name; | ||||
|     data['EpisodeID'] = this.episodeID; | ||||
|     data['ActualDoctorRate'] = this.actualDoctorRate; | ||||
|     data['Admission'] = this.admission; | ||||
|     data['ClinicID'] = this.clinicID; | ||||
|     data['CompanyName'] = this.companyName; | ||||
|     data['DecimalDoctorRate'] = this.decimalDoctorRate; | ||||
|     data['Despensed_Status'] = this.despensedStatus; | ||||
|     data['DischargeDate'] = this.dischargeDate; | ||||
|     data['DischargeNo'] = this.dischargeNo; | ||||
|     data['DoctorID'] = this.doctorID; | ||||
|     data['DoctorImageURL'] = this.doctorImageURL; | ||||
|     data['DoctorRate'] = this.doctorRate; | ||||
|     data['DoctorStarsRate'] = this.doctorStarsRate; | ||||
|     data['DoctorTitle'] = this.doctorTitle; | ||||
|     data['Gender'] = this.gender; | ||||
|     data['GenderDescription'] = this.genderDescription; | ||||
|     data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; | ||||
|     data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; | ||||
|     data['IsExecludeDoctor'] = this.isExecludeDoctor; | ||||
|     data['IsHomeMedicineDeliverySupported'] = this.isHomeMedicineDeliverySupported; | ||||
|     data['IsInOutPatient'] = this.isInOutPatient; | ||||
|     data['IsInOutPatientDescription'] = this.isInOutPatientDescription; | ||||
|     data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; | ||||
|     data['IsInsurancePatient'] = this.isInsurancePatient; | ||||
|     data['IsLiveCareAppointment'] = this.isLiveCareAppointment; | ||||
|     data['NationalityFlagURL'] = this.nationalityFlagURL; | ||||
|     data['NoOfPatientsRate'] = this.noOfPatientsRate; | ||||
|     data['QR'] = this.qR; | ||||
|     // data['Speciality'] = this.speciality; | ||||
|     data['StrAppointmentDate'] = this.strAppointmentDate; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class PrescriptionsList { | ||||
|   String? filterName = ""; | ||||
|   List<PatientPrescriptionsResponseModel>? prescriptionsList = []; | ||||
| 
 | ||||
|   PrescriptionsList({this.filterName, PatientPrescriptionsResponseModel? prescriptions}) { | ||||
|     prescriptionsList!.add(prescriptions!); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,144 @@ | ||||
| class PrescriptionDetailResponseModel { | ||||
|   String? address; | ||||
|   num? appointmentNo; | ||||
|   String? clinic; | ||||
|   dynamic companyName; | ||||
|   num? days; | ||||
|   String? doctorName; | ||||
|   num? doseDailyQuantity; | ||||
|   String? frequency; | ||||
|   num? frequencyNumber; | ||||
|   dynamic image; | ||||
|   dynamic imageExtension; | ||||
|   String? imageSRCUrl; | ||||
|   dynamic imageString; | ||||
|   String? imageThumbUrl; | ||||
|   String? isCovered; | ||||
|   String? itemDescription; | ||||
|   num? itemID; | ||||
|   String? orderDate; | ||||
|   num? patientID; | ||||
|   String? patientName; | ||||
|   String? phoneOffice1; | ||||
|   dynamic prescriptionQR; | ||||
|   num? prescriptionTimes; | ||||
|   dynamic productImage; | ||||
|   dynamic productImageBase64; | ||||
|   String? productImageString; | ||||
|   num? projectID; | ||||
|   String? projectName; | ||||
|   String? remarks; | ||||
|   String? route; | ||||
|   String? sKU; | ||||
|   num? scaleOffset; | ||||
|   String? startDate; | ||||
| 
 | ||||
|   PrescriptionDetailResponseModel( | ||||
|       {this.address, | ||||
|       this.appointmentNo, | ||||
|       this.clinic, | ||||
|       this.companyName, | ||||
|       this.days, | ||||
|       this.doctorName, | ||||
|       this.doseDailyQuantity, | ||||
|       this.frequency, | ||||
|       this.frequencyNumber, | ||||
|       this.image, | ||||
|       this.imageExtension, | ||||
|       this.imageSRCUrl, | ||||
|       this.imageString, | ||||
|       this.imageThumbUrl, | ||||
|       this.isCovered, | ||||
|       this.itemDescription, | ||||
|       this.itemID, | ||||
|       this.orderDate, | ||||
|       this.patientID, | ||||
|       this.patientName, | ||||
|       this.phoneOffice1, | ||||
|       this.prescriptionQR, | ||||
|       this.prescriptionTimes, | ||||
|       this.productImage, | ||||
|       this.productImageBase64, | ||||
|       this.productImageString, | ||||
|       this.projectID, | ||||
|       this.projectName, | ||||
|       this.remarks, | ||||
|       this.route, | ||||
|       this.sKU, | ||||
|       this.scaleOffset, | ||||
|       this.startDate}); | ||||
| 
 | ||||
|   PrescriptionDetailResponseModel.fromJson(Map<String, dynamic> json) { | ||||
|     address = json['Address']; | ||||
|     appointmentNo = json['AppointmentNo']; | ||||
|     clinic = json['Clinic']; | ||||
|     companyName = json['CompanyName']; | ||||
|     days = json['Days']; | ||||
|     doctorName = json['DoctorName']; | ||||
|     doseDailyQuantity = json['DoseDailyQuantity']; | ||||
|     frequency = json['Frequency']; | ||||
|     frequencyNumber = json['FrequencyNumber']; | ||||
|     image = json['Image']; | ||||
|     imageExtension = json['ImageExtension']; | ||||
|     imageSRCUrl = json['ImageSRCUrl']; | ||||
|     imageString = json['ImageString']; | ||||
|     imageThumbUrl = json['ImageThumbUrl']; | ||||
|     isCovered = json['IsCovered']; | ||||
|     itemDescription = json['ItemDescription']; | ||||
|     itemID = json['ItemID']; | ||||
|     orderDate = json['OrderDate']; | ||||
|     patientID = json['PatientID']; | ||||
|     patientName = json['PatientName']; | ||||
|     phoneOffice1 = json['PhoneOffice1']; | ||||
|     prescriptionQR = json['PrescriptionQR']; | ||||
|     prescriptionTimes = json['PrescriptionTimes']; | ||||
|     productImage = json['ProductImage']; | ||||
|     productImageBase64 = json['ProductImageBase64']; | ||||
|     productImageString = json['ProductImageString']; | ||||
|     projectID = json['ProjectID']; | ||||
|     projectName = json['ProjectName']; | ||||
|     remarks = json['Remarks']; | ||||
|     route = json['Route']; | ||||
|     sKU = json['SKU']; | ||||
|     scaleOffset = json['ScaleOffset']; | ||||
|     startDate = json['StartDate']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['Address'] = address; | ||||
|     data['AppointmentNo'] = appointmentNo; | ||||
|     data['Clinic'] = clinic; | ||||
|     data['CompanyName'] = companyName; | ||||
|     data['Days'] = days; | ||||
|     data['DoctorName'] = doctorName; | ||||
|     data['DoseDailyQuantity'] = doseDailyQuantity; | ||||
|     data['Frequency'] = frequency; | ||||
|     data['FrequencyNumber'] = frequencyNumber; | ||||
|     data['Image'] = image; | ||||
|     data['ImageExtension'] = imageExtension; | ||||
|     data['ImageSRCUrl'] = imageSRCUrl; | ||||
|     data['ImageString'] = imageString; | ||||
|     data['ImageThumbUrl'] = imageThumbUrl; | ||||
|     data['IsCovered'] = isCovered; | ||||
|     data['ItemDescription'] = itemDescription; | ||||
|     data['ItemID'] = itemID; | ||||
|     data['OrderDate'] = orderDate; | ||||
|     data['PatientID'] = patientID; | ||||
|     data['PatientName'] = patientName; | ||||
|     data['PhoneOffice1'] = phoneOffice1; | ||||
|     data['PrescriptionQR'] = prescriptionQR; | ||||
|     data['PrescriptionTimes'] = prescriptionTimes; | ||||
|     data['ProductImage'] = productImage; | ||||
|     data['ProductImageBase64'] = productImageBase64; | ||||
|     data['ProductImageString'] = productImageString; | ||||
|     data['ProjectID'] = projectID; | ||||
|     data['ProjectName'] = projectName; | ||||
|     data['Remarks'] = remarks; | ||||
|     data['Route'] = route; | ||||
|     data['SKU'] = sKU; | ||||
|     data['ScaleOffset'] = scaleOffset; | ||||
|     data['StartDate'] = startDate; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,141 @@ | ||||
| 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/prescriptions/models/resp_models/patient_prescriptions_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/features/prescriptions/models/resp_models/prescription_detail_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/services/logger_service.dart'; | ||||
| 
 | ||||
| abstract class PrescriptionsRepo { | ||||
|   Future<Either<Failure, GenericApiModel<List<PatientPrescriptionsResponseModel>>>> getPatientPrescriptionOrders({required String patientId}); | ||||
| 
 | ||||
|   Future<Either<Failure, GenericApiModel<List<PrescriptionDetailResponseModel>>>> getPatientPrescriptionDetails({required PatientPrescriptionsResponseModel prescriptionsResponseModel}); | ||||
| } | ||||
| 
 | ||||
| class PrescriptionsRepoImp implements PrescriptionsRepo { | ||||
|   final ApiClient apiClient; | ||||
|   final LoggerService loggerService; | ||||
| 
 | ||||
|   PrescriptionsRepoImp({required this.loggerService, required this.apiClient}); | ||||
| 
 | ||||
|   @override | ||||
|   Future<Either<Failure, GenericApiModel<List<PatientPrescriptionsResponseModel>>>> getPatientPrescriptionOrders({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": "1018977", | ||||
|       "PatientOutSA": "0", | ||||
|       "SessionID": "03478TYC02N80874CTYN04883475!?" | ||||
|     }; | ||||
| 
 | ||||
|     try { | ||||
|       GenericApiModel<List<PatientPrescriptionsResponseModel>>? apiResponse; | ||||
|       Failure? failure; | ||||
|       await apiClient.post( | ||||
|         PRESCRIPTIONS, | ||||
|         body: mapDevice, | ||||
|         onFailure: (error, statusCode, {messageStatus, failureType}) { | ||||
|           failure = failureType; | ||||
|         }, | ||||
|         onSuccess: (response, statusCode, {messageStatus}) { | ||||
|           try { | ||||
|             final list = response['PatientPrescriptionList']; | ||||
|             if (list == null || list.isEmpty) { | ||||
|               throw Exception("lab list is empty"); | ||||
|             } | ||||
| 
 | ||||
|             final prescriptionOrders = list.map((item) => PatientPrescriptionsResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientPrescriptionsResponseModel>(); | ||||
| 
 | ||||
|             apiResponse = GenericApiModel<List<PatientPrescriptionsResponseModel>>( | ||||
|               messageStatus: messageStatus, | ||||
|               statusCode: statusCode, | ||||
|               errorMessage: null, | ||||
|               data: prescriptionOrders, | ||||
|             ); | ||||
|           } 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())); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Future<Either<Failure, GenericApiModel<List<PrescriptionDetailResponseModel>>>> getPatientPrescriptionDetails({required PatientPrescriptionsResponseModel prescriptionsResponseModel}) async { | ||||
|     final mapDevice = { | ||||
|       "AppointmentNo": prescriptionsResponseModel.appointmentNo.toString(), | ||||
|       "SetupID": prescriptionsResponseModel.setupID, | ||||
|       "EpisodeID": prescriptionsResponseModel.episodeID.toString(), | ||||
|       "ClinicID": prescriptionsResponseModel.clinicID.toString(), | ||||
|       "ProjectID": prescriptionsResponseModel.projectID.toString(), | ||||
|       "DischargeNo": prescriptionsResponseModel.dischargeNo.toString(), | ||||
|       "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": "1018977", | ||||
|       "PatientOutSA": "0", | ||||
|       "SessionID": "03478TYC02N80874CTYN04883475!?" | ||||
|     }; | ||||
| 
 | ||||
|     try { | ||||
|       GenericApiModel<List<PrescriptionDetailResponseModel>>? apiResponse; | ||||
|       Failure? failure; | ||||
|       await apiClient.post( | ||||
|         prescriptionsResponseModel.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, | ||||
|         body: mapDevice, | ||||
|         onFailure: (error, statusCode, {messageStatus, failureType}) { | ||||
|           failure = failureType; | ||||
|         }, | ||||
|         onSuccess: (response, statusCode, {messageStatus}) { | ||||
|           try { | ||||
|             final list = prescriptionsResponseModel.isInOutPatient! ? response['ListPRM'] : response['INP_GetPrescriptionReport_List']; | ||||
|             if (list == null || list.isEmpty) { | ||||
|               throw Exception("prescription list is empty"); | ||||
|             } | ||||
| 
 | ||||
|             final prescriptionOrders = list.map((item) => PrescriptionDetailResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PrescriptionDetailResponseModel>(); | ||||
| 
 | ||||
|             apiResponse = GenericApiModel<List<PrescriptionDetailResponseModel>>( | ||||
|               messageStatus: messageStatus, | ||||
|               statusCode: statusCode, | ||||
|               errorMessage: null, | ||||
|               data: prescriptionOrders, | ||||
|             ); | ||||
|           } 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,114 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hmg_patient_app_new/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/features/prescriptions/models/resp_models/prescription_detail_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_repo.dart'; | ||||
| import 'package:hmg_patient_app_new/services/error_handler_service.dart'; | ||||
| 
 | ||||
| class PrescriptionsViewModel extends ChangeNotifier { | ||||
|   bool isPrescriptionsOrdersLoading = false; | ||||
|   bool isPrescriptionsDetailsLoading = false; | ||||
| 
 | ||||
|   PrescriptionsRepo prescriptionsRepo; | ||||
|   ErrorHandlerService errorHandlerService; | ||||
| 
 | ||||
|   // Prescription Orders Lists | ||||
|   List<PatientPrescriptionsResponseModel> patientPrescriptionOrders = []; | ||||
| 
 | ||||
|   List<PrescriptionsList> patientPrescriptionOrdersByClinic = []; | ||||
|   List<PrescriptionsList> patientPrescriptionOrdersByHospital = []; | ||||
|   List<PrescriptionsList> patientPrescriptionOrdersViewList = []; | ||||
| 
 | ||||
|   // Prescription Details List | ||||
|   List<PrescriptionDetailResponseModel> prescriptionDetailsList = []; | ||||
| 
 | ||||
|   bool isSortByClinic = true; | ||||
| 
 | ||||
|   PrescriptionsViewModel({required this.prescriptionsRepo, required this.errorHandlerService}); | ||||
| 
 | ||||
|   initPrescriptionsViewModel() { | ||||
|     patientPrescriptionOrders.clear(); | ||||
|     patientPrescriptionOrdersByClinic.clear(); | ||||
|     patientPrescriptionOrdersByHospital.clear(); | ||||
|     patientPrescriptionOrdersViewList.clear(); | ||||
|     isPrescriptionsOrdersLoading = true; | ||||
|     isPrescriptionsDetailsLoading = true; | ||||
|     isSortByClinic = true; | ||||
|     getPatientPrescriptionOrders(); | ||||
|     notifyListeners(); | ||||
|   } | ||||
| 
 | ||||
|   setPrescriptionsDetailsLoading() { | ||||
|     isPrescriptionsDetailsLoading = true; | ||||
|     prescriptionDetailsList.clear(); | ||||
|     notifyListeners(); | ||||
|   } | ||||
| 
 | ||||
|   setIsSortByClinic(bool value) { | ||||
|     isSortByClinic = value; | ||||
|     if (isSortByClinic) { | ||||
|       patientPrescriptionOrdersViewList = patientPrescriptionOrdersByClinic; | ||||
|     } else { | ||||
|       patientPrescriptionOrdersViewList = patientPrescriptionOrdersByHospital; | ||||
|     } | ||||
|     notifyListeners(); | ||||
|   } | ||||
| 
 | ||||
|   Future<void> getPatientPrescriptionOrders({Function(dynamic)? onSuccess, Function(String)? onError}) async { | ||||
|     final result = await prescriptionsRepo.getPatientPrescriptionOrders(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) { | ||||
|           patientPrescriptionOrders = apiResponse.data!; | ||||
|           isPrescriptionsOrdersLoading = false; | ||||
| 
 | ||||
|           for (var element in patientPrescriptionOrders) { | ||||
|             List<PrescriptionsList> prescriptionsByClinic = patientPrescriptionOrdersByClinic.where((elementClinic) => elementClinic.filterName == element.clinicDescription).toList(); | ||||
| 
 | ||||
|             if (prescriptionsByClinic.isNotEmpty) { | ||||
|               patientPrescriptionOrdersByClinic[patientPrescriptionOrdersByClinic.indexOf(prescriptionsByClinic[0])].prescriptionsList!.add(element); | ||||
|             } else { | ||||
|               patientPrescriptionOrdersByClinic.add(PrescriptionsList(filterName: element.clinicDescription, prescriptions: element)); | ||||
|             } | ||||
| 
 | ||||
|             List<PrescriptionsList> prescriptionsByHospital = patientPrescriptionOrdersByHospital.where((elementClinic) => elementClinic.filterName == element.name).toList(); | ||||
| 
 | ||||
|             if (prescriptionsByHospital.isNotEmpty) { | ||||
|               patientPrescriptionOrdersByHospital[patientPrescriptionOrdersByHospital.indexOf(prescriptionsByHospital[0])].prescriptionsList!.add(element); | ||||
|             } else { | ||||
|               patientPrescriptionOrdersByHospital.add(PrescriptionsList(filterName: element.name, prescriptions: element)); | ||||
|             } | ||||
|           } | ||||
|           patientPrescriptionOrdersViewList = patientPrescriptionOrdersByClinic; | ||||
|           notifyListeners(); | ||||
|           if (onSuccess != null) { | ||||
|             onSuccess(apiResponse); | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Future<void> getPrescriptionDetails(PatientPrescriptionsResponseModel prescriptionsResponseModel, {Function(dynamic)? onSuccess, Function(String)? onError}) async { | ||||
|     final result = await prescriptionsRepo.getPatientPrescriptionDetails(prescriptionsResponseModel: prescriptionsResponseModel); | ||||
| 
 | ||||
|     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) { | ||||
|           prescriptionDetailsList = apiResponse.data!; | ||||
|           isPrescriptionsDetailsLoading = false; | ||||
|           notifyListeners(); | ||||
|           if (onSuccess != null) { | ||||
|             onSuccess(apiResponse); | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,232 @@ | ||||
| class PatientRadiologyResponseModel { | ||||
|   String? setupID; | ||||
|   int? projectID; | ||||
|   dynamic patientID; | ||||
|   int? invoiceLineItemNo; | ||||
|   int? invoiceNo; | ||||
|   int? doctorID; | ||||
|   int? clinicID; | ||||
|   String? orderDate; | ||||
|   String? reportData; | ||||
|   String? imageURL; | ||||
|   String? procedureID; | ||||
|   int? appointmentNo; | ||||
|   dynamic dIAPacsURL; | ||||
|   bool? isRead; | ||||
|   String? readOn; | ||||
|   dynamic admissionNo; | ||||
|   bool? isInOutPatient; | ||||
|   int? actualDoctorRate; | ||||
|   dynamic admissionDate; | ||||
|   dynamic admissionNumber; | ||||
|   dynamic appointmentDate; | ||||
|   dynamic appointmentNumber; | ||||
|   dynamic appointmentTime; | ||||
|   String? clinicDescription; | ||||
|   String? dIAPACSURL; | ||||
|   dynamic decimalDoctorRate; | ||||
|   String? description; | ||||
|   String? doctorImageURL; | ||||
|   String? doctorName; | ||||
|   num? doctorRate; | ||||
|   num? doctorStarsRate; | ||||
|   String? doctorTitle; | ||||
|   String? examId; | ||||
|   int? gender; | ||||
|   dynamic genderDescription; | ||||
|   int? invoiceNoVP; | ||||
|   String? invoiceType; | ||||
|   bool? isActiveDoctorProfile; | ||||
|   bool? isExecludeDoctor; | ||||
|   String? isInOutPatientDescription; | ||||
|   String? isInOutPatientDescriptionN; | ||||
|   bool? isLiveCareAppointment; | ||||
|   dynamic nationalityFlagURL; | ||||
|   int? noOfPatientsRate; | ||||
|   int? orderNo; | ||||
|   dynamic procedureName; | ||||
|   String? projectName; | ||||
|   String? qR; | ||||
|   String? reportDataHTML; | ||||
|   String? reportDataTextString; | ||||
|   dynamic strAppointmentDate; | ||||
|   dynamic strOrderDate; | ||||
|   bool? isCVI; | ||||
|   bool? isRadMedicalReport; | ||||
|   dynamic vida3Id; | ||||
| 
 | ||||
|   PatientRadiologyResponseModel( | ||||
|       {this.setupID, | ||||
|       this.projectID, | ||||
|       this.patientID, | ||||
|       this.invoiceLineItemNo, | ||||
|       this.invoiceNo, | ||||
|       this.doctorID, | ||||
|       this.clinicID, | ||||
|       this.orderDate, | ||||
|       this.reportData, | ||||
|       this.imageURL, | ||||
|       this.procedureID, | ||||
|       this.appointmentNo, | ||||
|       this.dIAPacsURL, | ||||
|       this.isRead, | ||||
|       this.readOn, | ||||
|       this.admissionNo, | ||||
|       this.isInOutPatient, | ||||
|       this.actualDoctorRate, | ||||
|       this.admissionDate, | ||||
|       this.admissionNumber, | ||||
|       this.appointmentDate, | ||||
|       this.appointmentNumber, | ||||
|       this.appointmentTime, | ||||
|       this.clinicDescription, | ||||
|       this.dIAPACSURL, | ||||
|       this.decimalDoctorRate, | ||||
|       this.description, | ||||
|       this.doctorImageURL, | ||||
|       this.doctorName, | ||||
|       this.doctorRate, | ||||
|       this.doctorStarsRate, | ||||
|       this.doctorTitle, | ||||
|       this.examId, | ||||
|       this.gender, | ||||
|       this.genderDescription, | ||||
|       this.invoiceNoVP, | ||||
|       this.invoiceType, | ||||
|       this.isActiveDoctorProfile, | ||||
|       this.isExecludeDoctor, | ||||
|       this.isInOutPatientDescription, | ||||
|       this.isInOutPatientDescriptionN, | ||||
|       this.isLiveCareAppointment, | ||||
|       this.nationalityFlagURL, | ||||
|       this.noOfPatientsRate, | ||||
|       this.orderNo, | ||||
|       this.procedureName, | ||||
|       this.projectName, | ||||
|       this.qR, | ||||
|       this.reportDataHTML, | ||||
|       this.reportDataTextString, | ||||
|       this.strAppointmentDate, | ||||
|       this.strOrderDate, | ||||
|       this.isCVI, | ||||
|       this.isRadMedicalReport, | ||||
|       this.vida3Id}); | ||||
| 
 | ||||
|   PatientRadiologyResponseModel.fromJson(Map<String, dynamic> json) { | ||||
|     setupID = json['SetupID']; | ||||
|     projectID = json['ProjectID']; | ||||
|     patientID = json['PatientID']; | ||||
|     invoiceLineItemNo = json['InvoiceLineItemNo']; | ||||
|     invoiceNo = json['InvoiceNo']; | ||||
|     doctorID = json['DoctorID']; | ||||
|     clinicID = json['ClinicID']; | ||||
|     orderDate = json['OrderDate']; | ||||
|     reportData = json['ReportData']; | ||||
|     imageURL = json['ImageURL']; | ||||
|     procedureID = json['ProcedureID']; | ||||
|     appointmentNo = json['AppointmentNo']; | ||||
|     dIAPacsURL = json['DIAPacsURL']; | ||||
|     isRead = json['IsRead']; | ||||
|     readOn = json['ReadOn']; | ||||
|     admissionNo = json['AdmissionNo']; | ||||
|     isInOutPatient = json['IsInOutPatient']; | ||||
|     actualDoctorRate = json['ActualDoctorRate']; | ||||
|     admissionDate = json['AdmissionDate']; | ||||
|     admissionNumber = json['AdmissionNumber']; | ||||
|     appointmentDate = json['AppointmentDate']; | ||||
|     appointmentNumber = json['AppointmentNumber']; | ||||
|     appointmentTime = json['AppointmentTime']; | ||||
|     clinicDescription = json['ClinicDescription']; | ||||
|     dIAPACSURL = json['DIA_PACS_URL']; | ||||
|     decimalDoctorRate = json['DecimalDoctorRate']; | ||||
|     description = json['Description']; | ||||
|     doctorImageURL = json['DoctorImageURL']; | ||||
|     doctorName = json['DoctorName']; | ||||
|     doctorRate = json['DoctorRate']; | ||||
|     doctorStarsRate = json['DoctorStarsRate']; | ||||
|     doctorTitle = json['DoctorTitle']; | ||||
|     examId = json['Exam_id']; | ||||
|     gender = json['Gender']; | ||||
|     genderDescription = json['GenderDescription']; | ||||
|     invoiceNoVP = json['InvoiceNo_VP']; | ||||
|     invoiceType = json['InvoiceType']; | ||||
|     isActiveDoctorProfile = json['IsActiveDoctorProfile']; | ||||
|     isExecludeDoctor = json['IsExecludeDoctor']; | ||||
|     isInOutPatientDescription = json['IsInOutPatientDescription']; | ||||
|     isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; | ||||
|     isLiveCareAppointment = json['IsLiveCareAppointment']; | ||||
|     nationalityFlagURL = json['NationalityFlagURL']; | ||||
|     noOfPatientsRate = json['NoOfPatientsRate']; | ||||
|     orderNo = json['OrderNo']; | ||||
|     procedureName = json['ProcedureName']; | ||||
|     projectName = json['ProjectName']; | ||||
|     qR = json['QR']; | ||||
|     reportDataHTML = json['ReportDataHTML']; | ||||
|     reportDataTextString = json['ReportDataTextString']; | ||||
|     strAppointmentDate = json['StrAppointmentDate']; | ||||
|     strOrderDate = json['StrOrderDate']; | ||||
|     isCVI = json['isCVI']; | ||||
|     isRadMedicalReport = json['isRadMedicalReport']; | ||||
|     vida3Id = json['vida3Id']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['SetupID'] = this.setupID; | ||||
|     data['ProjectID'] = this.projectID; | ||||
|     data['PatientID'] = this.patientID; | ||||
|     data['InvoiceLineItemNo'] = this.invoiceLineItemNo; | ||||
|     data['InvoiceNo'] = this.invoiceNo; | ||||
|     data['DoctorID'] = this.doctorID; | ||||
|     data['ClinicID'] = this.clinicID; | ||||
|     data['OrderDate'] = this.orderDate; | ||||
|     data['ReportData'] = this.reportData; | ||||
|     data['ImageURL'] = this.imageURL; | ||||
|     data['ProcedureID'] = this.procedureID; | ||||
|     data['AppointmentNo'] = this.appointmentNo; | ||||
|     data['DIAPacsURL'] = this.dIAPacsURL; | ||||
|     data['IsRead'] = this.isRead; | ||||
|     data['ReadOn'] = this.readOn; | ||||
|     data['AdmissionNo'] = this.admissionNo; | ||||
|     data['IsInOutPatient'] = this.isInOutPatient; | ||||
|     data['ActualDoctorRate'] = this.actualDoctorRate; | ||||
|     data['AdmissionDate'] = this.admissionDate; | ||||
|     data['AdmissionNumber'] = this.admissionNumber; | ||||
|     data['AppointmentDate'] = this.appointmentDate; | ||||
|     data['AppointmentNumber'] = this.appointmentNumber; | ||||
|     data['AppointmentTime'] = this.appointmentTime; | ||||
|     data['ClinicDescription'] = this.clinicDescription; | ||||
|     data['DIA_PACS_URL'] = this.dIAPACSURL; | ||||
|     data['DecimalDoctorRate'] = this.decimalDoctorRate; | ||||
|     data['Description'] = this.description; | ||||
|     data['DoctorImageURL'] = this.doctorImageURL; | ||||
|     data['DoctorName'] = this.doctorName; | ||||
|     data['DoctorRate'] = this.doctorRate; | ||||
|     data['DoctorStarsRate'] = this.doctorStarsRate; | ||||
|     data['DoctorTitle'] = this.doctorTitle; | ||||
|     data['Exam_id'] = this.examId; | ||||
|     data['Gender'] = this.gender; | ||||
|     data['GenderDescription'] = this.genderDescription; | ||||
|     data['InvoiceNo_VP'] = this.invoiceNoVP; | ||||
|     data['InvoiceType'] = this.invoiceType; | ||||
|     data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; | ||||
|     data['IsExecludeDoctor'] = this.isExecludeDoctor; | ||||
|     data['IsInOutPatientDescription'] = this.isInOutPatientDescription; | ||||
|     data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; | ||||
|     data['IsLiveCareAppointment'] = this.isLiveCareAppointment; | ||||
|     data['NationalityFlagURL'] = this.nationalityFlagURL; | ||||
|     data['NoOfPatientsRate'] = this.noOfPatientsRate; | ||||
|     data['OrderNo'] = this.orderNo; | ||||
|     data['ProcedureName'] = this.procedureName; | ||||
|     data['ProjectName'] = this.projectName; | ||||
|     data['QR'] = this.qR; | ||||
|     data['ReportDataHTML'] = this.reportDataHTML; | ||||
|     data['ReportDataTextString'] = this.reportDataTextString; | ||||
|     data['StrAppointmentDate'] = this.strAppointmentDate; | ||||
|     data['StrOrderDate'] = this.strOrderDate; | ||||
|     data['isCVI'] = this.isCVI; | ||||
|     data['isRadMedicalReport'] = this.isRadMedicalReport; | ||||
|     data['vida3Id'] = this.vida3Id; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,77 @@ | ||||
| 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/radiology/models/resp_models/patient_radiology_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/services/logger_service.dart'; | ||||
| 
 | ||||
| abstract class RadiologyRepo { | ||||
|   Future<Either<Failure, GenericApiModel<List<PatientRadiologyResponseModel>>>> getPatientRadiologyOrders({required String patientId}); | ||||
| } | ||||
| 
 | ||||
| class RadiologyRepoImp implements RadiologyRepo { | ||||
|   final ApiClient apiClient; | ||||
|   final LoggerService loggerService; | ||||
| 
 | ||||
|   RadiologyRepoImp({required this.loggerService, required this.apiClient}); | ||||
| 
 | ||||
|   @override | ||||
|   Future<Either<Failure, GenericApiModel<List<PatientRadiologyResponseModel>>>> getPatientRadiologyOrders({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": "1018977", | ||||
|       "PatientOutSA": "0", | ||||
|       "SessionID": "03478TYC02N80874CTYN04883475!?" | ||||
|     }; | ||||
| 
 | ||||
|     try { | ||||
|       GenericApiModel<List<PatientRadiologyResponseModel>>? apiResponse; | ||||
|       Failure? failure; | ||||
|       await apiClient.post( | ||||
|         GET_PATIENT_ORDERS, | ||||
|         body: mapDevice, | ||||
|         onFailure: (error, statusCode, {messageStatus, failureType}) { | ||||
|           failure = failureType; | ||||
|         }, | ||||
|         onSuccess: (response, statusCode, {messageStatus}) { | ||||
|           final radOrders; | ||||
|           try { | ||||
|             if (response['FinalRadiologyList'] != null && response['FinalRadiologyList'].length != 0) { | ||||
|               final list = response['FinalRadiologyList']; | ||||
|               radOrders = list.map((item) => PatientRadiologyResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientRadiologyResponseModel>(); | ||||
|             } else { | ||||
|               final list = response['FinalRadiologyListAPI']; | ||||
|               radOrders = list.map((item) => PatientRadiologyResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientRadiologyResponseModel>(); | ||||
|             } | ||||
| 
 | ||||
|             apiResponse = GenericApiModel<List<PatientRadiologyResponseModel>>( | ||||
|               messageStatus: messageStatus, | ||||
|               statusCode: statusCode, | ||||
|               errorMessage: null, | ||||
|               data: radOrders, | ||||
|             ); | ||||
|           } 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,43 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hmg_patient_app_new/features/radiology/radiology_repo.dart'; | ||||
| import 'package:hmg_patient_app_new/services/error_handler_service.dart'; | ||||
| 
 | ||||
| import 'models/resp_models/patient_radiology_response_model.dart'; | ||||
| 
 | ||||
| class RadiologyViewModel extends ChangeNotifier { | ||||
|   bool isRadiologyOrdersLoading = false; | ||||
| 
 | ||||
|   RadiologyRepo radiologyRepo; | ||||
|   ErrorHandlerService errorHandlerService; | ||||
| 
 | ||||
|   List<PatientRadiologyResponseModel> patientRadiologyOrders = []; | ||||
| 
 | ||||
|   RadiologyViewModel({required this.radiologyRepo, required this.errorHandlerService}); | ||||
| 
 | ||||
|   initRadiologyProvider() { | ||||
|     patientRadiologyOrders.clear(); | ||||
|     isRadiologyOrdersLoading = true; | ||||
|     getPatientRadiologyOrders(); | ||||
|     notifyListeners(); | ||||
|   } | ||||
| 
 | ||||
|   Future<void> getPatientRadiologyOrders({Function(dynamic)? onSuccess, Function(String)? onError}) async { | ||||
|     final result = await radiologyRepo.getPatientRadiologyOrders(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) { | ||||
|           patientRadiologyOrders = apiResponse.data!; | ||||
|           isRadiologyOrdersLoading = false; | ||||
|           notifyListeners(); | ||||
|           if (onSuccess != null) { | ||||
|             onSuccess(apiResponse); | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,313 @@ | ||||
| import 'dart:convert'; | ||||
| 
 | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||||
| import 'package:hmg_patient_app_new/core/app_state.dart'; | ||||
| import 'package:hmg_patient_app_new/core/common_models/nationality_country_model.dart'; | ||||
| import 'package:hmg_patient_app_new/core/dependencies.dart'; | ||||
| import 'package:hmg_patient_app_new/core/enums.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; | ||||
| import 'package:hmg_patient_app_new/extensions/context_extensions.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/theme/colors.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/bottomsheet/generic_bottom_sheet.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/dropdown/dropdown_widget.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/input_widget.dart'; | ||||
| 
 | ||||
| class RegisterNewStep2 extends StatefulWidget { | ||||
|   var nHICData; | ||||
|   var payload; | ||||
| 
 | ||||
|   RegisterNewStep2(this.nHICData, this.payload, {Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _RegisterNew createState() => _RegisterNew(); | ||||
| } | ||||
| 
 | ||||
| class _RegisterNew extends State<RegisterNewStep2> { | ||||
|   bool isFromDubai = true; | ||||
|   List<NationalityCountries> countriesList = []; | ||||
|   AppState? appState; | ||||
|   GenderTypeEnum? selectedGenderType; | ||||
|   MaritalStatusTypeEnum? selectedMaritalStatusType; | ||||
|   CountryEnum? selectedCountry; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|     // isFromDubai = widget.payload.zipCode!.contains("971") || widget.payload.zipCode!.contains("+971"); | ||||
|     loadCountriesList(); | ||||
|   } | ||||
| 
 | ||||
|   loadCountriesList() async { | ||||
|     appState = getIt.get<AppState>(); | ||||
|     final String response = await DefaultAssetBundle.of(context).loadString('assets/json/countriesList.json'); | ||||
|     final List<dynamic> data = json.decode(response); | ||||
|     countriesList = data.map((e) => NationalityCountries.fromJson(e)).toList(); | ||||
|   } | ||||
| 
 | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
| 
 | ||||
|       appBar: CustomAppBar(onBackPressed: () {}, onLanguageChanged: (lang) {}, hideLogoAndLang: true,), | ||||
|       body: SingleChildScrollView( | ||||
|         reverse: false, | ||||
|         padding: EdgeInsets.only(left: 24.h, right: 24.h, top: 24.h), | ||||
|         child: Column( | ||||
|           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|           children: <Widget>[ | ||||
|             Directionality( | ||||
|               textDirection: Directionality.of(context), | ||||
|               child: Container( | ||||
|                 decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)), | ||||
|                 padding: EdgeInsets.only(left: 16.h, right: 16.h), | ||||
|                 child: Column( | ||||
|                   children: [ | ||||
|                     TextInputWidget( | ||||
|                         labelText: isFromDubai ? LocaleKeys.fullName.tr() : LocaleKeys.name.tr(), | ||||
|                         hintText: isFromDubai ? "name" ?? "" : (widget.nHICData!.firstNameEn!.toUpperCase() + " " + widget.nHICData!.lastNameEn!.toUpperCase()), | ||||
|                         controller: null, | ||||
|                         isEnable: true, | ||||
|                         prefix: null, | ||||
|                         isAllowRadius: false, | ||||
|                         isBorderAllowed: false, | ||||
|                         keyboardType: TextInputType.text, | ||||
|                         isAllowLeadingIcon: true, | ||||
|                         isReadOnly: isFromDubai ? false : true, | ||||
|                         leadingIcon: AppAssets.user_circle).paddingSymmetrical(0.h,16.h), | ||||
|                     Divider(height: 1, color: AppColors.greyColor,), | ||||
|                     TextInputWidget( | ||||
|                         labelText: LocaleKeys.nationalIdNumber.tr(), | ||||
|                         hintText: isFromDubai ? "widget.payload.nationalID!" : (widget.nHICData!.idNumber ?? ""), | ||||
|                         controller: null, | ||||
|                         isEnable: true, | ||||
|                         prefix: null, | ||||
|                         isAllowRadius: false, | ||||
|                         isBorderAllowed: false, | ||||
|                         isAllowLeadingIcon: true, | ||||
|                         isReadOnly: true, | ||||
|                         leadingIcon: AppAssets.student_card).paddingSymmetrical(0.h,16.h), | ||||
|                     Divider(height: 1, color: AppColors.greyColor,), | ||||
|                     isFromDubai | ||||
|                         ? DropdownWidget( | ||||
|                             labelText: LocaleKeys.gender.tr(), | ||||
|                             hintText: LocaleKeys.malE.tr(), | ||||
|                             isEnable: true, | ||||
|                             dropdownItems: GenderTypeEnum.values.map((e) => appState!.isArabic() ? e.typeAr : e.type).toList(), | ||||
|                             selectedValue: appState!.isArabic() ? selectedGenderType!.typeAr : selectedGenderType?.type, | ||||
|                             // selectionType: SelectionType.dropdown, | ||||
|                             onChange: (val) { | ||||
|                               if (val != null) {} | ||||
|                             }, | ||||
|                             isBorderAllowed: false, | ||||
|                             hasSelectionCustomIcon: true, | ||||
|                             isAllowRadius: false, | ||||
|                             padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0), | ||||
|                             selectionCustomIcon: AppAssets.arrow_down, | ||||
|                              leadingIcon: AppAssets.user_full, | ||||
|                           ).withVerticalPadding(8) | ||||
|                         : TextInputWidget( | ||||
|                             labelText: LocaleKeys.gender.tr(), | ||||
|                             hintText: (widget.nHICData!.gender ?? ""), | ||||
|                             controller: null, | ||||
|                             isEnable: true, | ||||
|                             prefix: null, | ||||
|                             isAllowRadius: false, | ||||
|                             isBorderAllowed: false, | ||||
|                             isAllowLeadingIcon: true, | ||||
|                             isReadOnly: isFromDubai ? false : true, | ||||
|                             leadingIcon: AppAssets.user_full, | ||||
| 
 | ||||
|                             onChange: (value) {}).paddingSymmetrical(0.h,16.h), | ||||
|                     Divider(height: 1, color: AppColors.greyColor,), | ||||
|                     isFromDubai | ||||
|                         ? DropdownWidget( | ||||
|                             labelText: LocaleKeys.maritalStatus.tr(), | ||||
|                             hintText: LocaleKeys.married.tr(), | ||||
|                             isEnable: true, | ||||
|                             dropdownItems: MaritalStatusTypeEnum.values.map((e) => appState!.isArabic() ? e.typeAr : e.type).toList(), | ||||
|                             selectedValue: appState!.isArabic() ? selectedMaritalStatusType!.typeAr : selectedMaritalStatusType?.type, | ||||
|                             onChange: (val) {}, | ||||
|                             isBorderAllowed: false, | ||||
|                             hasSelectionCustomIcon: true, | ||||
|                             isAllowRadius: false, | ||||
|                             padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0), | ||||
|                             selectionCustomIcon: AppAssets.arrow_down, | ||||
|                              leadingIcon: AppAssets.smart_phone, | ||||
|                           ).withVerticalPadding(8) | ||||
|                         : TextInputWidget( | ||||
|                             labelText: LocaleKeys.maritalStatus.tr(), | ||||
|                             hintText: appState!.isArabic() | ||||
|                                 ? (MaritalStatusTypeExtension.fromValue(widget.nHICData!.maritalStatusCode)!.typeAr) | ||||
|                                 : (MaritalStatusTypeExtension.fromValue(widget.nHICData!.maritalStatusCode)!.type), | ||||
|                             isEnable: true, | ||||
|                             prefix: null, | ||||
|                             isAllowRadius: false, | ||||
|                             isBorderAllowed: false, | ||||
|                             isAllowLeadingIcon: true, | ||||
|                             isReadOnly: true, | ||||
|                             leadingIcon: AppAssets.smart_phone, | ||||
|                             onChange: (value) {}).paddingSymmetrical(0.h,16.h), | ||||
|                     Divider(height: 1, color: AppColors.greyColor,), | ||||
|                     isFromDubai | ||||
|                         ? DropdownWidget( | ||||
|                             labelText: LocaleKeys.country.tr(), | ||||
|                             hintText: LocaleKeys.uae.tr(), | ||||
|                             isEnable: true, | ||||
|                             dropdownItems: countriesList.map((e) => appState!.isArabic() ? e.nameN ?? "" : e.name ?? "").toList(), | ||||
|                             selectedValue: appState!.isArabic() ? selectedCountry!.nameArabic ?? "" : selectedCountry?.name ?? "", | ||||
|                             onChange: (val) {}, | ||||
|                             isBorderAllowed: false, | ||||
|                             hasSelectionCustomIcon: true, | ||||
|                             isAllowRadius: false, | ||||
|                             padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0), | ||||
|                             selectionCustomIcon: AppAssets.arrow_down, | ||||
|                             leadingIcon: AppAssets.globe, | ||||
|                           ).withVerticalPadding(8) | ||||
|                         : TextInputWidget( | ||||
|                             labelText: LocaleKeys.nationality.tr(), | ||||
|                             hintText: appState!.isArabic() | ||||
|                                 ? (countriesList.firstWhere((e) => e.id == (widget.nHICData!.nationalityCode ?? ""), orElse: () => NationalityCountries()).nameN ?? "") | ||||
|                                 : (countriesList.firstWhere((e) => e.id == (widget.nHICData!.nationalityCode ?? ""), orElse: () => NationalityCountries()).name ?? ""), | ||||
|                             isEnable: true, | ||||
|                             prefix: null, | ||||
|                             isAllowRadius: false, | ||||
|                             isBorderAllowed: false, | ||||
|                             isAllowLeadingIcon: true, | ||||
|                             isReadOnly: true, | ||||
|                             leadingIcon: AppAssets.globe, | ||||
|                             onChange: (value) {}).paddingSymmetrical(0.h,16.h), | ||||
|                     Divider(height: 1, color: AppColors.greyColor,), | ||||
|                     TextInputWidget( | ||||
|                         labelText: LocaleKeys.mobileNumber.tr(), | ||||
|                         hintText: ("widget.payload.mobileNo" ?? ""), | ||||
|                         controller: null, | ||||
|                         isEnable: true, | ||||
|                         prefix: null, | ||||
|                         isAllowRadius: false, | ||||
|                         isBorderAllowed: false, | ||||
|                         isAllowLeadingIcon: true, | ||||
|                         isReadOnly: true, | ||||
|                         leadingIcon: AppAssets.call, | ||||
|                         onChange: (value) {}).paddingSymmetrical(0.h,16.h), | ||||
|                     Divider(height: 1, color: AppColors.greyColor,), | ||||
|                     TextInputWidget( | ||||
|                         labelText: LocaleKeys.dob.tr(), | ||||
|                         hintText: isFromDubai ? "widget.payload.dob!" : (widget.nHICData!.dateOfBirth ?? ""), | ||||
|                         controller: null, | ||||
|                         isEnable: true, | ||||
|                         prefix: null, | ||||
|                         isBorderAllowed: false, | ||||
|                         isAllowLeadingIcon: true, | ||||
|                         isReadOnly: true, | ||||
|                          // : SelectionType.calendar, | ||||
|                         // selectedValue: widget.payload.dob != null ? Utils.formatDateToDisplay(widget.payload.dob.toString()) : null, | ||||
|                         // selectionCustomIcon: AppAssets.calendar, | ||||
|                          leadingIcon: AppAssets.birthday_cake, | ||||
|                         onChange: (value) {}).paddingSymmetrical(0.h,16.h), | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|             ), | ||||
|             SizedBox(height: 50.h), | ||||
|             Row( | ||||
|               children: [ | ||||
|                 Expanded( | ||||
|                   child: CustomButton( | ||||
|                     text: LocaleKeys.cancel, | ||||
|                     icon: AppAssets.cancel, | ||||
|                     onPressed: () { | ||||
|                       Navigator.of(context).pop(); | ||||
|                     }, | ||||
|                     // fontFamily: context.fontFamily, | ||||
|                     backgroundColor: AppColors.secondaryLightRedColor, | ||||
|                     borderColor: AppColors.secondaryLightRedColor, | ||||
|                     textColor: AppColors.primaryRedColor, | ||||
|                     iconColor: AppColors.primaryRedColor, | ||||
|                   ), | ||||
|                 ), | ||||
|                 SizedBox( | ||||
|                   width: 16, | ||||
|                 ), | ||||
|                 Expanded( | ||||
|                   child: CustomButton( | ||||
|                     backgroundColor: AppColors.lightGreenColor, | ||||
|                     borderColor: AppColors.lightGreenColor, | ||||
|                     textColor: AppColors.textGreenColor, | ||||
|                     text: LocaleKeys.confirm.tr(), | ||||
|                     icon: AppAssets.confirm, | ||||
|                     iconColor: AppColors.textGreenColor, | ||||
|                     onPressed: () { | ||||
|                       // if (isFromDubai) { | ||||
|                       //   if (name == null) { | ||||
|                       //     AppToast.showErrorToast(message: LocaleKeys.enterFullName); | ||||
|                       //     return; | ||||
|                       //   } | ||||
|                       //   if (!name!.contains(" ")) if (selectedGenderType == null) { | ||||
|                       //     AppToast.showErrorToast(message: TranslationBase.of(context).enterFullName); | ||||
|                       //     return; | ||||
|                       //   } | ||||
|                       //   if (selectedMaritalStatusType == null) { | ||||
|                       //     AppToast.showErrorToast(message: TranslationBase.of(context).chooseMaritalStatus); | ||||
|                       //     return; | ||||
|                       //   } | ||||
|                       //   if (selectedCountry == null) { | ||||
|                       //     AppToast.showErrorToast(message: TranslationBase.of(context).chooseCountry); | ||||
|                       //     return; | ||||
|                       //   } | ||||
|                       // } | ||||
| 
 | ||||
|                       showModel(context: context); | ||||
|                     }, | ||||
|                   ), | ||||
|                 ) | ||||
|               ], | ||||
|             ), | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   void showModel({required BuildContext context}) { | ||||
|     showModalBottomSheet( | ||||
|       context: context, | ||||
|       isScrollControlled: true, | ||||
|       isDismissible: false, | ||||
|       backgroundColor: Colors.transparent, | ||||
|       builder: (bottomSheetContext) => Padding( | ||||
|         padding: EdgeInsets.only(bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom), | ||||
|         child: SingleChildScrollView( | ||||
|           child: GenericBottomSheet( | ||||
|             textController: TextEditingController(), | ||||
|             isForEmail: true, | ||||
|             buttons: [ | ||||
|               Padding( | ||||
|                 padding: const EdgeInsets.only(bottom: 10), | ||||
|                 child: CustomButton( | ||||
|                     text: LocaleKeys.submit, | ||||
|                     onPressed: () { | ||||
|                       // if (emailAddress.text.isEmpty) { | ||||
|                       //   Utils.showErrorToast(TranslationBase.of(context).enterEmailAddress); | ||||
|                       //   return; | ||||
|                       // } else { | ||||
|                       //   Navigator.of(context).pop(); | ||||
|                       //   registerNow(); | ||||
|                       // } | ||||
|                     }, | ||||
|                     backgroundColor: AppColors.bgGreenColor, | ||||
|                     borderColor: AppColors.bgGreenColor, | ||||
|                     textColor: AppColors.whiteColor), | ||||
|               ), | ||||
|             ], | ||||
|           ), | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,289 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter/services.dart'; | ||||
| import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||||
| import 'package:hmg_patient_app_new/core/enums.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/generated/locale_keys.g.dart'; | ||||
| import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; | ||||
| import 'package:hmg_patient_app_new/theme/colors.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/bottomsheet/generic_bottom_sheet.dart'; | ||||
| import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; | ||||
| 
 | ||||
| class SavedLogin extends StatefulWidget { | ||||
|   // final SelectDeviceIMEIRES savedLoginData; | ||||
| 
 | ||||
|   // const SavedLogin(this.savedLoginData, {Key? key}) : super(key: key); | ||||
|   const SavedLogin(); | ||||
| 
 | ||||
|   @override | ||||
|   _SavedLogin createState() => _SavedLogin(); | ||||
| } | ||||
| 
 | ||||
| class _SavedLogin extends State<SavedLogin> { | ||||
|   LoginTypeEnum loginType = LoginTypeEnum.sms; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
|       appBar: CustomAppBar( | ||||
|         onBackPressed: () {}, | ||||
|         onLanguageChanged: (lang) {}, | ||||
|       ), | ||||
|       body: SafeArea( | ||||
|         child: Padding( | ||||
|           padding: EdgeInsets.symmetric(horizontal: 24.h), | ||||
|           child: Column( | ||||
|             crossAxisAlignment: CrossAxisAlignment.center, | ||||
|             children: [ | ||||
|               const Spacer(flex: 2), | ||||
|               // Welcome back text | ||||
|               LocaleKeys.welcomeBack.tr().toText16(color: AppColors.inputLabelTextColor), | ||||
|               SizedBox(height: 16.h), | ||||
|               ("widget.savedLoginData.name!.toLowerCase().capitalizeFirstofEach").toText26(isBold: true, height: 26 / 36, color: AppColors.textColor), | ||||
|               SizedBox(height: 24.h), | ||||
|               Container( | ||||
|                 padding: EdgeInsets.all(16.h), | ||||
|                 decoration: BoxDecoration( | ||||
|                   color: AppColors.whiteColor, | ||||
|                   border: Border.all(color: AppColors.whiteColor), | ||||
|                   borderRadius: BorderRadius.circular(24.h), | ||||
|                   boxShadow: [ | ||||
|                     BoxShadow(color: Color(0x0D000000), blurRadius: 16, offset: Offset(0, 0), spreadRadius: 5), | ||||
|                   ], | ||||
|                 ), | ||||
|                 child: Column( | ||||
|                   children: [ | ||||
|                     // Last login info | ||||
|                     ('LocaleKeys.lastloginBy.tr()' + ' {getType(widget.savedLoginData.logInType!, context)}').toText14(isBold: true, color: AppColors.greyTextColor), | ||||
|                     ('widget.savedLoginData.createdOn != null ? DateUtil.getFormattedDate(DateUtil.convertStringToDate(widget.savedLoginData.createdOn!), "d MMMM, y at HH:mm") : --') | ||||
|                         .toText16(isBold: true, color: AppColors.textColor), | ||||
| 
 | ||||
|                     Container(margin: EdgeInsets.all(16.h), child: Utils.buildSvgWithAssets(icon: getTypeIcons(loginType.toInt), iconColor: loginType.toInt == 4 ? null : AppColors.primaryRedColor)), | ||||
|                     // Face ID login button | ||||
|                     Container( | ||||
|                       height: 45, | ||||
|                       child: CustomButton( | ||||
|                         text: "${LocaleKeys.loginBy.tr()} ${loginType.displayName}", | ||||
|                         onPressed: () { | ||||
|                           if (loginType == LoginTypeEnum.fingerprint || loginType == LoginTypeEnum.face) { | ||||
|                             // loginWithFingerPrintFace(loginType.toInt, widget.savedLoginData.iMEI!); | ||||
|                           } else { | ||||
|                             int? val = loginType.toInt; | ||||
|                             //checkUserAuthentication(val); | ||||
|                           } | ||||
|                         }, | ||||
|                         backgroundColor: Color(0xffED1C2B), | ||||
|                         borderColor: Color(0xffFEE9EA), | ||||
|                         textColor: Colors.white, | ||||
|                         fontSize: 12, | ||||
|                         fontWeight: FontWeight.w500, | ||||
|                         borderRadius: 12, | ||||
|                         padding: EdgeInsets.fromLTRB(0, 10, 0, 10), | ||||
|                         icon: AppAssets.apple_finder, | ||||
|                       ), | ||||
|                     ), | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|               const SizedBox(height: 24), | ||||
|               Padding( | ||||
|                 padding: EdgeInsets.symmetric(horizontal: 16.0), | ||||
|                 child: Text( | ||||
|                   LocaleKeys.oR.tr(), | ||||
|                   style: context.dynamicTextStyle(fontSize: 16, fontWeight: FontWeight.w500), | ||||
|                 ), | ||||
|               ), | ||||
|               const SizedBox(height: 24), | ||||
|               // OTP login button | ||||
|               loginType != null && loginType.toInt != 1 | ||||
|                   ? Column( | ||||
|                       children: [ | ||||
|                         loginType.toInt != 1 | ||||
|                             ? CustomButton( | ||||
|                                 text: LocaleKeys.loginByOTP.tr(), | ||||
|                                 onPressed: () { | ||||
|                                   showModalBottomSheet( | ||||
|                                     context: context, | ||||
|                                     isScrollControlled: true, | ||||
|                                     isDismissible: false, | ||||
|                                     useSafeArea: true, | ||||
|                                     backgroundColor: Colors.transparent, | ||||
|                                     enableDrag: false, | ||||
|                                     // Prevent dragging to avoid focus conflicts | ||||
|                                     builder: (bottomSheetContext) => StatefulBuilder(builder: (BuildContext context, StateSetter setModalState) { | ||||
|                                       return Padding( | ||||
|                                         padding: EdgeInsets.only(bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom), | ||||
|                                         child: SingleChildScrollView( | ||||
|                                           child: GenericBottomSheet( | ||||
|                                             countryCode: "966", | ||||
|                                             initialPhoneNumber: "", | ||||
|                                             textController: TextEditingController(), | ||||
|                                             isFromSavedLogin: true, | ||||
|                                             isEnableCountryDropdown: true, | ||||
|                                             onCountryChange: (value) {}, | ||||
|                                             onChange: (String? value) {}, | ||||
|                                             buttons: [ | ||||
|                                               Padding( | ||||
|                                                 padding: EdgeInsets.only(bottom: 10.h), | ||||
|                                                 child: CustomButton( | ||||
|                                                   text: LocaleKeys.sendOTPSMS.tr(), | ||||
|                                                   onPressed: () { | ||||
|                                                     Navigator.of(context).pop(); | ||||
|                                                     loginType = LoginTypeEnum.sms; | ||||
|                                                     int? val = loginType.toInt; | ||||
|                                                     // checkUserAuthentication(val); | ||||
|                                                   }, | ||||
|                                                   backgroundColor: AppColors.primaryRedColor, | ||||
|                                                   borderColor: AppColors.primaryRedBorderColor, | ||||
|                                                   textColor: AppColors.whiteColor, | ||||
|                                                   icon: AppAssets.message, | ||||
|                                                 ), | ||||
|                                               ), | ||||
|                                               Row( | ||||
|                                                 crossAxisAlignment: CrossAxisAlignment.center, | ||||
|                                                 mainAxisAlignment: MainAxisAlignment.center, | ||||
|                                                 children: [ | ||||
|                                                   Padding(padding: EdgeInsets.symmetric(horizontal: 8.h), child: (LocaleKeys.oR.tr()).toText16(color: AppColors.textColor)), | ||||
|                                                 ], | ||||
|                                               ), | ||||
|                                               Padding( | ||||
|                                                 padding: const EdgeInsets.only(bottom: 10, top: 10), | ||||
|                                                 child: CustomButton( | ||||
|                                                   text: LocaleKeys.sendOTPWHATSAPP.tr(), | ||||
|                                                   onPressed: () { | ||||
|                                                     Navigator.of(context).pop(); | ||||
|                                                     loginType = LoginTypeEnum.whatsapp; | ||||
|                                                     int? val = loginType.toInt; | ||||
|                                                     // checkUserAuthentication(val); | ||||
|                                                   }, | ||||
|                                                   backgroundColor: AppColors.transparent, | ||||
|                                                   borderColor: AppColors.textColor, | ||||
|                                                   textColor: AppColors.textColor, | ||||
|                                                   icon: AppAssets.whatsapp, | ||||
|                                                 ), | ||||
|                                               ), | ||||
|                                             ], | ||||
|                                           ), | ||||
|                                         ), | ||||
|                                       ); | ||||
|                                     }), | ||||
|                                   ); | ||||
|                                 }, | ||||
|                                 backgroundColor: AppColors.whiteColor, | ||||
|                                 borderColor: AppColors.borderOnlyColor, | ||||
|                                 textColor: AppColors.textColor, | ||||
|                                 borderWidth: 2, | ||||
|                                 padding: EdgeInsets.fromLTRB(0, 14, 0, 14), | ||||
|                                 icon: AppAssets.password_validation, | ||||
|                               ) | ||||
|                             : Container(), | ||||
|                         SizedBox( | ||||
|                           height: 20, | ||||
|                         ), | ||||
|                       ], | ||||
|                     ) | ||||
|                   : CustomButton( | ||||
|                       text: "${LocaleKeys.loginBy.tr()} ${LoginTypeEnum.whatsapp.displayName}", | ||||
|                       onPressed: () { | ||||
|                         if (loginType == LoginTypeEnum.fingerprint || loginType == LoginTypeEnum.face) { | ||||
|                           // loginWithFingerPrintFace(loginType.toInt, "iMEI"); | ||||
|                         } else { | ||||
|                           loginType = LoginTypeEnum.whatsapp; | ||||
|                           int? val = loginType.toInt; | ||||
|                           // checkUserAuthentication(val); | ||||
|                         } | ||||
|                       }, | ||||
|                       backgroundColor: AppColors.whiteColor, | ||||
|                       borderColor: Color(0xFF2E3039), | ||||
|                       textColor: Color(0xFF2E3039), | ||||
|                       borderWidth: 2, | ||||
|                       padding: EdgeInsets.fromLTRB(0, 14, 0, 14), | ||||
|                       icon: AppAssets.whatsapp, | ||||
|                     ), | ||||
|               const Spacer(flex: 2), | ||||
|               // OR divider | ||||
| 
 | ||||
|               const SizedBox(height: 24), | ||||
|               // Guest and Switch account | ||||
|               Row( | ||||
|                 mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                 children: [ | ||||
|                   Expanded( | ||||
|                     child: Container( | ||||
|                       height: 56, | ||||
|                       child: CustomButton( | ||||
|                         text: LocaleKeys.guest.tr(), | ||||
|                         onPressed: () { | ||||
|                           Navigator.of(context).pushReplacement( | ||||
|                             MaterialPageRoute(builder: (BuildContext context) => LoginScreen()), | ||||
|                           ); | ||||
|                         }, | ||||
|                         backgroundColor: Color(0xffFEE9EA), | ||||
|                         borderColor: Color(0xffFEE9EA), | ||||
|                         textColor: Color(0xffED1C2B), | ||||
|                         fontSize: 16, | ||||
|                         fontWeight: FontWeight.w500, | ||||
|                         borderRadius: 12, | ||||
|                         padding: EdgeInsets.fromLTRB(0, 10, 0, 10), | ||||
|                         // icon: "assets/images/svg/apple-finder.svg", | ||||
|                       ), | ||||
|                     ), | ||||
|                   ), | ||||
|                   SizedBox( | ||||
|                     width: MediaQuery.of(context).size.width * 0.05, | ||||
|                   ), | ||||
|                   Expanded( | ||||
|                     child: Container( | ||||
|                       height: 56, | ||||
|                       child: CustomButton( | ||||
|                         text: LocaleKeys.switchAccount.tr(), | ||||
|                         onPressed: () { | ||||
|                           Navigator.of(context).pushReplacement( | ||||
|                             MaterialPageRoute(builder: (BuildContext context) => LoginScreen()), | ||||
|                           ); | ||||
|                         }, | ||||
|                         backgroundColor: Color(0xffFEE9EA), | ||||
|                         borderColor: Color(0xffFEE9EA), | ||||
|                         textColor: Color(0xffED1C2B), | ||||
|                         fontSize: 15, | ||||
|                         fontWeight: FontWeight.w500, | ||||
|                         borderRadius: 12, | ||||
|                         padding: EdgeInsets.fromLTRB(0, 10, 0, 10), | ||||
|                         // icon: "assets/images/svg/apple-finder.svg", | ||||
|                       ), | ||||
|                     ), | ||||
|                   ), | ||||
|                 ], | ||||
|               ), | ||||
|               const SizedBox(height: 20), | ||||
|             ], | ||||
|           ), | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   String getTypeIcons(int type) { | ||||
|     final types = { | ||||
|       1: AppAssets.sms, | ||||
|       2: AppAssets.fingerprint, | ||||
|       3: AppAssets.fingerprint, | ||||
|       4: AppAssets.whatsapp, | ||||
|     }; | ||||
| 
 | ||||
|     if (types.containsKey(type)) { | ||||
|       return types[type]!; | ||||
|     } else { | ||||
|       throw Exception('Invalid login type: $type'); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,265 @@ | ||||
| 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; | ||||
| 
 | ||||
|   @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: LocaleKeys.labResults.tr(context: context).toText18(), | ||||
|         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( | ||||
|                                         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                         children: [ | ||||
|                                           Padding( | ||||
|                                             padding: EdgeInsets.all(16.h), | ||||
|                                             child: Column( | ||||
|                                               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                               children: [ | ||||
|                                                 Row( | ||||
|                                                   mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: getLabOrderStatusText(model.patientLabOrders[index].status!), | ||||
|                                                       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, | ||||
|                                                     ), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                               ], | ||||
|                                             ), | ||||
|                                           ), | ||||
|                                           AnimatedSwitcher( | ||||
|                                             duration: Duration(milliseconds: 300), | ||||
|                                             switchInCurve: Curves.easeIn, | ||||
|                                             switchOutCurve: Curves.easeOut, | ||||
|                                             transitionBuilder: (Widget child, Animation<double> animation) { | ||||
|                                               return FadeTransition( | ||||
|                                                 opacity: animation, | ||||
|                                                 child: SizeTransition( | ||||
|                                                   sizeFactor: animation, | ||||
|                                                   axisAlignment: 0.0, | ||||
|                                                   child: child, | ||||
|                                                 ), | ||||
|                                               ); | ||||
|                                             }, | ||||
|                                             child: isExpanded | ||||
|                                                 ? Container( | ||||
|                                                     key: ValueKey<int>(index), | ||||
|                                                     padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h), | ||||
|                                                     child: Column( | ||||
|                                                       crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                                       children: [ | ||||
|                                                         ...model.patientLabOrders[index].testDetails!.map((detail) { | ||||
|                                                           return Padding( | ||||
|                                                             padding: EdgeInsets.only(bottom: 8.h), | ||||
|                                                             child: '● ${detail.description}'.toText14(weight: FontWeight.w500), | ||||
|                                                           ); | ||||
|                                                         }).toList(), | ||||
|                                                         SizedBox(height: 16.h), | ||||
|                                                         Row( | ||||
|                                                           mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                                                           children: [ | ||||
|                                                             SizedBox(), | ||||
|                                                             CustomButton( | ||||
|                                                               icon: AppAssets.view_report_icon, | ||||
|                                                               iconColor: AppColors.primaryRedColor, | ||||
|                                                               iconSize: 16.h, | ||||
|                                                               text: LocaleKeys.viewReport.tr(context: context), | ||||
|                                                               onPressed: () {}, | ||||
|                                                               backgroundColor: AppColors.secondaryLightRedColor, | ||||
|                                                               borderColor: AppColors.secondaryLightRedColor, | ||||
|                                                               textColor: AppColors.primaryRedColor, | ||||
|                                                               fontSize: 14, | ||||
|                                                               fontWeight: FontWeight.bold, | ||||
|                                                               borderRadius: 12, | ||||
|                                                               padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                                                               height: 40.h, | ||||
|                                                             ), | ||||
|                                                           ], | ||||
|                                                         ), | ||||
|                                                       ], | ||||
|                                                     ), | ||||
|                                                   ) | ||||
|                                                 : SizedBox.shrink(key: ValueKey<int>(-index)), | ||||
|                                           ), | ||||
|                                         ], | ||||
|                                       ), | ||||
|                                     ), | ||||
|                                   ), | ||||
|                                 ), | ||||
|                               ), | ||||
|                             ); | ||||
|                     }, | ||||
|                   ), | ||||
|                 ], | ||||
|               ); | ||||
|             }, | ||||
|           ), | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   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; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   String getLabOrderStatusText(num status) { | ||||
|     switch (status) { | ||||
|       case 44: | ||||
|         return LocaleKeys.resultsPending.tr(context: context); | ||||
|       case 45: | ||||
|         return LocaleKeys.resultsPending.tr(context: context); | ||||
|       case 16: | ||||
|         return LocaleKeys.resultsAvailable.tr(context: context); | ||||
|       case 17: | ||||
|         return LocaleKeys.resultsAvailable.tr(context: context); | ||||
|       default: | ||||
|         return ""; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -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), | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,313 @@ | ||||
| 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/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart'; | ||||
| import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; | ||||
| import 'package:hmg_patient_app_new/generated/locale_keys.g.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 PrescriptionDetailPage extends StatefulWidget { | ||||
|   PrescriptionDetailPage({super.key, required this.prescriptionsResponseModel}); | ||||
| 
 | ||||
|   PatientPrescriptionsResponseModel prescriptionsResponseModel; | ||||
| 
 | ||||
|   @override | ||||
|   State<PrescriptionDetailPage> createState() => _PrescriptionDetailPageState(); | ||||
| } | ||||
| 
 | ||||
| class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> { | ||||
|   late PrescriptionsViewModel prescriptionsViewModel; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     scheduleMicrotask(() { | ||||
|       prescriptionsViewModel.getPrescriptionDetails(widget.prescriptionsResponseModel); | ||||
|     }); | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false); | ||||
|     return Scaffold( | ||||
|       backgroundColor: AppColors.bgScaffoldColor, | ||||
|       appBar: AppBar( | ||||
|         title: LocaleKeys.prescriptions.tr(context: context).toText18(), | ||||
|         backgroundColor: AppColors.bgScaffoldColor, | ||||
|       ), | ||||
|       body: SingleChildScrollView( | ||||
|         child: Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) { | ||||
|           return Column( | ||||
|             crossAxisAlignment: CrossAxisAlignment.start, | ||||
|             children: [ | ||||
|               LocaleKeys.prescriptions.tr(context: context).toText24(isBold: true).paddingSymmetrical(24.h, 0.h), | ||||
|               SizedBox(height: 24.h), | ||||
|               Container( | ||||
|                 decoration: RoundedRectangleBorder().toSmoothCornerDecoration( | ||||
|                   color: AppColors.whiteColor, | ||||
|                   borderRadius: 20.h, | ||||
|                   hasShadow: true, | ||||
|                 ), | ||||
|                 child: Padding( | ||||
|                   padding: EdgeInsets.all(16.h), | ||||
|                   child: Column( | ||||
|                     crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                     children: [ | ||||
|                       Row( | ||||
|                         mainAxisSize: MainAxisSize.min, | ||||
|                         children: [ | ||||
|                           Image.network( | ||||
|                             widget.prescriptionsResponseModel.doctorImageURL!, | ||||
|                             width: 24.h, | ||||
|                             height: 24.h, | ||||
|                             fit: BoxFit.fill, | ||||
|                           ).circle(100), | ||||
|                           SizedBox(width: 8.h), | ||||
|                           Expanded(child: widget.prescriptionsResponseModel.doctorName!.toText16(isBold: true)), | ||||
|                         ], | ||||
|                       ), | ||||
|                       SizedBox(height: 16.h), | ||||
|                       Wrap( | ||||
|                         direction: Axis.horizontal, | ||||
|                         spacing: 6.h, | ||||
|                         runSpacing: 6.h, | ||||
|                         children: [ | ||||
|                           Row( | ||||
|                             mainAxisSize: MainAxisSize.min, | ||||
|                             children: [ | ||||
|                               CustomButton( | ||||
|                                 icon: AppAssets.doctor_calendar_icon, | ||||
|                                 iconColor: AppColors.textColor, | ||||
|                                 iconSize: 13.h, | ||||
|                                 text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.prescriptionsResponseModel.appointmentDate), 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: 30.h, | ||||
|                               ), | ||||
|                             ], | ||||
|                           ), | ||||
|                           Row( | ||||
|                             mainAxisSize: MainAxisSize.min, | ||||
|                             children: [ | ||||
|                               CustomButton( | ||||
|                                 text: widget.prescriptionsResponseModel.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: 30.h, | ||||
|                               ), | ||||
|                             ], | ||||
|                           ), | ||||
|                           Row( | ||||
|                             mainAxisSize: MainAxisSize.min, | ||||
|                             children: [ | ||||
|                               CustomButton( | ||||
|                                 icon: AppAssets.rating_icon, | ||||
|                                 iconColor: AppColors.ratingColorYellow, | ||||
|                                 iconSize: 13.h, | ||||
|                                 text: "Rating: ${widget.prescriptionsResponseModel.decimalDoctorRate}", | ||||
|                                 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: 30.h, | ||||
|                               ), | ||||
|                             ], | ||||
|                           ), | ||||
|                           Row( | ||||
|                             mainAxisSize: MainAxisSize.min, | ||||
|                             children: [ | ||||
|                               CustomButton( | ||||
|                                 text: widget.prescriptionsResponseModel.name!, | ||||
|                                 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: 30.h, | ||||
|                               ), | ||||
|                             ], | ||||
|                           ), | ||||
|                         ], | ||||
|                       ), | ||||
|                     ], | ||||
|                   ), | ||||
|                 ), | ||||
|               ).paddingSymmetrical(24.h, 0.h), | ||||
|               SizedBox(height: 16.h), | ||||
|               ListView.builder( | ||||
|                 shrinkWrap: true, | ||||
|                 physics: NeverScrollableScrollPhysics(), | ||||
|                 itemCount: prescriptionVM.isPrescriptionsDetailsLoading ? 5 : prescriptionVM.prescriptionDetailsList.length, | ||||
|                 itemBuilder: (context, index) { | ||||
|                   return prescriptionVM.isPrescriptionsDetailsLoading | ||||
|                       ? 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: Column( | ||||
|                                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                   children: [ | ||||
|                                     Padding( | ||||
|                                       padding: EdgeInsets.all(16.h), | ||||
|                                       child: Container( | ||||
|                                         child: Column( | ||||
|                                           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                           children: [ | ||||
|                                             Row( | ||||
|                                               mainAxisSize: MainAxisSize.min, | ||||
|                                               mainAxisAlignment: MainAxisAlignment.start, | ||||
|                                               children: [ | ||||
|                                                 Image.network( | ||||
|                                                   prescriptionVM.prescriptionDetailsList[index].imageSRCUrl!, | ||||
|                                                   width: 60.h, | ||||
|                                                   height: 60.h, | ||||
|                                                   fit: BoxFit.fill, | ||||
|                                                 ).circle(100), | ||||
|                                                 SizedBox(width: 8.h), | ||||
|                                                 Expanded( | ||||
|                                                   child: prescriptionVM.prescriptionDetailsList[index].itemDescription!.toText16(isBold: true, maxlines: 2), | ||||
|                                                 ), | ||||
|                                               ], | ||||
|                                             ), | ||||
|                                             SizedBox(height: 16.h), | ||||
|                                             Wrap( | ||||
|                                               direction: Axis.horizontal, | ||||
|                                               spacing: 6.h, | ||||
|                                               runSpacing: 6.h, | ||||
|                                               children: [ | ||||
|                                                 Row( | ||||
|                                                   mainAxisSize: MainAxisSize.min, | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: "${LocaleKeys.route.tr(context: context)}: ${prescriptionVM.prescriptionDetailsList[index].route}", | ||||
|                                                       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: 30.h, | ||||
|                                                     ), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                                 Row( | ||||
|                                                   mainAxisSize: MainAxisSize.min, | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: "${LocaleKeys.frequency.tr(context: context)}: ${prescriptionVM.prescriptionDetailsList[index].frequency}", | ||||
|                                                       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: 30.h, | ||||
|                                                     ), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                                 Row( | ||||
|                                                   mainAxisSize: MainAxisSize.min, | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: "${LocaleKeys.dailyDoses.tr(context: context)}: ${prescriptionVM.prescriptionDetailsList[index].doseDailyQuantity}", | ||||
|                                                       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: 30.h, | ||||
|                                                     ), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                                 Row( | ||||
|                                                   mainAxisSize: MainAxisSize.min, | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: "${LocaleKeys.days.tr(context: context)}: ${prescriptionVM.prescriptionDetailsList[index].days}", | ||||
|                                                       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: 30.h, | ||||
|                                                     ), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                               ], | ||||
|                                             ), | ||||
|                                             SizedBox(height: 8.h), | ||||
|                                             Row( | ||||
|                                               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                               children: [ | ||||
|                                                 Utils.buildSvgWithAssets(icon: AppAssets.prescription_remarks_icon, width: 18.h, height: 18.h), | ||||
|                                                 SizedBox(width: 9.h), | ||||
|                                                 Expanded(child: "${LocaleKeys.remarks.tr(context: context)}: ${prescriptionVM.prescriptionDetailsList[index].remarks!}".toText10(isBold: true)), | ||||
|                                               ], | ||||
|                                             ) | ||||
|                                           ], | ||||
|                                         ), | ||||
|                                       ), | ||||
|                                     ) | ||||
|                                   ], | ||||
|                                 ), | ||||
|                               ), | ||||
|                             ), | ||||
|                           ), | ||||
|                         ); | ||||
|                 }, | ||||
|               ).paddingSymmetrical(24.h, 0.h), | ||||
|             ], | ||||
|           ); | ||||
|         }), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,299 @@ | ||||
| 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/features/prescriptions/prescriptions_view_model.dart'; | ||||
| import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | ||||
| import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.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:hmg_patient_app_new/widgets/transitions/fade_page.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| 
 | ||||
| class PrescriptionsListPage extends StatefulWidget { | ||||
|   const PrescriptionsListPage({super.key}); | ||||
| 
 | ||||
|   @override | ||||
|   State<PrescriptionsListPage> createState() => _PrescriptionsListPageState(); | ||||
| } | ||||
| 
 | ||||
| class _PrescriptionsListPageState extends State<PrescriptionsListPage> { | ||||
|   int? expandedIndex; | ||||
| 
 | ||||
|   late PrescriptionsViewModel prescriptionsViewModel; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     scheduleMicrotask(() { | ||||
|       prescriptionsViewModel.initPrescriptionsViewModel(); | ||||
|     }); | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false); | ||||
|     return Scaffold( | ||||
|       backgroundColor: AppColors.bgScaffoldColor, | ||||
|       appBar: AppBar( | ||||
|         title: LocaleKeys.prescriptions.tr(context: context).toText18(), | ||||
|         backgroundColor: AppColors.bgScaffoldColor, | ||||
|       ), | ||||
|       body: SingleChildScrollView( | ||||
|         child: Consumer<PrescriptionsViewModel>(builder: (context, model, child) { | ||||
|           return Column( | ||||
|             crossAxisAlignment: CrossAxisAlignment.start, | ||||
|             children: [ | ||||
|               LocaleKeys.prescriptions.tr(context: context).toText24(isBold: true).paddingSymmetrical(24.h, 0.h), | ||||
|               SizedBox(height: 16.h), | ||||
|               // Build Tab Bar | ||||
|               SizedBox(height: 16.h), | ||||
|               // Clinic & Hospital Sort | ||||
|               Row( | ||||
|                 children: [ | ||||
|                   CustomButton( | ||||
|                     text: LocaleKeys.byClinic.tr(context: context), | ||||
|                     onPressed: () { | ||||
|                       model.setIsSortByClinic(true); | ||||
|                     }, | ||||
|                     backgroundColor: model.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, | ||||
|                     borderColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2), | ||||
|                     textColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, | ||||
|                     fontSize: 12, | ||||
|                     fontWeight: FontWeight.w500, | ||||
|                     borderRadius: 10, | ||||
|                     padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                     height: 40.h, | ||||
|                   ), | ||||
|                   SizedBox(width: 8.h), | ||||
|                   CustomButton( | ||||
|                     text: LocaleKeys.byHospital.tr(context: context), | ||||
|                     onPressed: () { | ||||
|                       model.setIsSortByClinic(false); | ||||
|                     }, | ||||
|                     backgroundColor: model.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, | ||||
|                     borderColor: model.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor, | ||||
|                     textColor: model.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, | ||||
|                     fontSize: 12, | ||||
|                     fontWeight: FontWeight.w500, | ||||
|                     borderRadius: 10, | ||||
|                     padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                     height: 40.h, | ||||
|                   ), | ||||
|                 ], | ||||
|               ).paddingSymmetrical(24.h, 0.h), | ||||
|               SizedBox(height: 20.h), | ||||
|               // Expandable list | ||||
|               ListView.builder( | ||||
|                 itemCount: model.isPrescriptionsOrdersLoading ? 4 : model.patientPrescriptionOrdersViewList.length, | ||||
|                 physics: NeverScrollableScrollPhysics(), | ||||
|                 shrinkWrap: true, | ||||
|                 padding: const EdgeInsets.only(left: 0, right: 8), | ||||
|                 itemBuilder: (context, index) { | ||||
|                   final isExpanded = expandedIndex == index; | ||||
|                   return model.isPrescriptionsOrdersLoading | ||||
|                       ? 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( | ||||
|                                     crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                     children: [ | ||||
|                                       Padding( | ||||
|                                         padding: EdgeInsets.all(16.h), | ||||
|                                         child: Column( | ||||
|                                           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                           children: [ | ||||
|                                             Row( | ||||
|                                               mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                                               children: [ | ||||
|                                                 CustomButton( | ||||
|                                                   text: "${model.patientPrescriptionOrdersViewList[index].prescriptionsList!.length} Prescriptions Available", | ||||
|                                                   onPressed: () {}, | ||||
|                                                   backgroundColor: AppColors.greyColor, | ||||
|                                                   borderColor: AppColors.greyColor, | ||||
|                                                   textColor: AppColors.blackColor, | ||||
|                                                   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), | ||||
|                                             model.patientPrescriptionOrdersViewList[index].filterName!.toText16(isBold: true) | ||||
|                                           ], | ||||
|                                         ), | ||||
|                                       ), | ||||
|                                       AnimatedSwitcher( | ||||
|                                         duration: Duration(milliseconds: 500), | ||||
|                                         switchInCurve: Curves.easeIn, | ||||
|                                         switchOutCurve: Curves.easeOut, | ||||
|                                         transitionBuilder: (Widget child, Animation<double> animation) { | ||||
|                                           return FadeTransition( | ||||
|                                             opacity: animation, | ||||
|                                             child: SizeTransition( | ||||
|                                               sizeFactor: animation, | ||||
|                                               axisAlignment: 0.0, | ||||
|                                               child: child, | ||||
|                                             ), | ||||
|                                           ); | ||||
|                                         }, | ||||
|                                         child: isExpanded | ||||
|                                             ? Container( | ||||
|                                                 key: ValueKey<int>(index), | ||||
|                                                 padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h), | ||||
|                                                 child: Column( | ||||
|                                                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                                   children: [ | ||||
|                                                     ...model.patientPrescriptionOrdersViewList[index].prescriptionsList!.map((prescription) { | ||||
|                                                       return Column( | ||||
|                                                         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                                         children: [ | ||||
|                                                           Row( | ||||
|                                                             mainAxisSize: MainAxisSize.min, | ||||
|                                                             children: [ | ||||
|                                                               Image.network( | ||||
|                                                                 prescription.doctorImageURL!, | ||||
|                                                                 width: 24.h, | ||||
|                                                                 height: 24.h, | ||||
|                                                                 fit: BoxFit.fill, | ||||
|                                                               ).circle(100), | ||||
|                                                               SizedBox(width: 8.h), | ||||
|                                                               Expanded(child: prescription.doctorName!.toText14(weight: FontWeight.w500)), | ||||
|                                                             ], | ||||
|                                                           ), | ||||
|                                                           SizedBox(height: 8.h), | ||||
|                                                           Row( | ||||
|                                                             children: [ | ||||
|                                                               CustomButton( | ||||
|                                                                 text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), 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.isSortByClinic ? prescription.name! : prescription.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, | ||||
|                                                               ), | ||||
|                                                             ], | ||||
|                                                           ), | ||||
|                                                           SizedBox(height: 8.h), | ||||
|                                                           Row( | ||||
|                                                             children: [ | ||||
|                                                               Expanded( | ||||
|                                                                 flex: 6, | ||||
|                                                                 child: CustomButton( | ||||
|                                                                   text: prescription.isHomeMedicineDeliverySupported! | ||||
|                                                                       ? LocaleKeys.resendOrder.tr(context: context) | ||||
|                                                                       : LocaleKeys.prescriptionDeliveryError.tr(context: context), | ||||
|                                                                   onPressed: () {}, | ||||
|                                                                   backgroundColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor.withOpacity(0.15) : AppColors.greyF7Color, | ||||
|                                                                   borderColor: AppColors.successColor.withOpacity(0.01), | ||||
|                                                                   textColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35), | ||||
|                                                                   fontSize: prescription.isHomeMedicineDeliverySupported! ? 14 : 12, | ||||
|                                                                   fontWeight: FontWeight.w500, | ||||
|                                                                   borderRadius: 12, | ||||
|                                                                   padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                                                                   height: 40.h, | ||||
|                                                                   icon: AppAssets.prescription_refill_icon, | ||||
|                                                                   iconColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35), | ||||
|                                                                   iconSize: 14.h, | ||||
|                                                                 ), | ||||
|                                                               ), | ||||
|                                                               SizedBox(width: 8.h), | ||||
|                                                               Expanded( | ||||
|                                                                 flex: 1, | ||||
|                                                                 child: Container( | ||||
|                                                                   height: 40.h, | ||||
|                                                                   width: 40.h, | ||||
|                                                                   decoration: RoundedRectangleBorder().toSmoothCornerDecoration( | ||||
|                                                                     color: AppColors.textColor, | ||||
|                                                                     borderRadius: 10.h, | ||||
|                                                                   ), | ||||
|                                                                   child: Padding( | ||||
|                                                                     padding: EdgeInsets.all(8.h), | ||||
|                                                                     child: Utils.buildSvgWithAssets( | ||||
|                                                                       icon: AppAssets.forward_arrow_icon, | ||||
|                                                                       width: 10.h, | ||||
|                                                                       height: 10.h, | ||||
|                                                                       fit: BoxFit.contain, | ||||
|                                                                     ), | ||||
|                                                                   ), | ||||
|                                                                 ).onPress(() { | ||||
|                                                                   model.setPrescriptionsDetailsLoading(); | ||||
|                                                                   Navigator.of(context).push( | ||||
|                                                                     FadePage( | ||||
|                                                                       page: PrescriptionDetailPage(prescriptionsResponseModel: prescription), | ||||
|                                                                     ), | ||||
|                                                                   ); | ||||
|                                                                 }), | ||||
|                                                               ), | ||||
|                                                             ], | ||||
|                                                           ), | ||||
|                                                           SizedBox(height: 12.h), | ||||
|                                                           Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h), | ||||
|                                                           SizedBox(height: 12.h), | ||||
|                                                         ], | ||||
|                                                       ); | ||||
|                                                     }).toList(), | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                               ) | ||||
|                                             : SizedBox.shrink(), | ||||
|                                       ), | ||||
|                                     ], | ||||
|                                   ), | ||||
|                                 ), | ||||
|                               ), | ||||
|                             ), | ||||
|                           ), | ||||
|                         ); | ||||
|                 }, | ||||
|               ).paddingSymmetrical(24.h, 0.h), | ||||
|             ], | ||||
|           ); | ||||
|         }), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,251 @@ | ||||
| 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'; | ||||
| 
 | ||||
| import '../../features/radiology/radiology_view_model.dart'; | ||||
| 
 | ||||
| class RadiologyOrdersPage extends StatefulWidget { | ||||
|   const RadiologyOrdersPage({super.key}); | ||||
| 
 | ||||
|   @override | ||||
|   State<RadiologyOrdersPage> createState() => _RadiologyOrdersPageState(); | ||||
| } | ||||
| 
 | ||||
| class _RadiologyOrdersPageState extends State<RadiologyOrdersPage> { | ||||
|   late RadiologyViewModel radiologyViewModel; | ||||
| 
 | ||||
|   int? expandedIndex; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     scheduleMicrotask(() { | ||||
|       radiologyViewModel.initRadiologyProvider(); | ||||
|     }); | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     radiologyViewModel = Provider.of<RadiologyViewModel>(context); | ||||
|     return Scaffold( | ||||
|       backgroundColor: AppColors.bgScaffoldColor, | ||||
|       appBar: AppBar( | ||||
|         title: LocaleKeys.radiology.tr(context: context).toText18(), | ||||
|         backgroundColor: AppColors.bgScaffoldColor, | ||||
|       ), | ||||
|       body: Padding( | ||||
|         padding: EdgeInsets.all(24.h), | ||||
|         child: SingleChildScrollView( | ||||
|           child: Consumer<RadiologyViewModel>( | ||||
|             builder: (context, model, child) { | ||||
|               return Column( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 children: [ | ||||
|                   Row( | ||||
|                     mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                     children: [ | ||||
|                       LocaleKeys.radiology.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.isRadiologyOrdersLoading ? 5 : model.patientRadiologyOrders.length, | ||||
|                     itemBuilder: (context, index) { | ||||
|                       final isExpanded = expandedIndex == index; | ||||
|                       return model.isRadiologyOrdersLoading | ||||
|                           ? 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( | ||||
|                                         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                         children: [ | ||||
|                                           Padding( | ||||
|                                             padding: EdgeInsets.all(16.h), | ||||
|                                             child: Column( | ||||
|                                               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                               children: [ | ||||
|                                                 Row( | ||||
|                                                   mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: LocaleKeys.resultsAvailable.tr(context: context), | ||||
|                                                       onPressed: () {}, | ||||
|                                                       backgroundColor: AppColors.successColor.withOpacity(0.15), | ||||
|                                                       borderColor: AppColors.successColor.withOpacity(0.01), | ||||
|                                                       textColor: AppColors.successColor, | ||||
|                                                       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.patientRadiologyOrders[index].doctorImageURL!, | ||||
|                                                       width: 24.h, | ||||
|                                                       height: 24.h, | ||||
|                                                       fit: BoxFit.fill, | ||||
|                                                     ).circle(100), | ||||
|                                                     SizedBox(width: 4.h), | ||||
|                                                     model.patientRadiologyOrders[index].doctorName!.toText16(isBold: true) | ||||
|                                                   ], | ||||
|                                                 ), | ||||
|                                                 SizedBox(height: 8.h), | ||||
|                                                 Row( | ||||
|                                                   children: [ | ||||
|                                                     CustomButton( | ||||
|                                                       text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(model.patientRadiologyOrders[index].orderDate), 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.patientRadiologyOrders[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: Column( | ||||
|                                                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                                 children: [ | ||||
|                                                   Padding( | ||||
|                                                     padding: EdgeInsets.only(bottom: 8.h), | ||||
|                                                     child: '● ${model.patientRadiologyOrders[index].description}'.toText14(weight: FontWeight.w500), | ||||
|                                                   ), | ||||
|                                                   Row( | ||||
|                                                     mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                                                     children: [ | ||||
|                                                       SizedBox(), | ||||
|                                                       CustomButton( | ||||
|                                                         icon: AppAssets.view_report_icon, | ||||
|                                                         iconColor: AppColors.primaryRedColor, | ||||
|                                                         iconSize: 16.h, | ||||
|                                                         text: LocaleKeys.viewReport.tr(context: context), | ||||
|                                                         onPressed: () {}, | ||||
|                                                         backgroundColor: AppColors.secondaryLightRedColor, | ||||
|                                                         borderColor: AppColors.secondaryLightRedColor, | ||||
|                                                         textColor: AppColors.primaryRedColor, | ||||
|                                                         fontSize: 14, | ||||
|                                                         fontWeight: FontWeight.bold, | ||||
|                                                         borderRadius: 12, | ||||
|                                                         padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||
|                                                         height: 40.h, | ||||
|                                                       ), | ||||
|                                                     ], | ||||
|                                                   ), | ||||
|                                                 ], | ||||
|                                               ), | ||||
|                                             ), | ||||
|                                             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; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   String getLabOrderStatusText(num status) { | ||||
|     switch (status) { | ||||
|       case 44: | ||||
|         return LocaleKeys.resultsPending.tr(context: context); | ||||
|       case 45: | ||||
|         return LocaleKeys.resultsPending.tr(context: context); | ||||
|       case 16: | ||||
|         return LocaleKeys.resultsAvailable.tr(context: context); | ||||
|       case 17: | ||||
|         return LocaleKeys.resultsAvailable.tr(context: context); | ||||
|       default: | ||||
|         return ""; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -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(); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,59 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/utils.dart'; | ||||
| import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | ||||
| import 'package:hmg_patient_app_new/theme/colors.dart'; | ||||
| 
 | ||||
| class BottomNavigation extends StatelessWidget { | ||||
|   const BottomNavigation({super.key}); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Container( | ||||
|       padding: const EdgeInsets.symmetric(vertical: 12), | ||||
|       decoration: const BoxDecoration( | ||||
|         color: Colors.white, | ||||
|         border: Border( | ||||
|           top: BorderSide(color: AppColors.bottomNAVBorder, width: 0.5), | ||||
|         ), | ||||
| 
 | ||||
|       ), | ||||
|       child: Row( | ||||
|         mainAxisAlignment: MainAxisAlignment.spaceAround, | ||||
|         children: [ | ||||
|           _buildNavItem(AppAssets.homeBottom, LocaleKeys.home.tr()), | ||||
|           _buildNavItem(AppAssets.myFilesBottom,  LocaleKeys.myFiles.tr()), | ||||
|           _buildNavItem(AppAssets.bookAppoBottom,  LocaleKeys.appointment.tr(), iconSize: 32), | ||||
|           _buildNavItem(AppAssets.toDoBottom,  LocaleKeys.todoList.tr()), | ||||
|           _buildNavItem(AppAssets.servicesBottom, LocaleKeys.services2.tr()), | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget _buildNavItem(String iconName, String label,{ double iconSize = 24}) { | ||||
|     return Column( | ||||
|       mainAxisSize: MainAxisSize.min, | ||||
|       children: [ | ||||
|         Container( | ||||
|           padding: const EdgeInsets.all(10), | ||||
|           child: Utils.buildSvgWithAssets( | ||||
|             icon: iconName, | ||||
|             height: iconSize, | ||||
|             width: iconSize | ||||
|           ), | ||||
|         ), | ||||
|         // const SizedBox(height: 4), | ||||
|         Text( | ||||
|           label, | ||||
|           style: TextStyle( | ||||
|             fontSize: 13, | ||||
|             fontWeight: FontWeight.w500, | ||||
|             color: Colors.black87, | ||||
|           ), | ||||
|         ), | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| } | ||||