Merge branch 'master' into faiz_dev
# Conflicts: # lib/core/api/api_client.dartpull/64/head
@ -0,0 +1,3 @@
|
||||
<svg width="30" height="26" viewBox="0 0 30 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.7787 1.62383C17.9327 0.00618458 21.4984 -0.965477 25.473 1.47256C28.2213 3.15838 29.7678 6.67982 29.2251 10.7258C28.6799 14.7914 26.0484 19.3896 20.4756 23.5144L20.3369 23.6171C18.4017 25.0503 17.1201 25.9994 15.0001 25.9994C12.88 25.9994 11.5984 25.0503 9.66323 23.6171L9.5245 23.5144C3.95169 19.3896 1.32025 14.7914 0.77498 10.7258C0.232334 6.67982 1.77878 3.15838 4.5271 1.47256C8.50173 -0.965478 12.0674 0.00618442 14.2214 1.62383C14.5758 1.88996 14.819 2.07209 15.0001 2.19508C15.1811 2.07209 15.4243 1.88996 15.7787 1.62383ZM15.2118 2.3251C15.2117 2.3251 15.2108 2.32473 15.209 2.32395L15.2072 2.32309C15.2104 2.32437 15.2119 2.32511 15.2118 2.3251ZM14.7929 2.32309C14.7875 2.32524 14.7868 2.32588 14.7911 2.32395L14.7929 2.32309ZM24.4273 3.17739C21.2508 1.22896 18.5751 2.02499 16.9797 3.22308L16.9519 3.24398C16.5914 3.51473 16.2816 3.74735 16.0339 3.90952C15.9052 3.99381 15.7626 4.07964 15.6146 4.1465C15.4742 4.20996 15.2585 4.28934 15.0001 4.28934C14.7416 4.28934 14.5259 4.20996 14.3855 4.1465C14.2375 4.07964 14.0949 3.99381 13.9662 3.90952C13.7185 3.74736 13.4089 3.51481 13.0484 3.24407L13.0204 3.22308C11.4251 2.02499 8.74927 1.22896 5.57284 3.17739C3.62867 4.36994 2.29796 7.03563 2.75723 10.46C2.76742 10.536 2.7785 10.6123 2.79049 10.689C2.85811 10.6746 2.92826 10.667 3.00018 10.667L5.7991 10.6669C6.42367 10.666 6.97406 10.6652 7.47333 10.8468C8.17556 11.1023 8.66627 11.6989 8.95799 12.0536C8.982 12.0828 9.00493 12.1106 9.02624 12.1362C9.04161 12.1547 9.05631 12.1736 9.07032 12.1932L10.2586 13.8481L13.476 8.48583C13.6606 8.17823 13.9958 7.99305 14.3544 8.00054C14.7131 8.00804 15.0402 8.20707 15.2118 8.52212L17.452 12.6363C17.7498 13.112 17.7869 13.1449 17.8184 13.1691C17.9144 13.2428 18.0296 13.289 18.2138 13.3136C18.3868 13.3367 18.5557 13.3358 18.7968 13.3344C18.8593 13.334 18.9267 13.3337 19.0002 13.3337H20.3335C20.8858 13.3337 21.3335 13.7814 21.3335 14.3337C21.3335 14.8859 20.8858 15.3337 20.3335 15.3337H19.0002C18.9535 15.3337 18.9012 15.3345 18.8442 15.3355C18.3195 15.3445 17.388 15.3603 16.6002 14.7552C16.2445 14.4821 16.0142 14.1116 15.7919 13.7542L15.7402 13.6711C15.7296 13.6541 15.7195 13.6369 15.7099 13.6193L14.2914 11.0141L11.191 16.1815C11.0178 16.4701 10.711 16.6523 10.3747 16.6661C10.0383 16.68 9.71756 16.5237 9.52122 16.2502L7.46691 13.3891C7.08115 12.9274 6.93061 12.7776 6.78959 12.7263C6.66628 12.6815 6.50179 12.667 5.66685 12.667H3.28376C4.27649 15.5775 6.55282 18.8266 10.7144 21.9068C12.8239 23.4682 13.5939 23.9994 15.0001 23.9994C16.4062 23.9994 17.1762 23.4682 19.2858 21.9068C24.5367 18.0202 26.7862 13.8648 27.2429 10.46C27.7021 7.03563 26.3714 4.36994 24.4273 3.17739Z" fill="#ED1C2B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1,3 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 17.0625C4.5472 17.0625 0.9375 13.4528 0.9375 9C0.9375 4.5472 4.5472 0.9375 9 0.9375C13.4528 0.9375 17.0625 4.5472 17.0625 9C17.0625 13.4528 13.4528 17.0625 9 17.0625ZM9 5.25C9.41421 5.25 9.75 5.58579 9.75 6V9.37499H9.87151C10.0893 9.37492 10.3198 9.37484 10.5016 9.39662C10.6342 9.41249 11.1221 9.47231 11.3472 9.92903C11.5725 10.3861 11.3138 10.7931 11.2436 10.903C11.1469 11.0544 11.0021 11.2289 10.8651 11.3939L10.8416 11.4223C10.626 11.6824 10.3693 11.9784 10.1118 12.2139C9.98322 12.3315 9.83449 12.4526 9.67303 12.5484C9.52334 12.6371 9.28695 12.75 9 12.75C8.71306 12.75 8.47666 12.6371 8.32697 12.5484C8.16551 12.4526 8.01679 12.3315 7.88821 12.2139C7.63072 11.9784 7.37397 11.6824 7.15837 11.4223L7.13486 11.3939C6.99791 11.2289 6.85315 11.0544 6.75644 10.903C6.68621 10.7931 6.42751 10.3861 6.65279 9.92903C6.87788 9.47231 7.36577 9.41249 7.49837 9.39662C7.68024 9.37484 7.9107 9.37492 8.1285 9.37499H8.25L8.25 6C8.25 5.58579 8.58579 5.25 9 5.25Z" fill="#F43333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,3 @@
|
||||
<svg width="26" height="28" viewBox="0 0 26 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.666748 8.66634C0.666748 12.9303 3.86919 16.4463 8.00008 16.9403V20.333C8.00008 24.3831 11.2833 27.6663 15.3334 27.6663C19.3835 27.6663 22.6667 24.3831 22.6667 20.333V19.5283C24.2058 19.093 25.3334 17.678 25.3334 15.9997C25.3334 13.9746 23.6918 12.333 21.6667 12.333C19.6417 12.333 18.0001 13.9746 18.0001 15.9997C18.0001 17.678 19.1277 19.093 20.6667 19.5283V20.333C20.6667 23.2785 18.2789 25.6663 15.3334 25.6663C12.3879 25.6663 10.0001 23.2785 10.0001 20.333V16.9403C14.131 16.4463 17.3334 12.9303 17.3334 8.66634V3.99967C17.3334 2.71101 16.2887 1.66634 15.0001 1.66634H13.3334V1.33301C13.3334 0.780724 12.8857 0.333008 12.3334 0.333008C11.7811 0.333008 11.3334 0.780724 11.3334 1.33301V3.99967C11.3334 4.55196 11.7811 4.99967 12.3334 4.99967C12.8857 4.99967 13.3334 4.55196 13.3334 3.99967V3.66634H15.0001C15.1842 3.66634 15.3334 3.81558 15.3334 3.99967V8.66634C15.3334 12.1641 12.4979 14.9997 9.00008 14.9997C5.50228 14.9997 2.66675 12.1641 2.66675 8.66634V3.99967C2.66675 3.81558 2.81599 3.66634 3.00008 3.66634H4.66675V3.99967C4.66675 4.55196 5.11446 4.99967 5.66675 4.99967C6.21903 4.99967 6.66675 4.55196 6.66675 3.99967V1.33301C6.66675 0.780724 6.21903 0.333008 5.66675 0.333008C5.11446 0.333008 4.66675 0.780724 4.66675 1.33301V1.66634H3.00008C1.71142 1.66634 0.666748 2.71101 0.666748 3.99967V8.66634ZM21.6667 17.6663C20.7463 17.6663 20.0001 16.9202 20.0001 15.9997C20.0001 15.0792 20.7463 14.333 21.6667 14.333C22.5872 14.333 23.3334 15.0792 23.3334 15.9997C23.3334 16.9202 22.5872 17.6663 21.6667 17.6663Z" fill="#ED1C2B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3 2C3.55229 2 4 2.44772 4 3L4 14C4 15.6782 4.00213 16.8362 4.11923 17.7072C4.17092 18.0917 4.23383 18.5232 4.45131 18.8563C4.60954 18.5142 4.76255 18.1696 4.91553 17.8252C5.29664 16.967 5.67762 16.1092 6.13888 15.2891C6.58328 14.499 7.11953 13.7058 7.77477 13.1011C8.43871 12.4882 9.28219 12.0189 10.3058 12.0189C11.6975 12.0189 12.5705 12.9129 13.1308 13.4867L13.1883 13.5455C13.8415 14.2124 14.1538 14.4717 14.6132 14.4717C15.0859 14.4717 15.4115 14.2943 15.733 13.9424C16.1205 13.5181 16.396 12.9986 16.6658 12.49C16.7134 12.4003 16.7608 12.3109 16.8086 12.2224C17.5056 10.9328 18.5501 9 20.9995 9C21.5518 9 21.9995 9.44772 21.9995 10C21.9995 10.5523 21.5518 11 20.9995 11C19.8601 11 19.3296 11.7648 18.5475 13.2114L18.4738 13.348C18.1403 13.9674 17.7401 14.7105 17.2097 15.2911C16.5941 15.9651 15.7622 16.4717 14.6132 16.4717C13.2476 16.4717 12.3831 15.5847 11.8309 15.0182C11.7865 14.9725 11.7412 14.925 11.6952 14.8766C11.3159 14.4783 10.8784 14.0189 10.3058 14.0189C9.93769 14.0189 9.55589 14.1788 9.13128 14.5707C8.69797 14.9707 8.28242 15.5577 7.88206 16.2696C7.45308 17.0322 7.09983 17.8308 6.7465 18.6295C6.56362 19.043 6.38072 19.4565 6.18729 19.865C6.22215 19.8708 6.25731 19.876 6.2928 19.8808C7.16378 19.9979 8.32182 20 10 20H21C21.5523 20 22 20.4477 22 21C22 21.5523 21.5523 22 21 22H9.928C8.33933 22 7.04616 22.0001 6.0263 21.8629C4.96232 21.7199 4.04736 21.4113 3.31802 20.682C2.58869 19.9526 2.28011 19.0377 2.13706 17.9737C1.99995 16.9539 1.99997 15.6607 2 14.0721L2 3C2 2.44772 2.44772 2 3 2Z" fill="#2E3039"/>
|
||||
<path d="M8 4C8.55229 4 9 3.55228 9 3C9 2.44772 8.55229 2 8 2L7 2C6.44772 2 6 2.44772 6 3C6 3.55228 6.44772 4 7 4L8 4Z" fill="#2E3039"/>
|
||||
<path d="M11 8C11.5523 8 12 7.55228 12 7C12 6.44772 11.5523 6 11 6H7C6.44772 6 6 6.44772 6 7C6 7.55228 6.44772 8 7 8L11 8Z" fill="#2E3039"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@ -1,8 +1,5 @@
|
||||
<svg data-name="Group 8404" height="26" id="Group_8404" viewBox="0 0 26 26"
|
||||
width="26" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect data-name="Rectangle 17531" fill="#69a6e2" height="26" id="Rectangle_17531" rx="4"
|
||||
width="26" />
|
||||
<path d="M2.914,17.807s.731-.005,1.246-.005l3.9.019c.466,0,.854-.488.876-1.193l0-3.213c0-.685.311-1.221.793-1.252l1.2-.009c.483.029.814.572.814,1.253l0,3.231c.021.7.346,1.165.814,1.165l5.254.014.01-3.971c0-.683-.333-1.214-.82-1.245l-2.11-.01c-.467,0-.834-.486-.854-1.191l-.008-1.074c.023-.7.392-1.189.86-1.189l2.122.006c.482-.031.8-.592.8-1.274l.005-4.957a2.126,2.126,0,0,1-.693.69,2.164,2.164,0,0,1-.933.312l-3.569,0c-.465,0-.854.5-.876,1.2V8.295c-.022.7-.387,1.2-.854,1.2l-1.08-.008c-.468,0-.842-.482-.864-1.183l0-3.218c-.021-.705-.392-1.178-.859-1.178l-5.179,0V7.87c0,.684.324,1.231.808,1.263l2.122-.009c.48.031.82.595.82,1.275l-.007.916c0,.683-.328,1.23-.81,1.261l-2.126-.005c-.484.034-.808.572-.808,1.256Z" data-name="Path 5276"
|
||||
fill="#fff"
|
||||
id="Path_5276" transform="translate(2.327 2.327)" />
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="14" height="14" rx="3" fill="#0B85F7"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.6 KiB |
@ -1,8 +1,5 @@
|
||||
<svg data-name="Group 8404" height="26" id="Group_8404" viewBox="0 0 26 26"
|
||||
width="26" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect data-name="Rectangle 17531" fill="#cc2229" height="26" id="Rectangle_17531" rx="4"
|
||||
width="26" />
|
||||
<path d="M2.914,17.807s.731-.005,1.246-.005l3.9.019c.466,0,.854-.488.876-1.193l0-3.213c0-.685.311-1.221.793-1.252l1.2-.009c.483.029.814.572.814,1.253l0,3.231c.021.7.346,1.165.814,1.165l5.254.014.01-3.971c0-.683-.333-1.214-.82-1.245l-2.11-.01c-.467,0-.834-.486-.854-1.191l-.008-1.074c.023-.7.392-1.189.86-1.189l2.122.006c.482-.031.8-.592.8-1.274l.005-4.957a2.126,2.126,0,0,1-.693.69,2.164,2.164,0,0,1-.933.312l-3.569,0c-.465,0-.854.5-.876,1.2V8.295c-.022.7-.387,1.2-.854,1.2l-1.08-.008c-.468,0-.842-.482-.864-1.183l0-3.218c-.021-.705-.392-1.178-.859-1.178l-5.179,0V7.87c0,.684.324,1.231.808,1.263l2.122-.009c.48.031.82.595.82,1.275l-.007.916c0,.683-.328,1.23-.81,1.261l-2.126-.005c-.484.034-.808.572-.808,1.256Z" data-name="Path 5276"
|
||||
fill="#fff"
|
||||
id="Path_5276" transform="translate(2.327 2.327)" />
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="14" height="14" rx="3" fill="#ED1C2B"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,7 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 13C10 12.4477 10.4477 12 11 12L16 12C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14L11 14C10.4477 14 10 13.5523 10 13Z" fill="#2E3039"/>
|
||||
<path d="M7 13C7 12.4477 7.44772 12 8 12H8.00898C8.56127 12 9.00898 12.4477 9.00898 13C9.00898 13.5523 8.56127 14 8.00898 14H8C7.44772 14 7 13.5523 7 13Z" fill="#2E3039"/>
|
||||
<path d="M7 17C7 16.4477 7.44772 16 8 16L13 16C13.5523 16 14 16.4477 14 17C14 17.5523 13.5523 18 13 18L8 18C7.44772 18 7 17.5523 7 17Z" fill="#2E3039"/>
|
||||
<path d="M14.991 17C14.991 16.4477 15.4387 16 15.991 16H16C16.5523 16 17 16.4477 17 17C17 17.5523 16.5523 18 16 18H15.991C15.4387 18 14.991 17.5523 14.991 17Z" fill="#2E3039"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 2C7 1.44772 6.55229 1 6 1C5.44772 1 5 1.44772 5 2V2.44885C4.23882 2.6903 3.57734 3.06994 3.01802 3.6746C2.18949 4.57031 1.83279 5.69272 1.66416 7.04866C1.49997 8.36894 1.49998 10.0541 1.5 12.1739L1.5 12.8261C1.49998 14.9459 1.49997 16.6311 1.66416 17.9513C1.83279 19.3073 2.18949 20.4297 3.01802 21.3254C3.8568 22.2322 4.92535 22.6329 6.21533 22.8204C7.45142 23.0001 9.02292 23 10.9712 23H13.0288C14.977 23 16.5486 23.0001 17.7847 22.8204C19.0747 22.6329 20.1432 22.2322 20.982 21.3254C21.8105 20.4297 22.1672 19.3073 22.3358 17.9513C22.5 16.6311 22.5 14.9459 22.5 12.8261V12.1739C22.5 10.0541 22.5 8.36895 22.3358 7.04866C22.1672 5.69272 21.8105 4.57031 20.982 3.6746C20.4227 3.06993 19.7612 2.6903 19 2.44885V2C19 1.44772 18.5523 1 18 1C17.4477 1 17 1.44772 17 2V2.09173C15.903 1.99995 14.5863 1.99998 13.0288 2L10.9712 2C9.41375 1.99998 8.09705 1.99995 7 2.09173V2ZM3.66385 9.14417C3.8099 9 4.03921 9 4.49783 9L19.5022 9C19.9608 9 20.1901 9 20.3362 9.14417C20.4822 9.28833 20.4851 9.51472 20.491 9.96751C20.4997 10.6407 20.5 11.3942 20.5 12.2432V12.7568C20.5 14.9616 20.4982 16.5221 20.3511 17.7045C20.2067 18.8656 19.9374 19.5094 19.5138 19.9673C19.1004 20.4142 18.5353 20.6903 17.497 20.8412C16.4214 20.9975 14.9957 21 12.95 21H11.05C9.00425 21 7.57858 20.9975 6.503 20.8412C5.4647 20.6903 4.89956 20.4142 4.48622 19.9673C4.06263 19.5094 3.79327 18.8656 3.64887 17.7045C3.50182 16.5221 3.5 14.9616 3.5 12.7568V12.2432C3.5 11.3942 3.50027 10.6407 3.509 9.96751C3.51487 9.51472 3.51781 9.28833 3.66385 9.14417Z" fill="#2E3039"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,8 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3 4C2.44772 4 2 4.44772 2 5C2 5.55228 2.44772 6 3 6L5 6C5.55228 6 6 5.55229 6 5C6 4.44772 5.55228 4 5 4L3 4Z" fill="#2E3039"/>
|
||||
<path d="M9 4C8.44772 4 8 4.44772 8 5C8 5.55228 8.44772 6 9 6L21 6C21.5523 6 22 5.55229 22 5C22 4.44772 21.5523 4 21 4L9 4Z" fill="#2E3039"/>
|
||||
<path d="M8 12C8 11.4477 8.44772 11 9 11L21 11C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13L9 13C8.44772 13 8 12.5523 8 12Z" fill="#2E3039"/>
|
||||
<path d="M3 11C2.44772 11 2 11.4477 2 12C2 12.5523 2.44772 13 3 13H5C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11L3 11Z" fill="#2E3039"/>
|
||||
<path d="M8 19C8 18.4477 8.44772 18 9 18L21 18C21.5523 18 22 18.4477 22 19C22 19.5523 21.5523 20 21 20L9 20C8.44772 20 8 19.5523 8 19Z" fill="#2E3039"/>
|
||||
<path d="M3 18C2.44772 18 2 18.4477 2 19C2 19.5523 2.44772 20 3 20H5C5.55228 20 6 19.5523 6 19C6 18.4477 5.55228 18 5 18H3Z" fill="#2E3039"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 975 B |
@ -0,0 +1,3 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 17.0625C4.5472 17.0625 0.9375 13.4528 0.9375 9C0.9375 4.5472 4.5472 0.9375 9 0.9375C13.4528 0.9375 17.0625 4.5472 17.0625 9C17.0625 13.4528 13.4528 17.0625 9 17.0625ZM9 5.25C9.41421 5.25 9.75 5.58579 9.75 6V9.37499H9.87151C10.0893 9.37492 10.3198 9.37484 10.5016 9.39662C10.6342 9.41249 11.1221 9.47231 11.3472 9.92903C11.5725 10.3861 11.3138 10.7931 11.2436 10.903C11.1469 11.0544 11.0021 11.2289 10.8651 11.3939L10.8416 11.4223C10.626 11.6824 10.3693 11.9784 10.1118 12.2139C9.98322 12.3315 9.83449 12.4526 9.67303 12.5484C9.52334 12.6371 9.28695 12.75 9 12.75C8.71306 12.75 8.47666 12.6371 8.32697 12.5484C8.16551 12.4526 8.01679 12.3315 7.88821 12.2139C7.63072 11.9784 7.37397 11.6824 7.15837 11.4223L7.13486 11.3939C6.99791 11.2289 6.85315 11.0544 6.75644 10.903C6.68621 10.7931 6.42751 10.3861 6.65279 9.92903C6.87788 9.47231 7.36577 9.41249 7.49837 9.39662C7.68024 9.37484 7.9107 9.37492 8.1285 9.37499H8.25L8.25 6C8.25 5.58579 8.58579 5.25 9 5.25Z" fill="#FF9E15"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,3 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.9375 9C0.9375 13.4528 4.54725 17.0625 9 17.0625C13.4528 17.0625 17.0625 13.4528 17.0625 9C17.0625 4.54725 13.4528 0.9375 9 0.9375C4.54725 0.9375 0.9375 4.54725 0.9375 9ZM12.507 6.19724C12.8123 6.47699 12.8325 6.95173 12.5528 7.25698L8.42776 11.757C8.28976 11.9077 8.0955 11.9955 7.8915 12C7.68675 12.0045 7.4895 11.925 7.34475 11.7803L5.46975 9.90527C5.1765 9.61277 5.1765 9.13723 5.46975 8.84473C5.76225 8.55148 6.23776 8.55148 6.53026 8.84473L7.85175 10.1655L11.4472 6.24302C11.727 5.93777 12.2018 5.91749 12.507 6.19724Z" fill="#18C273"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 701 B |
@ -0,0 +1,8 @@
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7 10.75C6.30964 10.75 5.75 11.3096 5.75 12C5.75 12.6904 6.30964 13.25 7 13.25H7.00897C7.69933 13.25 8.25897 12.6904 8.25897 12C8.25897 11.3096 7.69933 10.75 7.00897 10.75H7Z" fill="#2E3039"/>
|
||||
<path d="M10.9955 10.75C10.3052 10.75 9.74551 11.3096 9.74551 12C9.74551 12.6904 10.3052 13.25 10.9955 13.25H11.0045C11.6948 13.25 12.2545 12.6904 12.2545 12C12.2545 11.3096 11.6948 10.75 11.0045 10.75H10.9955Z" fill="#2E3039"/>
|
||||
<path d="M14.991 10.75C14.3007 10.75 13.741 11.3096 13.741 12C13.741 12.6904 14.3007 13.25 14.991 13.25H15C15.6904 13.25 16.25 12.6904 16.25 12C16.25 11.3096 15.6904 10.75 15 10.75H14.991Z" fill="#2E3039"/>
|
||||
<path d="M7 14.75C6.30964 14.75 5.75 15.3096 5.75 16C5.75 16.6904 6.30964 17.25 7 17.25H7.00897C7.69933 17.25 8.25897 16.6904 8.25897 16C8.25897 15.3096 7.69933 14.75 7.00897 14.75H7Z" fill="#2E3039"/>
|
||||
<path d="M10.9955 14.75C10.3052 14.75 9.74551 15.3096 9.74551 16C9.74551 16.6904 10.3052 17.25 10.9955 17.25H11.0045C11.6948 17.25 12.2545 16.6904 12.2545 16C12.2545 15.3096 11.6948 14.75 11.0045 14.75H10.9955Z" fill="#2E3039"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 1C6 0.447715 5.55229 0 5 0C4.44772 0 4 0.447715 4 1V1.44885C3.23882 1.6903 2.57734 2.06994 2.01802 2.6746C1.18949 3.57031 0.83279 4.69272 0.664161 6.04866C0.499967 7.36894 0.499982 9.05406 0.5 11.1739L0.5 11.8261C0.499982 13.9459 0.499967 15.6311 0.664161 16.9513C0.83279 18.3073 1.18949 19.4297 2.01802 20.3254C2.8568 21.2322 3.92535 21.6329 5.21533 21.8204C6.45141 22.0001 8.02291 22 9.97119 22H12.0288C13.977 22 15.5486 22.0001 16.7847 21.8204C18.0747 21.6329 19.1432 21.2322 19.982 20.3254C20.8105 19.4297 21.1672 18.3073 21.3358 16.9513C21.5 15.6311 21.5 13.9459 21.5 11.8261V11.1739C21.5 9.05408 21.5 7.36895 21.3358 6.04866C21.1672 4.69272 20.8105 3.57031 19.982 2.6746C19.4227 2.06993 18.7612 1.6903 18 1.44885V1C18 0.447715 17.5523 0 17 0C16.4477 0 16 0.447715 16 1V1.09173C14.903 0.999955 13.5863 0.999976 12.0288 1L9.97122 1C8.41376 0.999976 7.09704 0.999955 6 1.09173V1ZM3.49783 8C3.03921 8 2.8099 8 2.66385 8.14417C2.51781 8.28833 2.51487 8.51472 2.509 8.96751C2.50027 9.64067 2.5 10.3942 2.5 11.2432V11.7568C2.5 13.9616 2.50182 15.5221 2.64887 16.7045C2.79327 17.8656 3.06263 18.5094 3.48622 18.9673C3.89956 19.4142 4.4647 19.6903 5.503 19.8412C6.57858 19.9975 8.00425 20 10.05 20H11.95C13.9957 20 15.4214 19.9975 16.497 19.8412C17.5353 19.6903 18.1004 19.4142 18.5138 18.9673C18.9374 18.5094 19.2067 17.8656 19.3511 16.7045C19.4982 15.5221 19.5 13.9616 19.5 11.7568V11.2432C19.5 10.3942 19.4997 9.64067 19.491 8.96751C19.4851 8.51472 19.4822 8.28833 19.3362 8.14417C19.1901 8 18.9608 8 18.5022 8L3.49783 8Z" fill="#2E3039"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@ -0,0 +1,7 @@
|
||||
<svg width="21" height="24" viewBox="0 0 21 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="0.5" width="21" height="3" rx="1.5" fill="#18C273"/>
|
||||
<rect y="5.5" width="21" height="3" rx="1.5" fill="#18C273" fill-opacity="0.7"/>
|
||||
<rect y="10.5" width="21" height="3" rx="1.5" fill="#18C273" fill-opacity="0.5"/>
|
||||
<rect y="15.5" width="21" height="3" rx="1.5" fill="#18C273" fill-opacity="0.35"/>
|
||||
<rect y="20.5" width="21" height="3" rx="1.5" fill="#18C273" fill-opacity="0.2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 493 B |
@ -0,0 +1,3 @@
|
||||
<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.55403 0.250001H6.69598C5.50451 0.249979 4.5346 0.249962 3.76973 0.352797C2.97174 0.460084 2.28552 0.691519 1.73852 1.23852C1.19152 1.78552 0.960084 2.47174 0.852797 3.26973C0.749962 4.0346 0.749979 5.00446 0.750001 6.19592V7.80403C0.749979 8.9955 0.749962 9.9654 0.852797 10.7303C0.960084 11.5283 1.19152 12.2145 1.73852 12.7615C2.28552 13.3085 2.97174 13.5399 3.76973 13.6472C4.53462 13.75 5.5045 13.75 6.696 13.75H7.55401C8.74551 13.75 9.71539 13.75 10.4803 13.6472C11.2783 13.5399 11.9645 13.3085 12.5115 12.7615C13.0406 12.2323 13.2745 11.5729 13.3863 10.808C13.7298 11.078 14.0404 11.3056 14.3208 11.4749C14.846 11.7922 15.5117 12.0579 16.1947 11.7194C16.8671 11.386 17.0755 10.7028 17.1622 10.0899C17.2493 9.47366 17.2493 8.64442 17.2493 7.64834V6.35366C17.2493 5.35758 17.2493 4.52834 17.1622 3.91212C17.0755 3.29915 16.8671 2.61597 16.1947 2.28264C15.5117 1.94405 14.846 2.20976 14.3208 2.52707C14.0405 2.69639 13.7299 2.92386 13.3866 3.19378C13.2748 2.42814 13.0411 1.76809 12.5115 1.23852C11.9645 0.691519 11.2783 0.460084 10.4803 0.352797C9.7154 0.249962 8.7455 0.249979 7.55403 0.250001ZM13.4957 5.03688C13.5 5.39712 13.5 5.78326 13.5 6.196V7.80401C13.5 8.2175 13.5 8.6043 13.4957 8.9651C14.2136 9.55664 14.7094 9.95725 15.0964 10.191C15.2999 10.314 15.4227 10.3584 15.4898 10.3717C15.5046 10.3746 15.5147 10.3756 15.5207 10.3759C15.5237 10.376 15.527 10.376 15.527 10.376L15.5285 10.3754C15.5298 10.3748 15.5308 10.3741 15.5316 10.3736C15.5326 10.3729 15.5331 10.3724 15.5331 10.3724C15.5352 10.3702 15.5464 10.3581 15.5624 10.3268C15.5983 10.2567 15.6425 10.1231 15.6769 9.87979C15.7474 9.38156 15.7493 8.66013 15.7493 7.58744V6.41456C15.7493 5.34186 15.7474 4.62044 15.6769 4.12221C15.6425 3.87891 15.5983 3.74533 15.5624 3.67518C15.5464 3.64392 15.5355 3.63212 15.5334 3.6299C15.5334 3.6299 15.5318 3.6282 15.5285 3.62659L15.5274 3.62604C15.5274 3.62604 15.5237 3.62597 15.5207 3.62613C15.5147 3.62643 15.5046 3.62741 15.4898 3.63035C15.4227 3.64362 15.2999 3.68801 15.0964 3.81097C14.7094 4.04475 14.2136 4.44534 13.4957 5.03688ZM7.5 4C7.5 3.58579 7.83579 3.25 8.25 3.25L9.75 3.25C10.1642 3.25 10.5 3.58579 10.5 4C10.5 4.41422 10.1642 4.75 9.75 4.75L8.25 4.75C7.83579 4.75 7.5 4.41422 7.5 4Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,4 @@
|
||||
<svg width="8" height="13" viewBox="0 0 8 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.99992 0.228516C2.7918 0.228516 1.81242 1.20789 1.81242 2.41602C1.81242 3.04229 2.13626 3.65197 2.52655 4.09024C2.72604 4.31425 2.95689 4.50994 3.19989 4.65217C3.43884 4.79203 3.71565 4.89518 3.99992 4.89518C4.28419 4.89518 4.56099 4.79203 4.79995 4.65217C5.04295 4.50994 5.2738 4.31425 5.47329 4.09024C5.86358 3.65197 6.18742 3.04229 6.18742 2.41602C6.18742 1.20789 5.20804 0.228516 3.99992 0.228516Z" fill="#2E3039"/>
|
||||
<path d="M1.61723 4.36783C1.63636 4.38209 1.65653 4.40812 1.69687 4.46017C1.75478 4.53488 1.8138 4.6057 1.8731 4.67228C2.12459 4.95469 2.42491 5.21256 2.7579 5.40745C3.07856 5.59513 3.50915 5.77031 3.99992 5.77031C4.49069 5.77031 4.92128 5.59513 5.24194 5.40745C5.57493 5.21256 5.87525 4.95469 6.12674 4.67228C6.18603 4.60571 6.24504 4.5349 6.30294 4.4602C6.3434 4.408 6.36363 4.3819 6.38283 4.36761C6.4397 4.3253 6.51163 4.32078 6.57335 4.35564C6.59419 4.36741 6.61516 4.38841 6.6571 4.4304C7.62953 5.28979 8.31909 6.79331 7.70799 8.24712C7.52984 8.67092 7.11767 8.95186 6.65499 8.95186L6.49354 8.95055C6.3607 8.94948 6.29428 8.94894 6.24626 8.9863C6.19823 9.02366 6.18241 9.08817 6.15078 9.21719L5.58834 11.511C5.40816 12.2458 4.75708 12.7704 4.00002 12.7704C3.24297 12.7704 2.59188 12.2458 2.41171 11.511L1.84927 9.21719C1.81763 9.08817 1.80181 9.02366 1.75379 8.9863C1.70576 8.94894 1.63934 8.94948 1.5065 8.95055L1.34506 8.95186C0.882379 8.95186 0.470201 8.67092 0.292058 8.24712C-0.319046 6.7933 0.370548 5.28979 1.34297 4.43041C1.38478 4.38854 1.40569 4.3676 1.42646 4.35585C1.48825 4.32088 1.5603 4.32541 1.61723 4.36783Z" fill="#2E3039"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,33 @@
|
||||
class GetLiveCareClinicsResponseModel {
|
||||
int? clinicID;
|
||||
int? serviceID;
|
||||
int? projectID;
|
||||
String? clinicDesc;
|
||||
String? clinicDescN;
|
||||
String? projectDesc;
|
||||
String? projectDescN;
|
||||
|
||||
GetLiveCareClinicsResponseModel({this.clinicID, this.serviceID, this.projectID, this.clinicDesc, this.clinicDescN, this.projectDesc, this.projectDescN});
|
||||
|
||||
GetLiveCareClinicsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
clinicID = json['ClinicID'];
|
||||
serviceID = json['ServiceID'];
|
||||
projectID = json['ProjectID'];
|
||||
clinicDesc = json['ClinicDesc'] ?? "LiveCare Clinic";
|
||||
clinicDescN = json['ClinicDescN'];
|
||||
projectDesc = json['ProjectDesc'];
|
||||
projectDescN = json['ProjectDescN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ServiceID'] = this.serviceID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ClinicDesc'] = this.clinicDesc;
|
||||
data['ClinicDescN'] = this.clinicDescN;
|
||||
data['ProjectDesc'] = this.projectDesc;
|
||||
data['ProjectDescN'] = this.projectDescN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LabHistoryViewModel extends ChangeNotifier{
|
||||
bool isGraphShowing = false;
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/models/Range.dart';
|
||||
|
||||
class LabRangeViewModel extends ChangeNotifier {
|
||||
List months = [
|
||||
'Jan',
|
||||
'Feb',
|
||||
'Mar',
|
||||
'April',
|
||||
'May',
|
||||
'Jun',
|
||||
'July',
|
||||
'Aug',
|
||||
'Sep',
|
||||
'Oct',
|
||||
'Nov',
|
||||
'Dec'
|
||||
];
|
||||
bool isGraphVisible = true;
|
||||
Range? _currentlySelectedRange;
|
||||
|
||||
Range? get currentlySelectedRange => _currentlySelectedRange;
|
||||
|
||||
set currentlySelectedRange(Range? value) {
|
||||
_currentlySelectedRange = value;
|
||||
notifyListeners();
|
||||
|
||||
}
|
||||
|
||||
DateTime? _toDate;
|
||||
|
||||
DateTime? get toDate => _toDate;
|
||||
|
||||
set toDate(DateTime? value) {
|
||||
_toDate = value;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
DateTime? _fromDate;
|
||||
|
||||
DateTime? get fromDate => _fromDate;
|
||||
|
||||
set fromDate(DateTime? value) {
|
||||
_fromDate = value;
|
||||
notifyListeners();
|
||||
|
||||
}
|
||||
|
||||
LabRangeViewModel();
|
||||
|
||||
get getCurrentYear => DateTime.now().year;
|
||||
|
||||
calculateDatesFromRange() {
|
||||
_toDate = DateTime.now();
|
||||
switch (_currentlySelectedRange) {
|
||||
case Range.WEEKLY:
|
||||
_fromDate = _toDate!.subtract(Duration(days: 7));
|
||||
case Range.LAST_MONTH:
|
||||
_fromDate = _toDate!.subtract(Duration(days: 30));
|
||||
case Range.LAST_6MONTH:
|
||||
_fromDate = _toDate!.subtract(Duration(days: (30 * 6)));
|
||||
case Range.THIS_YEAR:
|
||||
_toDate = DateTime(_toDate!.year, DateTime.december, 31);
|
||||
_fromDate = DateTime(_toDate!.year, DateTime.january, 01);
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
getDateString(DateTime? date){
|
||||
if(date == null) return "-";
|
||||
|
||||
String year = date.year.toString().substring(2);
|
||||
return '${date.day} ${months[date.month-1]},$year';
|
||||
}
|
||||
|
||||
flush(){
|
||||
toDate = null;
|
||||
fromDate = null;
|
||||
currentlySelectedRange = null;
|
||||
isGraphVisible = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
resetCurrentlySelectedRange(){
|
||||
currentlySelectedRange = null;
|
||||
}
|
||||
|
||||
alterGraphVisibility(){
|
||||
isGraphVisible = !isGraphVisible;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
enum Range{
|
||||
WEEKLY,
|
||||
LAST_MONTH,
|
||||
LAST_6MONTH,
|
||||
THIS_YEAR,
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
class LabResult {
|
||||
String? description;
|
||||
dynamic femaleInterpretativeData;
|
||||
int? gender;
|
||||
int? lineItemNo;
|
||||
dynamic maleInterpretativeData;
|
||||
dynamic notes;
|
||||
String? packageID;
|
||||
int? patientID;
|
||||
String? projectID;
|
||||
String? referanceRange;
|
||||
String? resultValue;
|
||||
String? sampleCollectedOn;
|
||||
String? sampleReceivedOn;
|
||||
String? setupID;
|
||||
dynamic superVerifiedOn;
|
||||
String? testCode;
|
||||
String? uOM;
|
||||
String? verifiedOn;
|
||||
String? verifiedOnDateTime;
|
||||
String? changeResult;
|
||||
String? calculatedResultFlag;
|
||||
String? criticalHigh;
|
||||
String? referenceHigh;
|
||||
String? criticalLow;
|
||||
String? referenceLow;
|
||||
|
||||
LabResult(
|
||||
{this.description,
|
||||
this.femaleInterpretativeData,
|
||||
this.gender,
|
||||
this.lineItemNo,
|
||||
this.maleInterpretativeData,
|
||||
this.notes,
|
||||
this.packageID,
|
||||
this.patientID,
|
||||
this.projectID,
|
||||
this.referanceRange,
|
||||
this.resultValue,
|
||||
this.sampleCollectedOn,
|
||||
this.sampleReceivedOn,
|
||||
this.setupID,
|
||||
this.superVerifiedOn,
|
||||
this.testCode,
|
||||
this.uOM,
|
||||
this.verifiedOn,
|
||||
this.calculatedResultFlag,
|
||||
this.verifiedOnDateTime,
|
||||
this.criticalHigh,
|
||||
this.referenceHigh,
|
||||
this.criticalLow,
|
||||
this.referenceLow,
|
||||
});
|
||||
|
||||
LabResult.fromJson(Map<String, dynamic> json) {
|
||||
description = json['Description'];
|
||||
femaleInterpretativeData = json['FemaleInterpretativeData'];
|
||||
gender = json['Gender'];
|
||||
lineItemNo = json['LineItemNo'];
|
||||
maleInterpretativeData = json['MaleInterpretativeData'];
|
||||
notes = json['Notes'];
|
||||
packageID = json['PackageID'];
|
||||
patientID = json['PatientID'];
|
||||
projectID = json['ProjectID'];
|
||||
referanceRange = json['ReferanceRange'];
|
||||
resultValue = json['ResultValue'];
|
||||
sampleCollectedOn = json['SampleCollectedOn'];
|
||||
sampleReceivedOn = json['SampleReceivedOn'];
|
||||
setupID = json['SetupID'];
|
||||
superVerifiedOn = json['SuperVerifiedOn'];
|
||||
testCode = json['TestCode'];
|
||||
uOM = json['UOM'];
|
||||
verifiedOn = json['VerifiedOn'];
|
||||
verifiedOnDateTime = json['VerifiedOnDateTime'];
|
||||
changeResult = json['ChangeResult'];
|
||||
calculatedResultFlag = json['CalculatedResultFlag'];
|
||||
criticalHigh = json['CriticalHigh'];
|
||||
referenceHigh = json['ReferenceHigh'];
|
||||
criticalLow = json['CriticalLow'];
|
||||
referenceLow = json['ReferenceLow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Description'] = this.description;
|
||||
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
|
||||
data['Gender'] = this.gender;
|
||||
data['LineItemNo'] = this.lineItemNo;
|
||||
data['MaleInterpretativeData'] = this.maleInterpretativeData;
|
||||
data['Notes'] = this.notes;
|
||||
data['PackageID'] = this.packageID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ReferanceRange'] = this.referanceRange;
|
||||
data['ResultValue'] = this.resultValue;
|
||||
data['SampleCollectedOn'] = this.sampleCollectedOn;
|
||||
data['SampleReceivedOn'] = this.sampleReceivedOn;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['SuperVerifiedOn'] = this.superVerifiedOn;
|
||||
data['TestCode'] = this.testCode;
|
||||
data['UOM'] = this.uOM;
|
||||
data['VerifiedOn'] = this.verifiedOn;
|
||||
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
|
||||
data['ChangeResult'] = this.changeResult;
|
||||
data['CriticalHigh'] = this.criticalHigh;
|
||||
data['ReferenceHigh'] = this.referenceHigh;
|
||||
data['CriticalLow'] = this.criticalLow;
|
||||
data['ReferenceLow'] = this.referenceLow;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LabOrderResult(flag: $calculatedResultFlag, value: $resultValue, verifiedOn: $verifiedOnDateTime)';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,336 @@
|
||||
import 'dart:async';
|
||||
|
||||
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_export.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/lab/lab_range_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/models/Range.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/chip/app_custom_chip_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:syncfusion_flutter_calendar/calendar.dart';
|
||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||
|
||||
typedef OnRangeSelected = void Function(DateTime? start, DateTime? end);
|
||||
|
||||
class LabResultCalender extends StatefulWidget {
|
||||
final OnRangeSelected onRangeSelected;
|
||||
|
||||
const LabResultCalender({super.key, required this.onRangeSelected});
|
||||
|
||||
@override
|
||||
State<LabResultCalender> createState() => _LabResultCalenderState();
|
||||
}
|
||||
|
||||
class _LabResultCalenderState extends State<LabResultCalender> {
|
||||
late DateRangePickerController _calendarController;
|
||||
DateTime? start;
|
||||
DateTime? end;
|
||||
late LabRangeViewModel model;
|
||||
@override
|
||||
void initState() {
|
||||
_calendarController = DateRangePickerController();
|
||||
scheduleMicrotask(() {
|
||||
_calendarController.selectedRange = PickerDateRange(model.fromDate,model.toDate);
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
model = Provider.of<LabRangeViewModel>(context);
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 0.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Consumer<LabRangeViewModel>(
|
||||
builder: (_, model, __) => selectionChip(model),
|
||||
).paddingOnly(bottom: 16.h),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.h,
|
||||
hasShadow: false,
|
||||
),
|
||||
padding: EdgeInsets.all(
|
||||
16.h
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
fromDateComponent(),
|
||||
Text(
|
||||
"to".needTranslation,
|
||||
style: TextStyle(
|
||||
color: AppColors.calenderTextColor,
|
||||
fontSize: 14.h,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: -.2
|
||||
),
|
||||
).paddingSymmetrical(24.h,0.h),
|
||||
toDateComponent(),
|
||||
],
|
||||
),
|
||||
Divider(
|
||||
color: AppColors.spacerLineColor,
|
||||
thickness: 1,
|
||||
).paddingOnly(bottom: 16.h, top: 16.h),
|
||||
Material(
|
||||
color: Colors.white,
|
||||
child: SfDateRangePicker(
|
||||
controller: _calendarController,
|
||||
selectionMode: DateRangePickerSelectionMode.range,
|
||||
showNavigationArrow: true,
|
||||
headerHeight: 40.h,
|
||||
backgroundColor: Colors.white,
|
||||
headerStyle: DateRangePickerHeaderStyle(
|
||||
backgroundColor: Colors.white,
|
||||
textAlign: TextAlign.start,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 18.fSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
color: AppColors.primaryRedColor,
|
||||
fontFamily: "Poppins",
|
||||
),
|
||||
),
|
||||
monthViewSettings: DateRangePickerMonthViewSettings(
|
||||
viewHeaderStyle: DateRangePickerViewHeaderStyle(
|
||||
backgroundColor: Colors.white,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 14.fSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
color: AppColors.textColor,
|
||||
),
|
||||
),
|
||||
showTrailingAndLeadingDates: false,
|
||||
dayFormat: "EEE",
|
||||
),
|
||||
selectionShape: DateRangePickerSelectionShape.rectangle,
|
||||
selectionRadius: 12.h,
|
||||
selectionColor: AppColors.transparent,
|
||||
startRangeSelectionColor: AppColors.primaryRedColor,
|
||||
endRangeSelectionColor: AppColors.primaryRedColor,
|
||||
rangeSelectionColor:
|
||||
AppColors.primaryRedColor.withOpacity(0.1),
|
||||
todayHighlightColor: Colors.transparent,
|
||||
monthCellStyle: DateRangePickerMonthCellStyle(
|
||||
textStyle: TextStyle(
|
||||
fontSize: 12.fSize,
|
||||
color: AppColors.textColor,
|
||||
),
|
||||
todayTextStyle: TextStyle(
|
||||
color: AppColors.textColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
onSelectionChanged:
|
||||
(DateRangePickerSelectionChangedArgs args) {
|
||||
if (args.value is PickerDateRange) {
|
||||
final PickerDateRange range = args.value;
|
||||
start = range.startDate;
|
||||
end = range.endDate;
|
||||
model.fromDate = start;
|
||||
model.toDate = end;
|
||||
model.resetCurrentlySelectedRange();
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Consumer<LabRangeViewModel>(
|
||||
builder: (_, model, __) => Visibility(
|
||||
visible: (model.fromDate != null || model.toDate != null),
|
||||
child: Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CustomButton(
|
||||
text: LocaleKeys.cancel.tr(),
|
||||
onPressed: () {
|
||||
_calendarController.selectedRange = null;
|
||||
_calendarController.selectedDate = null;
|
||||
model.flush();
|
||||
},
|
||||
backgroundColor: AppColors.secondaryLightRedColor,
|
||||
borderColor: AppColors.secondaryLightRedColor,
|
||||
textColor: AppColors.primaryRedColor,
|
||||
icon: AppAssets.cancel,
|
||||
iconColor: AppColors.primaryRedColor,
|
||||
height: 56.h,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.h,)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: CustomButton(
|
||||
text: LocaleKeys.search.tr(),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
widget.onRangeSelected(model.fromDate, model.toDate);
|
||||
},
|
||||
backgroundColor: AppColors.lightGreenButtonColor,
|
||||
borderColor: Colors.transparent,
|
||||
textColor: AppColors.textGreenColor,
|
||||
icon: AppAssets.reminder_bell,
|
||||
iconColor: AppColors.textGreenColor,
|
||||
|
||||
height: 56.h,
|
||||
),
|
||||
),
|
||||
],
|
||||
).paddingOnly(top: 24.h),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
fromDateComponent() {
|
||||
return Consumer<LabRangeViewModel>(
|
||||
builder: (_, model, __) {
|
||||
return displayDate("Start Date".needTranslation,
|
||||
model.getDateString(model.fromDate), model.fromDate == null);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
toDateComponent() {
|
||||
return Consumer<LabRangeViewModel>(
|
||||
builder: (_, model, __) {
|
||||
return displayDate("End Date".needTranslation,
|
||||
model.getDateString(model.toDate), model.toDate == null);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
displayDate(String label, String? date, bool isNotSelected) => Expanded(
|
||||
child: Row(
|
||||
spacing: 12.h,
|
||||
children: [
|
||||
Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.rangeCalendar,
|
||||
iconColor: isNotSelected ? AppColors.borderOnlyColor: AppColors.blackColor ,
|
||||
height: 24,
|
||||
width: 24),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: AppColors.inputLabelTextColor,
|
||||
fontSize: 12.h,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
date!,
|
||||
style: TextStyle(
|
||||
color: AppColors.textColor,
|
||||
fontSize: 14.h,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
selectionChip(LabRangeViewModel model) {
|
||||
return Row(
|
||||
spacing: 8.h,
|
||||
children: [
|
||||
AppCustomChipWidget(
|
||||
labelText: "This Week".needTranslation,
|
||||
backgroundColor: model.currentlySelectedRange == Range.WEEKLY
|
||||
? AppColors.primaryRedColor.withOpacity(0.1)
|
||||
: AppColors.whiteColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: model.currentlySelectedRange == Range.WEEKLY
|
||||
? AppColors.primaryRedBorderColor
|
||||
: AppColors.chipBorderColorOpacity20,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
).onPress((){
|
||||
_calendarController.selectedRange = null;
|
||||
model.currentlySelectedRange = Range.WEEKLY;
|
||||
model.calculateDatesFromRange();
|
||||
}),
|
||||
AppCustomChipWidget(
|
||||
labelText: "Last Month".needTranslation,
|
||||
backgroundColor: model.currentlySelectedRange == Range.LAST_MONTH
|
||||
? AppColors.primaryRedColor.withOpacity(0.1)
|
||||
: AppColors.whiteColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: model.currentlySelectedRange == Range.LAST_MONTH
|
||||
? AppColors.primaryRedBorderColor
|
||||
: AppColors.chipBorderColorOpacity20,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
).onPress((){
|
||||
_calendarController.selectedRange = null;
|
||||
model.currentlySelectedRange = Range.LAST_MONTH;
|
||||
model.calculateDatesFromRange();
|
||||
}),
|
||||
AppCustomChipWidget(
|
||||
labelText: "Last 6 Months".needTranslation,
|
||||
backgroundColor: model.currentlySelectedRange == Range.LAST_6MONTH
|
||||
? AppColors.primaryRedColor.withOpacity(0.1)
|
||||
: AppColors.whiteColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: model.currentlySelectedRange == Range.LAST_6MONTH
|
||||
? AppColors.primaryRedBorderColor
|
||||
: AppColors.chipBorderColorOpacity20,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
).onPress((){
|
||||
_calendarController.selectedRange = null;
|
||||
model.currentlySelectedRange = Range.LAST_6MONTH;
|
||||
model.calculateDatesFromRange();
|
||||
}),
|
||||
AppCustomChipWidget(
|
||||
labelText: "Year ${model.getCurrentYear}",
|
||||
backgroundColor: model.currentlySelectedRange == Range.THIS_YEAR
|
||||
? AppColors.primaryRedColor.withOpacity(0.1)
|
||||
: AppColors.whiteColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: model.currentlySelectedRange == Range.THIS_YEAR
|
||||
? AppColors.primaryRedBorderColor
|
||||
: AppColors.chipBorderColorOpacity20,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
).onPress((){
|
||||
_calendarController.selectedRange = null;
|
||||
model.currentlySelectedRange = Range.THIS_YEAR;
|
||||
model.calculateDatesFromRange();
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,320 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:dartz/dartz.dart';
|
||||
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/common_models/data_points.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/lab/history/lab_history_viewmodel.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/lab_range_view_model.dart' show LabRangeViewModel;
|
||||
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/models/resp_models/lab_result.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/lab/lab_results/lab_result_calender.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/lab/lab_results/lab_result_list_item.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors;
|
||||
import 'package:hmg_patient_app_new/widgets/graph/custom_graph.dart';
|
||||
import 'package:provider/provider.dart' show Consumer, Provider;
|
||||
|
||||
import '../../../widgets/common_bottom_sheet.dart'
|
||||
show showCommonBottomSheetWithoutHeight;
|
||||
import '../../book_appointment/widgets/appointment_calendar.dart'
|
||||
show AppointmentCalendar;
|
||||
|
||||
class LabResultDetails extends StatelessWidget {
|
||||
final LabResult recentLabResult;
|
||||
|
||||
// final List<DataPoint> graphPoint;
|
||||
late LabViewModel model;
|
||||
|
||||
LabResultDetails({super.key, required this.recentLabResult});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
model = Provider.of<LabViewModel>(context, listen: false);
|
||||
return CollapsingListView(
|
||||
title: 'Lab Result Details'.needTranslation,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
spacing: 16.h,
|
||||
children: [LabNameAndStatus, LabGraph(context)],
|
||||
).paddingAll(24.h),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget get LabNameAndStatus => Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.h,
|
||||
hasShadow: true,
|
||||
),
|
||||
padding: EdgeInsets.all(16.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 8.h,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
recentLabResult.testCode ?? "",
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontFamily: 'Poppins',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.textColor,
|
||||
letterSpacing: -2),
|
||||
),
|
||||
Text(
|
||||
"Result of ${recentLabResult.verifiedOn ?? ""}".needTranslation,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Poppins',
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.greyTextColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
//todo change the text color according to the provided test values
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
spacing: 4.h,
|
||||
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
recentLabResult.resultValue ?? "",
|
||||
style: TextStyle(
|
||||
fontSize: 24.fSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Poppins',
|
||||
color: model.getColor(
|
||||
recentLabResult.calculatedResultFlag ?? "",
|
||||
),
|
||||
letterSpacing: -2,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis, // prevent overflow
|
||||
maxLines: 1,
|
||||
softWrap: false,
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: recentLabResult.referanceRange != null,
|
||||
child: Text(
|
||||
"(Reference range ${recentLabResult.referanceRange})".needTranslation,
|
||||
style: TextStyle(
|
||||
fontSize: 12.fSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontFamily: 'Poppins',
|
||||
color: AppColors.greyTextColor,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
softWrap: false,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.lab_result_indicator,
|
||||
width: 21,
|
||||
height: 23,
|
||||
iconColor: model.getColor(
|
||||
recentLabResult.calculatedResultFlag ?? "",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
],
|
||||
));
|
||||
|
||||
Widget LabGraph(BuildContext context) => Consumer<LabRangeViewModel>(
|
||||
builder: (_, model, ___) => Consumer<LabViewModel>(
|
||||
builder: (_, labmodel, ___) => Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.h,
|
||||
hasShadow: true,
|
||||
),
|
||||
height: 260.h,
|
||||
padding: EdgeInsets.all(16.h),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
//title and filter icon
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
model.isGraphVisible?"History FlowChart".needTranslation: "History".needTranslation,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Poppins',
|
||||
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.textColor,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
spacing: 16.h,
|
||||
children: [
|
||||
//todo handle when the graph icon is being displayed
|
||||
Utils.buildSvgWithAssets(
|
||||
icon: model.isGraphVisible?AppAssets.ic_list:AppAssets.ic_graph,
|
||||
width: 24,
|
||||
height: 24)
|
||||
.onPress(() {
|
||||
model.alterGraphVisibility();
|
||||
}),
|
||||
Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.ic_date_filter,
|
||||
width: 24,
|
||||
height: 24)
|
||||
.onPress(() {
|
||||
showCommonBottomSheetWithoutHeight(
|
||||
title: "Set The Date Range".needTranslation,
|
||||
context,
|
||||
child: LabResultCalender(
|
||||
onRangeSelected: (start, end) {
|
||||
|
||||
// if (start != null) {
|
||||
labmodel.getSelectedDateRange(start, end);
|
||||
// }
|
||||
},
|
||||
),
|
||||
isFullScreen: false,
|
||||
isCloseButtonVisible: true,
|
||||
callBackFunc: () {},
|
||||
);
|
||||
}),
|
||||
],
|
||||
)
|
||||
],
|
||||
).paddingOnly(bottom: model.isGraphVisible? 16.h :24.h),
|
||||
historyBody(model, labmodel)
|
||||
],
|
||||
)),
|
||||
));
|
||||
|
||||
Widget leftLabels(String value) {
|
||||
return Text(
|
||||
value,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 8.fSize,
|
||||
color: AppColors.textColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildBottomLabel(String label) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top:8.0),
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 8.fSize,
|
||||
fontFamily: 'Poppins',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.labelTextColor),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget historyBody(LabRangeViewModel model, LabViewModel labmodel) {
|
||||
if(model.isGraphVisible){
|
||||
var graphColor = labmodel.getColor(recentLabResult.calculatedResultFlag??"N");
|
||||
return CustomGraph(
|
||||
dataPoints: labmodel.filteredGraphValues,
|
||||
// maxY: 100,
|
||||
makeGraphBasedOnActualValue: true,
|
||||
leftLabelReservedSize: 40,
|
||||
leftLabelInterval: getInterval(labmodel),
|
||||
maxY: (labmodel.maxY)+(getInterval(labmodel)??0)/2,
|
||||
|
||||
leftLabelFormatter: (value) {
|
||||
return leftLabels(value.toStringAsFixed(2).tr());
|
||||
// switch (value.toInt()) {
|
||||
// case 10:
|
||||
// return leftLabels("Critical Low".needTranslation);
|
||||
// case 30:
|
||||
// return leftLabels("Low".needTranslation);
|
||||
// case 50:
|
||||
// return leftLabels("Normal".needTranslation);
|
||||
// case 70:
|
||||
// return leftLabels("High".needTranslation);
|
||||
// case 90:
|
||||
// return leftLabels(
|
||||
// "Critical High".needTranslation);
|
||||
// default:
|
||||
// return SizedBox.shrink();
|
||||
// }
|
||||
},
|
||||
graphColor:graphColor ,
|
||||
graphShadowColor: graphColor.withOpacity(.4),
|
||||
graphGridColor: graphColor.withOpacity(.4),
|
||||
bottomLabelFormatter: (value, data) {
|
||||
if(data.isEmpty) return SizedBox.shrink();
|
||||
if (value == 0) {
|
||||
return buildBottomLabel(data[value.toInt()].label);
|
||||
}
|
||||
if (value == data.length - 1) {
|
||||
return buildBottomLabel(data[value.toInt()].label);
|
||||
}
|
||||
if (value == ((data.length - 1) / 2)) {
|
||||
return buildBottomLabel(data[value.toInt()].label);
|
||||
}
|
||||
return SizedBox.shrink();
|
||||
},
|
||||
minX:(labmodel.filteredGraphValues.length == 1)?null : -.2,
|
||||
scrollDirection: Axis.horizontal,
|
||||
height: 180.h);
|
||||
}else {
|
||||
return labHistoryList(model, labmodel);
|
||||
}
|
||||
}
|
||||
|
||||
Widget labHistoryList(LabRangeViewModel model, LabViewModel labmodel) {
|
||||
return SizedBox(
|
||||
height: 180.h,
|
||||
child: ListView.separated(
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: labmodel.filteredGraphValues.length,itemBuilder: (context, index){
|
||||
var data = labmodel.filteredGraphValues.reversed.toList()[index];
|
||||
return LabHistoryItem(
|
||||
dayNameAndDate: labmodel.getFormattedDate(data.time),
|
||||
result: data.actualValue,
|
||||
assetUrl: labmodel.getAssetUrlWRTResult(data.referenceValue),
|
||||
shouldRotateIcon: labmodel.getRotationWRTResult(data.referenceValue),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, __) => Divider(
|
||||
color: AppColors.spacerLineColor,
|
||||
thickness: 1.h,
|
||||
).paddingOnly(top: 4.h, bottom: 4.h),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
double? getInterval(LabViewModel labmodel) {
|
||||
var maxX = labmodel.maxY;
|
||||
if(maxX >1 && maxX < 5) return 1;
|
||||
if(maxX >5 && maxX < 10) return 5;
|
||||
if(maxX >10 && maxX < 50) return 10;
|
||||
if(maxX >50 && maxX < 100) return 20;
|
||||
if(maxX >100 && maxX < 200) return 30;
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
import 'package:flutter/material.dart' ;
|
||||
import 'package:flutter/src/widgets/framework.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_export.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
|
||||
class LabHistoryItem extends StatelessWidget{
|
||||
|
||||
final String dayNameAndDate;
|
||||
final String result;
|
||||
final String assetUrl;
|
||||
final bool shouldRotateIcon;
|
||||
|
||||
const LabHistoryItem({super.key, required this.dayNameAndDate, required this.result, required this.assetUrl, this.shouldRotateIcon = false});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
dayNameAndDate,
|
||||
style: TextStyle(
|
||||
fontSize: 14.fSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontFamily: 'Poppins',
|
||||
color: AppColors.labelTextColor
|
||||
),
|
||||
),
|
||||
Text(
|
||||
result,
|
||||
style: TextStyle(
|
||||
fontSize: 18.fSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Poppins',
|
||||
color: AppColors.textColor
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Transform.flip(
|
||||
flipY: shouldRotateIcon,
|
||||
child: Utils.buildSvgWithAssets(icon: assetUrl,height: 18, width: 18)
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
}
|
||||