watch integration ui added.

calender_package
tahaalam 1 month ago
parent a6344d6a81
commit d137e1166d

@ -0,0 +1,6 @@
<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="#0B85F7"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.2743 13.4324L23.9575 13.9486C24.351 14.2459 24.7161 14.5217 24.975 14.784C25.2585 15.0713 25.5387 15.4636 25.5387 16.0028C25.5387 16.542 25.2585 16.9343 24.975 17.2216C24.7161 17.4839 24.351 17.7597 23.9575 18.057L21.3817 20.0034L23.9575 21.9498C24.351 22.2471 24.7161 22.5229 24.975 22.7852C25.2585 23.0726 25.5387 23.4648 25.5387 24.004C25.5387 24.5432 25.2585 24.9355 24.975 25.2228C24.7161 25.4851 24.351 25.7609 23.9575 26.0582L23.2743 26.5745C22.7022 27.0068 22.1995 27.3868 21.7763 27.6186C21.3462 27.8541 20.7396 28.082 20.1123 27.766C19.4877 27.4513 19.3065 26.8305 19.2358 26.345C19.166 25.8658 19.1661 25.2334 19.1662 24.5121L19.1662 21.6777L15.2078 24.6689C14.8406 24.9464 14.318 24.8736 14.0405 24.5064C13.763 24.1393 13.8358 23.6166 14.203 23.3392L18.6173 20.0034L14.203 16.6677C13.8358 16.3902 13.763 15.8676 14.0405 15.5004C14.318 15.1332 14.8406 15.0605 15.2078 15.338L19.1662 18.3292L19.1662 15.4947C19.1661 14.7735 19.166 14.141 19.2358 13.6619C19.3065 13.1764 19.4877 12.5555 20.1123 12.2409C20.7396 11.9248 21.3462 12.1528 21.7763 12.3883C22.1995 12.62 22.7022 13 23.2743 13.4324ZM20.8328 22.0125C20.8328 21.7542 20.8939 21.7238 21.1 21.8795L22.9088 23.2464C22.9773 23.2981 23.0475 23.3494 23.1183 23.401C23.3302 23.5556 23.5466 23.7136 23.7318 23.8966C23.8298 23.9934 23.8298 24.0146 23.7318 24.1114C23.5466 24.2945 23.3302 24.4524 23.1183 24.607C23.0475 24.6587 22.9773 24.7099 22.9088 24.7616L22.3206 25.2061C22.2186 25.2832 22.1131 25.3659 22.005 25.4505C21.7062 25.6846 21.3876 25.9343 21.0677 26.125C20.885 26.2339 20.8327 26.1958 20.8327 25.9859L20.8328 22.0125ZM21.1 18.1273C20.8939 18.2831 20.8328 18.2527 20.8328 17.9943L20.8327 14.0683C20.8327 13.8237 20.8908 13.7927 21.0925 13.9315C21.4296 14.1634 22.0109 14.5667 22.3206 14.8007L22.9088 15.2452C22.9772 15.2969 23.0475 15.3482 23.1182 15.3998C23.3301 15.5544 23.5466 15.7123 23.7318 15.8954C23.8298 15.9922 23.8298 16.0134 23.7318 16.1102C23.5466 16.2933 23.3302 16.4512 23.1183 16.6058C23.0475 16.6574 22.9773 16.7087 22.9088 16.7604L21.1 18.1273Z" fill="white"/>
<path d="M24.9999 20.0026C24.9999 19.5424 25.3713 19.1693 25.8295 19.1693H25.837C26.2952 19.1693 26.6666 19.5424 26.6666 20.0026C26.6666 20.4628 26.2952 20.8359 25.837 20.8359H25.8295C25.3713 20.8359 24.9999 20.4628 24.9999 20.0026Z" fill="white"/>
<path d="M14.1629 19.1693C13.7047 19.1693 13.3333 19.5424 13.3333 20.0026C13.3333 20.4628 13.7047 20.8359 14.1629 20.8359H14.1703C14.6285 20.8359 14.9999 20.4628 14.9999 20.0026C14.9999 19.5424 14.6285 19.1693 14.1703 19.1693H14.1629Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.7 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 d="M8.59383 1.11189C8.74419 0.954165 8.97212 0.897474 9.17885 0.966384C11.5824 1.76758 13.7863 3.79724 14.9435 6.12945C16.1907 8.48889 16.237 11.1216 15.2416 13.2249C14.2387 15.344 12.193 16.8897 9.36327 17.0615C9.35192 17.0622 9.34056 17.0625 9.32919 17.0625C2.03061 17.0625 -0.541949 8.37522 5.21547 4.37907C5.38744 4.25971 5.61147 4.24572 5.79696 4.34276C5.98245 4.43981 6.0987 4.63183 6.0987 4.84117C6.0987 5.56151 6.1749 6.07698 6.2867 6.42883C6.39975 6.78462 6.53247 6.92354 6.60852 6.9729C6.66642 7.01048 6.74359 7.03168 6.88312 6.98726C7.03735 6.93815 7.24136 6.81277 7.46854 6.5839C7.92091 6.12814 8.35983 5.3671 8.58869 4.47155C8.8162 3.58128 8.82489 2.60277 8.47644 1.70319C8.39773 1.49999 8.44347 1.26961 8.59383 1.11189Z" fill="#18C273"/>
</svg>

After

Width:  |  Height:  |  Size: 861 B

@ -0,0 +1,4 @@
<svg width="78" height="78" viewBox="0 0 78 78" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M76.4788 48.5219C81.7373 27.8239 69.2209 6.7813 48.5227 1.52193C27.8244 -3.73744 6.78231 8.77805 1.5238 29.4761C-3.7347 50.1741 8.78169 71.2167 29.4799 76.4761C50.1782 81.7354 71.2203 69.2199 76.4788 48.5219ZM22.1364 34.7137C24.5028 25.3996 33.9717 19.7676 43.2859 22.1343C52.6001 24.501 58.2325 33.9702 55.8662 43.2843C53.4999 52.5984 44.0309 58.2304 34.7167 55.8637C25.4025 53.497 19.7701 44.0278 22.1364 34.7137Z" fill="#8F9AA3" fill-opacity="0.15"/>
<path d="M39.4762 75.6628C39.4905 76.7673 40.3984 77.6564 41.5006 77.585C50.1568 77.0243 58.3957 73.566 64.8713 67.7366C71.8436 61.4602 76.2964 52.8631 77.4 43.5472C78.5036 34.2312 76.1828 24.8318 70.87 17.1C65.9356 9.91907 58.7328 4.63155 50.4473 2.0639C49.3922 1.73695 48.3017 2.38934 48.0297 3.4599L43.7775 20.1953C43.5055 21.2659 44.1586 22.3434 45.1909 22.7364C48.481 23.9889 51.3301 26.2169 53.3415 29.1441C55.7323 32.6234 56.7766 36.8531 56.28 41.0453C55.7834 45.2375 53.7796 49.1062 50.6421 51.9306C48.0024 54.3068 44.7117 55.8075 41.22 56.2566C40.1244 56.3975 39.2376 57.2926 39.2519 58.3971L39.4762 75.6628Z" fill="#18C273"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,6 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.75 2.8125C6.75 1.56986 7.75736 0.5625 9 0.5625C10.2426 0.5625 11.25 1.56986 11.25 2.8125C11.25 3.61712 10.8277 4.32309 10.1926 4.72081C12.3938 5.03292 13.7317 7.48108 12.8512 9.64368C12.6596 10.1143 12.2102 10.4375 11.6939 10.4375H11.3249L10.704 13.0516C10.5142 13.8505 9.82252 14.4375 9 14.4375C8.17749 14.4375 7.48577 13.8505 7.29604 13.0516L6.67515 10.4375H6.30607C5.78977 10.4375 5.34042 10.1143 5.14881 9.64368C4.26828 7.48109 5.60621 5.03292 7.80744 4.72081C7.17235 4.32308 6.75 3.61711 6.75 2.8125Z" fill="#FFA800"/>
<path d="M5.25 11.4375H4.5C4.08579 11.4375 3.75 11.7733 3.75 12.1875C3.75 12.6017 4.08579 12.9375 4.5 12.9375H5.25C5.66421 12.9375 6 12.6017 6 12.1875C6 11.7733 5.66421 11.4375 5.25 11.4375Z" fill="#FFA800"/>
<path d="M12.75 11.4375C12.3358 11.4375 12 11.7733 12 12.1875C12 12.6017 12.3358 12.9375 12.75 12.9375H13.5C13.9142 12.9375 14.25 12.6017 14.25 12.1875C14.25 11.7733 13.9142 11.4375 13.5 11.4375H12.75Z" fill="#FFA800"/>
<path d="M9.75 15.9375C9.75 15.5233 9.41421 15.1875 9 15.1875C8.58579 15.1875 8.25 15.5233 8.25 15.9375V16.6875C8.25 17.1017 8.58579 17.4375 9 17.4375C9.41421 17.4375 9.75 17.1017 9.75 16.6875V15.9375Z" fill="#FFA800"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,3 @@
<svg width="76" height="76" viewBox="0 0 76 76" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M72.5 41.5C70.567 41.5 69 39.933 69 38C69 36.067 70.567 34.5 72.5 34.5C74.433 34.5 76 36.067 76 38C76 39.933 74.433 41.5 72.5 41.5Z" fill="#FFA800"/>
</svg>

After

Width:  |  Height:  |  Size: 302 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 d="M11.6534 14.6421C11.8109 14.48 11.8561 14.2393 11.7682 14.0311C11.6802 13.8228 11.4761 13.6875 11.25 13.6875L9.75003 13.6875L9.75003 4.3125L11.25 4.3125C11.4761 4.3125 11.6802 4.17717 11.7682 3.96895C11.8561 3.76072 11.8109 3.52004 11.6534 3.35794C11.5684 3.27054 11.4331 3.10126 11.2428 2.85898C11.0716 2.64081 10.8299 2.333 10.6246 2.09069C10.4042 1.83063 10.1609 1.56453 9.91996 1.35933C9.79927 1.25653 9.666 1.15757 9.52489 1.08206C9.38825 1.00894 9.20686 0.9375 9.00002 0.9375C8.79317 0.9375 8.61178 1.00894 8.47514 1.08206C8.33403 1.15757 8.20076 1.25653 8.08007 1.35933C7.83914 1.56453 7.59578 1.83063 7.37543 2.09069C7.1701 2.333 6.92848 2.64081 6.75722 2.85898C6.56692 3.10126 6.43162 3.27054 6.34666 3.35794C6.1891 3.52004 6.14389 3.76072 6.23188 3.96895C6.31986 4.17718 6.52396 4.3125 6.75002 4.3125H8.25003L8.25003 13.6875H6.75001C6.52396 13.6875 6.31986 13.8228 6.23187 14.0311C6.14389 14.2393 6.1891 14.48 6.34666 14.6421C6.43162 14.7295 6.56692 14.8987 6.75722 15.141C6.92847 15.3592 7.1701 15.667 7.37543 15.9093C7.59578 16.1694 7.83914 16.4355 8.08007 16.6407C8.20076 16.7435 8.33403 16.8424 8.47514 16.9179C8.61178 16.9911 8.79317 17.0625 9.00001 17.0625C9.20686 17.0625 9.38825 16.9911 9.52489 16.9179C9.666 16.8424 9.79927 16.7435 9.91996 16.6407C10.1609 16.4355 10.4042 16.1694 10.6246 15.9093C10.8299 15.667 11.0716 15.3592 11.2428 15.141C11.4331 14.8987 11.5684 14.7295 11.6534 14.6421Z" fill="#FFA800"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 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.937503 12.9126L0.937501 12.9141V15.5625C0.937501 15.9767 1.27329 16.3125 1.6875 16.3125C2.10172 16.3125 2.4375 15.9767 2.4375 15.5625V13.6875H15.5625V15.5625C15.5625 15.9767 15.8983 16.3125 16.3125 16.3125C16.7267 16.3125 17.0625 15.9767 17.0625 15.5625V13.1263V13.125V11.961C17.0625 11.2871 17.0625 10.7252 17.0026 10.2791C16.9393 9.8083 16.8 9.3832 16.4584 9.04159C16.2015 8.78471 15.8974 8.64225 15.5622 8.56047V5.52518L15.5623 5.43571C15.5635 5.03078 15.5647 4.61131 15.3546 4.21689C15.1452 3.82363 14.8276 3.60814 14.5257 3.40327L14.4676 3.36382C12.9184 2.30718 11.0321 1.6875 9 1.6875C6.96785 1.6875 5.08161 2.30718 3.53236 3.36382L3.47433 3.40327C3.17241 3.60814 2.85484 3.82363 2.64539 4.21689C2.43531 4.61131 2.43651 5.03079 2.43767 5.43571L2.43784 5.52518V8.56048C2.10258 8.64226 1.79848 8.78471 1.5416 9.04159C1.19999 9.3832 1.06074 9.8083 0.997437 10.2791C0.937463 10.7252 0.93748 11.2871 0.937501 11.961L0.937503 12.9126ZM13.539 8.4375C13.737 8.43749 13.9253 8.43749 14.1039 8.439V5.52518C14.1039 5.26409 14.1031 5.1195 14.0919 5.01006C14.0827 4.91955 14.0697 4.89418 14.0624 4.88041C14.0486 4.85453 14.0344 4.83345 13.9859 4.79172C13.9194 4.73446 13.8252 4.66899 13.6357 4.53977C12.3235 3.64477 10.726 3.11932 9 3.11932C7.27396 3.11932 5.67655 3.64477 4.36429 4.53977C4.17483 4.66899 4.08064 4.73446 4.01409 4.79172C3.9656 4.83345 3.95139 4.85453 3.93761 4.88041C3.93028 4.89418 3.91726 4.91955 3.90806 5.01006C3.89692 5.1195 3.8961 5.26409 3.8961 5.52518V8.439C4.07463 8.43749 4.26291 8.43749 4.46086 8.4375H5.4375V7.96336C5.4375 7.76396 5.44903 7.4943 5.60078 7.25058C5.75766 6.99861 6.00084 6.87279 6.19956 6.788C6.98337 6.45359 7.94807 6.1875 9 6.1875C10.0519 6.1875 11.0166 6.45359 11.8004 6.788C11.9992 6.87279 12.2423 6.99861 12.3992 7.25058C12.551 7.4943 12.5625 7.76396 12.5625 7.96336V8.4375H13.539Z" fill="#2563EB"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,5 @@
<svg width="76" height="76" viewBox="0 0 76 76" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M38 76C58.9868 76 76 58.9868 76 38C76 17.0132 58.9868 0 38 0C17.0132 0 0 17.0132 0 38C0 58.9868 17.0132 76 38 76Z" fill="#EEF0F1"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M51.1733 57.7622C62.0865 57.7622 70.9333 48.9153 70.9333 38.0022C70.9333 27.089 62.0865 18.2422 51.1733 18.2422C40.2602 18.2422 31.4133 27.089 31.4133 38.0022C31.4133 48.9153 40.2602 57.7622 51.1733 57.7622Z" fill="#0B85F7"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M58.5195 45.3418C62.577 45.3418 65.8662 42.0526 65.8662 37.9951C65.8662 33.9377 62.577 30.6484 58.5195 30.6484C54.4621 30.6484 51.1729 33.9377 51.1729 37.9951C51.1729 42.0526 54.4621 45.3418 58.5195 45.3418Z" fill="#04498A"/>
</svg>

After

Width:  |  Height:  |  Size: 834 B

@ -0,0 +1,5 @@
<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="M8.03065 3.99764C8.26317 3.88054 8.54566 3.9383 8.71355 4.13726C9.23007 4.74936 9.89464 5.29352 10.6354 5.81785L9.72603 6.72725C9.50636 6.94692 9.50636 7.30308 9.72603 7.52275C9.9457 7.74242 10.3019 7.74242 10.5215 7.52275L11.585 6.45927C11.7918 6.59413 12.0017 6.72898 12.2136 6.8647L11.226 7.85225C11.0064 8.07192 11.0064 8.42808 11.226 8.64775C11.4457 8.86742 11.8019 8.86742 12.0215 8.64775L13.1465 7.52275C13.1582 7.51112 13.1692 7.49912 13.1796 7.48677C14.718 8.49195 16.279 9.63033 16.9168 11.2027C16.9411 11.2625 16.9622 11.3222 16.9803 11.3817L16.9806 11.3828C17.1127 11.8191 17.0754 12.2159 16.9345 12.5584C16.8058 12.8746 16.5209 13.1948 16.2772 13.4015C15.7345 13.8288 14.9919 14.0626 14.3247 14.0626L5.92164 14.0626C4.86348 14.0626 3.99982 14.0627 3.32006 13.9504C2.60001 13.8314 2.01027 13.5755 1.56067 13.0137C1.22687 12.5966 1.05311 12.0717 0.979841 11.5144C0.961047 11.3715 0.948942 11.227 0.942378 11.0826C0.934315 10.905 0.934423 10.7232 0.94166 10.5385C0.963373 9.98453 1.04925 9.40482 1.17116 8.8386C1.4956 7.33173 2.09664 5.82445 2.56332 4.97836C2.67903 4.76857 2.91492 4.6551 3.15104 4.69564C3.38717 4.73618 3.5717 4.92184 3.61081 5.1582C3.69759 5.68261 4.19703 6.0438 5.09532 6.21638C5.66248 6.32535 6.27655 6.33177 6.76992 6.29194C6.63744 5.73186 6.71839 5.252 6.96967 4.85529C7.27174 4.37839 7.79 4.11837 8.03065 3.99764ZM3.50395 12.8401C2.95615 12.7496 2.6605 12.5866 2.43949 12.3104C2.2163 12.1039 2.11095 11.5428 2.08618 11.2881C4.83108 12.1696 6.76679 12.4037 9.18511 11.6392C9.56462 11.5192 9.82978 11.4356 10.0297 11.3827C10.0996 11.3392 10.3337 11.2943 10.7118 11.4627C10.967 11.5706 11.3125 11.7316 11.7922 11.9553C12.8348 12.4415 14.2288 12.776 15.7098 12.4027C15.3837 12.6763 15.0127 12.9373 14.3252 12.9373H5.97152C4.85183 12.9373 4.08149 12.9355 3.50395 12.8401Z" fill="#EC1C2B"/>
<path d="M10.8513 5.60225L10.6354 5.81785C10.9407 6.03391 11.2589 6.24658 11.585 6.45927L11.6468 6.39775C11.8665 6.17808 11.8665 5.82192 11.6468 5.60225C11.4271 5.38258 11.071 5.38258 10.8513 5.60225Z" fill="#EC1C2B"/>
<path d="M12.3513 6.72725L12.2136 6.8647L12.3515 6.95237C12.5804 7.09893 12.8113 7.24671 13.0424 7.39677C13.0882 7.42655 13.1336 7.45675 13.1796 7.48677C13.3653 7.26576 13.3547 6.9352 13.1468 6.72725C12.9271 6.50758 12.571 6.50758 12.3513 6.72725Z" fill="#EC1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,9 @@
<svg width="78" height="66" viewBox="0 0 78 66" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect y="52" width="7" height="14" rx="1" fill="#EEF0F1"/>
<rect x="11" y="8" width="7" height="58" rx="1" fill="#EEF0F1"/>
<rect x="22" y="42" width="7" height="24" rx="1" fill="#EEF0F1"/>
<rect x="33" y="25" width="7" height="41" rx="1" fill="#EEF0F1"/>
<rect x="44" y="57" width="7" height="9" rx="1" fill="#EEF0F1"/>
<rect x="55" y="36" width="7" height="30" rx="1" fill="#EEF0F1"/>
<rect x="66" y="50" width="7" height="16" rx="1" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 556 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="M7.98294 0.937501L10.0171 0.937501C10.6943 0.937478 11.2658 0.937458 11.7187 0.990317C12.1912 1.04547 12.653 1.16885 13.0279 1.50686C13.1968 1.65917 13.3405 1.83674 13.4532 2.03335C13.6745 2.4193 13.7109 2.83 13.676 3.23706C14.4077 3.32152 15.0147 3.51453 15.4891 3.98974C15.9403 4.44178 16.1344 5.01085 16.2251 5.68681C16.3125 6.33802 16.3125 7.16608 16.3125 8.19364L16.3125 12.0323C16.3125 13.0598 16.3125 13.8879 16.2251 14.5391C16.1344 15.2151 15.9403 15.7841 15.4891 16.2362C15.0377 16.6883 14.4692 16.8829 13.7939 16.9739C13.1437 17.0614 12.3169 17.0614 11.2912 17.0614L6.70878 17.0614C5.68314 17.0614 4.85635 17.0614 4.20606 16.9739C3.5308 16.8829 2.96232 16.6883 2.51092 16.2362C2.05966 15.7841 1.8656 15.2151 1.77488 14.5391C1.68747 13.8879 1.68749 13.0599 1.6875 12.0323L1.6875 8.19363C1.68749 7.16609 1.68747 6.33801 1.77488 5.68681C1.8656 5.01085 2.05966 4.44178 2.51092 3.98974C2.98532 3.51453 3.59231 3.32152 4.32401 3.23706C4.28909 2.83 4.32552 2.4193 4.54679 2.03335C4.65951 1.83674 4.80316 1.65917 4.97208 1.50686C5.34697 1.16885 5.80878 1.04547 6.2813 0.990317C6.73419 0.937458 7.30573 0.937478 7.98294 0.937501ZM6.4505 2.40548C6.10231 2.44612 5.99439 2.51431 5.94431 2.55945C5.88697 2.61115 5.839 2.67071 5.80176 2.73567C5.77228 2.7871 5.7302 2.8956 5.7731 3.22603C5.81755 3.56848 5.93319 4.02061 6.11117 4.70847C6.25294 5.25636 6.34684 5.61587 6.44666 5.88513C6.54128 6.14037 6.61985 6.25188 6.69652 6.32481C6.75734 6.38266 6.82512 6.43385 6.89865 6.47724C6.99346 6.53318 7.1292 6.58098 7.41292 6.60821C7.60338 6.62648 7.83044 6.63336 8.12257 6.63595L8.66354 5.01303C8.79452 4.62008 9.21926 4.40771 9.61222 4.53869C10.0052 4.66968 10.2175 5.09442 10.0866 5.48738L9.70335 6.63701C10.0818 6.63557 10.3604 6.62996 10.5871 6.60821C10.8708 6.58098 11.0065 6.53318 11.1014 6.47724C11.1749 6.43385 11.2427 6.38266 11.3035 6.32481C11.3801 6.25188 11.4587 6.14037 11.5533 5.88513C11.6532 5.61587 11.7471 5.25636 11.8888 4.70847C12.0668 4.02061 12.1825 3.56848 12.2269 3.22603C12.2698 2.8956 12.2277 2.7871 12.1982 2.73567C12.161 2.67071 12.113 2.61115 12.0557 2.55945C12.0056 2.51431 11.8977 2.44612 11.5495 2.40548C11.1914 2.36368 10.706 2.3625 9.9734 2.3625H8.0266C7.29399 2.3625 6.80862 2.36368 6.4505 2.40548ZM7.5 12.75C7.08579 12.75 6.75 13.0858 6.75 13.5C6.75 13.9142 7.08579 14.25 7.5 14.25H10.5C10.9142 14.25 11.25 13.9142 11.25 13.5C11.25 13.0858 10.9142 12.75 10.5 12.75H7.5Z" fill="#FFA800"/>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -0,0 +1,9 @@
<svg width="78" height="66" viewBox="0 0 78 66" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect y="52" width="7" height="14" rx="1" fill="#EEF0F1"/>
<rect x="11" y="8" width="7" height="58" rx="1" fill="#EEF0F1"/>
<rect x="22" y="42" width="7" height="24" rx="1" fill="#EEF0F1"/>
<rect x="33" y="25" width="7" height="41" rx="1" fill="#EEF0F1"/>
<rect x="44" y="57" width="7" height="9" rx="1" fill="#EEF0F1"/>
<rect x="55" y="36" width="7" height="30" rx="1" fill="#EEF0F1"/>
<rect x="66" y="50" width="7" height="16" rx="1" fill="#FFA800"/>
</svg>

After

Width:  |  Height:  |  Size: 556 B

@ -1523,5 +1523,20 @@
"bmi": "مؤشر كتلة الجسم",
"yesPleaseINeedHelp": "نعم، من فضلك أريد المساعدة",
"noThanksIKnowTheClinic": "لا شكراً، أعرف العيادة",
"unableToSendOTP": "تعذر إرسال رمز التحقق لمرة واحدة"
"unableToSendOTP": "تعذر إرسال رمز التحقق لمرة واحدة",
"applewatch": "ساعة آبل",
"applehealthapplicationshouldbeinstalledinyourphone": "يجب تثبيت تطبيق Apple Health على هاتفك",
"unabletodetectapplicationinstalledpleasecomebackonceinstalled": "لا يمكننا اكتشاف التطبيق المثبت على جهازك. يرجى العودة إلى هنا بمجرد تثبيت هذا التطبيق.",
"applewatchshouldbeconnected": "يجب توصيل ساعة آبل",
"samsungwatch": "ساعة سامسونج",
"samsunghealthapplicationshouldbeinstalledinyourphone": "يجب تثبيت تطبيق Samsung Health على هاتفك",
"samsungwatchshouldbeconnected": "يجب توصيل ساعة سامسونج",
"huaweiwatch": "ساعة هواوي",
"huaweihealthapplicationshouldbeinstalledinyourphone": "يجب تثبيت تطبيق Huawei Health على هاتفك",
"huaweiwatchshouldbeconnected": "يجب توصيل ساعة هواوي",
"whoopwatch": "ساعة Whoop",
"whoophealthapplicationshouldbeinstalledinyourphone": "يجب تثبيت تطبيق Whoop Health على هاتفك",
"whoopwatchshouldbeconnected": "يجب توصيل ساعة Whoop",
"updatetheinformation": "سيتيح ذلك جمع أحدث المعلومات من ساعة آبل الخاصة بك"
}

@ -1516,5 +1516,20 @@
"bmi": "BMI",
"yesPleaseINeedHelp": "Yes, Please I need help",
"noThanksIKnowTheClinic": "No, Thanks. I Know the clinic",
"unableToSendOTP": "Unable to send Verification OTP"
"unableToSendOTP": "Unable to send Verification OTP",
"applewatch": "Apple Watch",
"applehealthapplicationshouldbeinstalledinyourphone": "Apple Health application should be installed in your phone",
"unabletodetectapplicationinstalledpleasecomebackonceinstalled": "We are unable to detect the application installed in your device. Please come back here once you have installed this application.",
"applewatchshouldbeconnected": "Apple Watch should be connected",
"samsungwatch": "Samsung Watch",
"samsunghealthapplicationshouldbeinstalledinyourphone": "Samsung Health application should be installed in your phone",
"samsungwatchshouldbeconnected": "Samsung Watch should be connected",
"huaweiwatch": "Huawei Watch",
"huaweihealthapplicationshouldbeinstalledinyourphone": "Huawei Health application should be installed in your phone",
"huaweiwatchshouldbeconnected": "Huawei Watch should be connected",
"whoopwatch": "Whoop Watch",
"whoophealthapplicationshouldbeinstalledinyourphone": "Whoop Health application should be installed in your phone",
"whoopwatchshouldbeconnected": "Whoop Watch should be connected",
"updatetheinformation": "This will allow to gather the most up to date information from your apple watch"
}

@ -11,19 +11,7 @@
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
478CFA942E638C8E0064F3D7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */; };
61243B492EC5FA3700D46FA0 /* PenguinModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B422EC5FA3700D46FA0 /* PenguinModel.swift */; };
61243B4C2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */; };
61243B502EC5FA3700D46FA0 /* PenguinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B452EC5FA3700D46FA0 /* PenguinView.swift */; };
61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */; };
61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */; };
61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
766D8CB62EC60BE600D05E07 /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB32EC60BE600D05E07 /* Penguin.xcframework */; };
766D8CB72EC60BE600D05E07 /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB32EC60BE600D05E07 /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
766D8CB82EC60BE600D05E07 /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */; };
766D8CB92EC60BE600D05E07 /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
766D8CBA2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */; };
766D8CBB2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@ -47,9 +35,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
766D8CB72EC60BE600D05E07 /* Penguin.xcframework in Embed Frameworks */,
766D8CBB2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Embed Frameworks */,
766D8CB92EC60BE600D05E07 /* PenNavUI.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@ -64,18 +49,9 @@
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
478CFA952E6E20A60064F3D7 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMGPenguinInPlatformBridge.swift; sourceTree = "<group>"; };
61243B422EC5FA3700D46FA0 /* PenguinModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinModel.swift; sourceTree = "<group>"; };
61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinNavigator.swift; sourceTree = "<group>"; };
61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinPlugin.swift; sourceTree = "<group>"; };
61243B452EC5FA3700D46FA0 /* PenguinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinView.swift; sourceTree = "<group>"; };
61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7595037DD52211B91157B0F3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
766D8CB32EC60BE600D05E07 /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = "<group>"; };
766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = "<group>"; };
766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = "<group>"; };
769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
8E12CEEB8E334EE22D5259D7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
@ -95,9 +71,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
766D8CB62EC60BE600D05E07 /* Penguin.xcframework in Frameworks */,
766D8CBA2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Frameworks */,
766D8CB82EC60BE600D05E07 /* PenNavUI.xcframework in Frameworks */,
DE1EF78253E64BE86845D2CC /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -113,32 +86,9 @@
path = RunnerTests;
sourceTree = "<group>";
};
61243B412EC5FA3700D46FA0 /* Helper */ = {
isa = PBXGroup;
children = (
61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */,
);
path = Helper;
sourceTree = "<group>";
};
61243B472EC5FA3700D46FA0 /* Penguin */ = {
isa = PBXGroup;
children = (
61243B422EC5FA3700D46FA0 /* PenguinModel.swift */,
61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */,
61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */,
61243B452EC5FA3700D46FA0 /* PenguinView.swift */,
61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */,
);
path = Penguin;
sourceTree = "<group>";
};
766D8CB22EC60BE600D05E07 /* Frameworks */ = {
isa = PBXGroup;
children = (
766D8CB32EC60BE600D05E07 /* Penguin.xcframework */,
766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */,
766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */,
D562310E31D1DDEFA02A6C12 /* Pods_Runner.framework */,
);
name = Frameworks;
@ -189,8 +139,6 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
61243B412EC5FA3700D46FA0 /* Helper */,
61243B472EC5FA3700D46FA0 /* Penguin */,
769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */,
478CFA952E6E20A60064F3D7 /* Runner.entitlements */,
478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */,
@ -414,12 +362,6 @@
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
61243B492EC5FA3700D46FA0 /* PenguinModel.swift in Sources */,
61243B4C2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift in Sources */,
61243B502EC5FA3700D46FA0 /* PenguinView.swift in Sources */,
61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */,
61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */,
61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

@ -16,11 +16,11 @@ import GoogleMaps
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func initializePlatformChannels(){
if let mainViewController = window?.rootViewController as? FlutterViewController{ // platform initialization suppose to be in foreground
HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController)
}
// if let mainViewController = window?.rootViewController as? FlutterViewController{ // platform initialization suppose to be in foreground
//
//// HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController)
//
// }
}
override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken:Data){
// Messaging.messaging().apnsToken = deviceToken

@ -230,6 +230,21 @@ class AppAssets {
static const String forward_top_nav_icon = '$svgBasePath/forward_top_nav_icon.svg';
static const String back_top_nav_icon = '$svgBasePath/back_top_nav_icon.svg';
static const String bluetooth = '$svgBasePath/bluetooth.svg';
//smartwatch
static const String watchActivity = '$svgBasePath/watch_activity.svg';
static const String watchActivityTrailing = '$svgBasePath/watch_activity_trailing.svg';
static const String watchSteps= '$svgBasePath/watch_steps.svg';
static const String watchStepsTrailing= '$svgBasePath/watch_steps_trailing.svg';
static const String watchSleep= '$svgBasePath/watch_sleep.svg';
static const String watchSleepTrailing= '$svgBasePath/watch_sleep_trailing.svg';
static const String watchBmi= '$svgBasePath/watch_bmi.svg';
static const String watchBmiTrailing= '$svgBasePath/watch_bmi_trailing.svg';
static const String watchWeight= '$svgBasePath/watch_weight.svg';
static const String watchWeightTrailing= '$svgBasePath/watch_weight_trailing.svg';
static const String watchHeight= '$svgBasePath/watch_height.svg';
//bottom navigation//
static const String homeBottom = '$svgBasePath/home_bottom.svg';

@ -0,0 +1,18 @@
enum SmartWatchTypes{
apple,
samsung,
huawei,
whoop
}
class SmartwatchDetails {
final SmartWatchTypes watchType;
final String watchIcon;
final String smallIcon;
final String detailsTitle;
final String details;
final String secondTitle;
SmartwatchDetails(this.watchType, this.watchIcon, this.smallIcon, this.detailsTitle, this.details, this.secondTitle);
}

@ -1515,5 +1515,19 @@ abstract class LocaleKeys {
static const yesPleaseINeedHelp = 'yesPleaseINeedHelp';
static const noThanksIKnowTheClinic = 'noThanksIKnowTheClinic';
static const unableToSendOTP = 'unableToSendOTP';
static const applewatch = 'applewatch';
static const applehealthapplicationshouldbeinstalledinyourphone = 'applehealthapplicationshouldbeinstalledinyourphone';
static const unabletodetectapplicationinstalledpleasecomebackonceinstalled = 'unabletodetectapplicationinstalledpleasecomebackonceinstalled';
static const applewatchshouldbeconnected = 'applewatchshouldbeconnected';
static const samsungwatch = 'samsungwatch';
static const samsunghealthapplicationshouldbeinstalledinyourphone = 'samsunghealthapplicationshouldbeinstalledinyourphone';
static const samsungwatchshouldbeconnected = 'samsungwatchshouldbeconnected';
static const huaweiwatch = 'huaweiwatch';
static const huaweihealthapplicationshouldbeinstalledinyourphone = 'huaweihealthapplicationshouldbeinstalledinyourphone';
static const huaweiwatchshouldbeconnected = 'huaweiwatchshouldbeconnected';
static const whoopwatch = 'whoopwatch';
static const whoophealthapplicationshouldbeinstalledinyourphone = 'whoophealthapplicationshouldbeinstalledinyourphone';
static const whoopwatchshouldbeconnected = 'whoopwatchshouldbeconnected';
static const updatetheinformation = 'updatetheinformation';
}

@ -0,0 +1,247 @@
import 'dart:math';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/common_models/data_points.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/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart';
import 'package:hmg_patient_app_new/widgets/graph/CustomBarGraph.dart';
import 'package:intl/intl.dart' show DateFormat;
class ActivityDetails extends StatefulWidget {
final String selectedActivity;
const ActivityDetails({super.key, required this.selectedActivity});
@override
State<ActivityDetails> createState() => _ActivityDetailsState();
}
class _ActivityDetailsState extends State<ActivityDetails> {
int index = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "All Health Data".needTranslation,
child: Column(
spacing: 16.h,
children: [
periodSelectorView((index) {}),
activityDetails(),
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h),
child:
activityGraph().paddingOnly(left: 16.w, right: 16.w, top: 32.h, bottom: 16.h),)
],
).paddingSymmetrical(24.w, 24.h),
),
);
}
Widget periodSelectorView(Function(int) onItemSelected) {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h),
child: Row(
children: [
Expanded(
child: CustomTabBar(
activeTextColor: Color(0xffED1C2B),
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
tabs: [
CustomTabBarModel(null, "D"),
CustomTabBarModel(null, "W"),
CustomTabBarModel(null, "M"),
CustomTabBarModel(null, "6M"),
CustomTabBarModel(null, "Y"),
// CustomTabBarModel(null, "Completed".needTranslation),
],
shouldTabExpanded: true,
onTabChange: (index) {
//todo handle the selection from viewmodel
setState(() {
this.index = index;
});
},
),
),
],
).paddingSymmetrical(4.w, 4.h));
}
Widget activityDetails() {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h, hasShadow: true),
child: Column(
spacing: 8.h,
children: [
Column(
children: [widget.selectedActivity.toText32(weight: FontWeight.w600, color: AppColors.textColor), "Average".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)],
),
Row(
children: ["3232".toText24(color: AppColors.textGreenColor, fontWeight: FontWeight.w600), "(20-21)".toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500)],
)
],
).paddingSymmetrical(16.w, 16.h));
}
Widget activityGraph() {
final _random = Random();
int randomBP() => 100 + _random.nextInt(51); // 100150
final List<DataPoint> data6Months = List.generate(6, (index) {
final date = DateTime.now().subtract(Duration(days: 30 * (5 - index)));
final value = randomBP();
return DataPoint(
value: value.toDouble(),
label: value.toString(),
actualValue: value.toString(),
displayTime: DateFormat('MMM').format(date),
unitOfMeasurement: 'mmHg',
time: date,
);
});
final List<DataPoint> data12Months = List.generate(12, (index) {
final date = DateTime.now().subtract(Duration(days: 30 * (11 - index)));
final value = randomBP();
return DataPoint(
value: value.toDouble(),
label: value.toString(),
actualValue: value.toString(),
displayTime: DateFormat('MMM').format(date),
unitOfMeasurement: 'mmHg',
time: date,
);
});
List<DataPoint> data =[];
if(index == 0){
data = data6Months;
} else if(index == 1){
data = data12Months;
} else
data = [
DataPoint(
value: 128,
label: "128",
actualValue: '128',
displayTime: 'Sun',
unitOfMeasurement: 'mmHg',
time: DateTime.now().subtract(const Duration(days: 6)),
),
DataPoint(
value: 135,
label: "135",
actualValue: '135',
displayTime: 'Mon',
unitOfMeasurement: 'mmHg',
time: DateTime.now().subtract(const Duration(days: 5)),
),
DataPoint(
value: 122,
label: "122",
actualValue: '122',
displayTime: 'Tue',
unitOfMeasurement: 'mmHg',
time: DateTime.now().subtract(const Duration(days: 4)),
),
DataPoint(
value: 140,
label: "140",
actualValue: '140',
displayTime: 'Wed',
unitOfMeasurement: 'mmHg',
time: DateTime.now().subtract(const Duration(days: 3)),
),
DataPoint(
value: 118,
label: "118",
actualValue: '118',
displayTime: 'Thu',
unitOfMeasurement: 'mmHg',
time: DateTime.now().subtract(const Duration(days: 2)),
),
DataPoint(
value: 125,
label: "125",
actualValue: '125',
displayTime: 'Fri',
unitOfMeasurement: 'mmHg',
time: DateTime.now().subtract(const Duration(days: 1)),
),
DataPoint(
value: 130,
label: "130",
actualValue: '130',
displayTime: 'Sat',
unitOfMeasurement: 'mmHg',
time: DateTime.now(),
),
];
return CustomBarChart(
dataPoints: data,
height: 300.h,
maxY: 150,
barColor: AppColors.bgGreenColor,
barWidth: 26.w,
barRadius: BorderRadius.circular(8),
bottomLabelColor: Colors.black,
bottomLabelSize: 12,
leftLabelInterval: .1,
leftLabelReservedSize: 40,
// Left axis label formatter (Y-axis)
leftLabelFormatter: (value) {
var labelValue = double.tryParse(value.toStringAsFixed(0));
if (labelValue == null) return SizedBox.shrink();
if (labelValue == 0 || labelValue == 150 / 2 || labelValue == 150) {
return Text(
labelValue.toStringAsFixed(0),
style: const TextStyle(
color: Colors.black26,
fontSize: 11,
),
);
}
return SizedBox.shrink();
},
// Bottom axis label formatter (X-axis - Days)
bottomLabelFormatter: (value, dataPoints) {
final index = value.toInt();
if (index >= 0 && index < dataPoints.length) {
return Text(
dataPoints[index].displayTime,
style: const TextStyle(
color: Colors.grey,
fontSize: 11,
),
);
}
return const Text('');
},
verticalInterval: 1/data.length,
getDrawingVerticalLine: (value) {
return FlLine(
color: AppColors.greyColor,
strokeWidth: 1,
);
},
showGridLines: true,
);
}
}

@ -0,0 +1,147 @@
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/dependencies.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/presentation/smartwatches/activity_detail.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
class SmartWatchActivity extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "All Health Data".needTranslation,
child: Column(
spacing: 16.h,
children: [
resultItem(
leadingIcon: AppAssets.watchActivity,
title: "Activity".needTranslation,
description: "Activity rings give you a quick visual reference of how active you are each day. ".needTranslation,
trailingIcon: AppAssets.watchActivityTrailing,
result: "21",
unitsOfMeasure: "Cal"
).onPress((){
getIt.get<NavigationService>().pushPage(page: ActivityDetails( selectedActivity: "Steps"));
}),
resultItem(
leadingIcon: AppAssets.watchSteps,
title: "Steps".needTranslation,
description: "Step count is the number of steps you take throughout the day.".needTranslation,
trailingIcon: AppAssets.watchStepsTrailing,
result: "21",
unitsOfMeasure: "Steps"
),
resultItem(
leadingIcon: AppAssets.watchSteps,
title: "Walking + Running Distance".needTranslation,
description: "This will show you the total distance you covered in a day".needTranslation,
trailingIcon: AppAssets.watchStepsTrailing,
result: "21",
unitsOfMeasure: "km"
),
resultItem(
leadingIcon: AppAssets.watchSleep,
title: "Sleep Score".needTranslation,
description: "This will keep track of how much hours you sleep in a day".needTranslation,
trailingIcon: AppAssets.watchSleepTrailing,
result: "21",
unitsOfMeasure: "hr",
resultSecondValue: "2",
unitOfSecondMeasure: "min"
),
resultItem(
leadingIcon: AppAssets.watchBmi,
title: "Body Mass Index".needTranslation,
description: "This will calculate your weight and height ratio to analyze the ".needTranslation,
trailingIcon: AppAssets.watchBmiTrailing,
result: "21",
unitsOfMeasure: "BMI"
),
resultItem(
leadingIcon: AppAssets.watchWeight,
title: "Weight".needTranslation,
description: "This will calculate your weight to keep track and update history".needTranslation,
trailingIcon: AppAssets.watchWeightTrailing,
result: "21",
unitsOfMeasure: "Kg"
),
resultItem(
leadingIcon: AppAssets.watchWeight,
title: "Height".needTranslation,
description: "This will calculate your height to keep track and update history".needTranslation,
trailingIcon: AppAssets.watchWeightTrailing,
result: "21",
unitsOfMeasure: "ft"
)
],
).paddingSymmetrical(24.w, 24.h),
));
}
Widget resultItem({
required String leadingIcon,
required String title,
required String description,
required String trailingIcon,
required String result,
required String unitsOfMeasure,
String? resultSecondValue,
String? unitOfSecondMeasure
}) {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h),
child: Row(
spacing: 16.w,
children: [
Expanded(
child:Column(
spacing: 8.h,
children: [
Row(
spacing: 8.w,
children: [
Utils.buildSvgWithAssets(icon: leadingIcon, height: 16.h, width: 14.w),
title.toText16( weight: FontWeight.w600, color: AppColors.textColor),
],
),
description.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
spacing: 2.h,
children: [
result.toText21(weight: FontWeight.w600, color: AppColors.textColor),
unitsOfMeasure.toText10(weight: FontWeight.w500, color:AppColors.greyTextColor ),
if(resultSecondValue != null)
Visibility(
visible: resultSecondValue != null ,
child: Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
spacing: 2.h,
children: [
SizedBox(width: 2.w,),
resultSecondValue.toText21(weight: FontWeight.w600, color: AppColors.textColor),
unitOfSecondMeasure!.toText10(weight: FontWeight.w500, color:AppColors.greyTextColor )
],
),
)
],
),
],
) ,
),
Utils.buildSvgWithAssets(icon: trailingIcon, width: 72.w, height: 72.h),
],
).paddingSymmetrical(16.w, 16.h)
);
}
}

@ -3,12 +3,16 @@ import 'dart:io';
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/smart_watch.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_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/smartwatch_health_data/health_provider.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/smartwatches/smartwatch_instructions_page.dart';
import 'package:hmg_patient_app_new/presentation/smartwatches/widgets/supported_watches_list.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -81,6 +85,14 @@ class SmartwatchHomePage extends StatelessWidget {
text: LocaleKeys.select.tr(context: context),
onPressed: () {
context.read<HealthProvider>().setSelectedWatchType("apple", "assets/images/png/smartwatches/apple-watch-5.jpg");
getIt.get<NavigationService>().pushPage(page: SmartwatchInstructionsPage(
smartwatchDetails: SmartwatchDetails(SmartWatchTypes.apple,
"assets/images/png/smartwatches/apple-watch-5.jpg",
AppAssets.bluetooth,
LocaleKeys.applehealthapplicationshouldbeinstalledinyourphone.tr(context: context),
LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
LocaleKeys.applewatchshouldbeconnected.tr(context: context)),
));
},
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),
@ -106,7 +118,14 @@ class SmartwatchHomePage extends StatelessWidget {
text: LocaleKeys.select.tr(context: context),
onPressed: () {
context.read<HealthProvider>().setSelectedWatchType("samsung", "assets/images/png/smartwatches/galaxy_watch_8_classic.jpeg");
},
getIt.get<NavigationService>().pushPage(page: SmartwatchInstructionsPage(
smartwatchDetails: SmartwatchDetails(SmartWatchTypes.samsung,
"assets/images/png/smartwatches/galaxy_watch_8_classic.jpeg",
AppAssets.bluetooth,
LocaleKeys.samsunghealthapplicationshouldbeinstalledinyourphone.tr(context: context),
LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
LocaleKeys.samsungwatchshouldbeconnected.tr(context: context)),
)); },
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),
textColor: AppColors.primaryRedColor,
@ -131,6 +150,14 @@ class SmartwatchHomePage extends StatelessWidget {
text: LocaleKeys.select.tr(context: context),
onPressed: () {
context.read<HealthProvider>().setSelectedWatchType("huawei", "assets/images/png/smartwatches/Huawei_Watch.png");
getIt.get<NavigationService>().pushPage(page: SmartwatchInstructionsPage(
smartwatchDetails: SmartwatchDetails(SmartWatchTypes.huawei,
"assets/images/png/smartwatches/Huawei_Watch.png",
AppAssets.bluetooth,
LocaleKeys.huaweihealthapplicationshouldbeinstalledinyourphone.tr(context: context),
LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
LocaleKeys.huaweiwatchshouldbeconnected.tr(context: context)),
));
},
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),
@ -156,6 +183,14 @@ class SmartwatchHomePage extends StatelessWidget {
text: LocaleKeys.select.tr(context: context),
onPressed: () {
context.read<HealthProvider>().setSelectedWatchType("whoop", "assets/images/png/smartwatches/Whoop_Watch.png");
getIt.get<NavigationService>().pushPage(page: SmartwatchInstructionsPage(
smartwatchDetails: SmartwatchDetails(SmartWatchTypes.whoop,
"assets/images/png/smartwatches/Whoop_Watch.png",
AppAssets.bluetooth,
LocaleKeys.whoophealthapplicationshouldbeinstalledinyourphone.tr(context: context),
LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
LocaleKeys.whoopwatchshouldbeconnected.tr(context: context)),
));
},
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),

@ -1,15 +1,24 @@
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/smart_watch.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_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/presentation/smartwatches/smart_watch_activity.dart' show SmartWatchActivity;
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import '../../core/utils/utils.dart';
class SmartwatchInstructionsPage extends StatelessWidget {
const SmartwatchInstructionsPage({super.key});
final SmartwatchDetails smartwatchDetails;
const SmartwatchInstructionsPage({super.key, required this.smartwatchDetails});
@override
Widget build(BuildContext context) {
@ -25,6 +34,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
child: CustomButton(
text: LocaleKeys.getStarted.tr(context: context),
onPressed: () {
getIt.get<NavigationService>().pushPage(page: SmartWatchActivity());
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
@ -35,8 +45,55 @@ class SmartwatchInstructionsPage extends StatelessWidget {
height: 50.h,
).paddingSymmetrical(24.w, 30.h),
),
child: SingleChildScrollView(),
child: Column(
mainAxisSize: MainAxisSize.max,
spacing: 18.h,
children: [
Image.asset(smartwatchDetails.watchIcon, fit: BoxFit.contain, height: 280.h,width: 280.w,),
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h),
child: Column(
children: [
watchContentDetails(
title: smartwatchDetails.detailsTitle,
description: smartwatchDetails.details,
icon: smartwatchDetails.smallIcon,
descriptionTextColor: AppColors.primaryRedColor
),
Divider(
color: AppColors.dividerColor,
thickness: 1.h,
).paddingOnly(top: 16.h, bottom: 16.h),
watchContentDetails(
title: smartwatchDetails.secondTitle,
description: LocaleKeys.updatetheinformation.tr(),
icon: AppAssets.bluetooth,
descriptionTextColor: AppColors.greyTextColor
),
],
).paddingSymmetrical(16.w, 16.h),
)
],
).paddingSymmetrical(24.w, 16.h),
),
);
}
Widget watchContentDetails({required String title, required String description, required String icon, required Color descriptionTextColor}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h),
child: Utils.buildSvgWithAssets(icon: icon, width: 40.w, height: 40.h),
),
title.toText16(weight: FontWeight.w600, color: AppColors.textColor),
description.toText12(fontWeight: FontWeight.w500, color: descriptionTextColor)
],
);
}
}

@ -39,6 +39,7 @@ import '../features/monthly_reports/monthly_reports_repo.dart';
import '../features/monthly_reports/monthly_reports_view_model.dart';
import '../features/qr_parking/qr_parking_view_model.dart';
import '../presentation/parking/paking_page.dart';
import '../presentation/smartwatches/smartwatch_instructions_page.dart';
import '../services/error_handler_service.dart';
class AppRoutes {

@ -113,4 +113,5 @@ class AppColors {
static const Color covid29Color = Color(0xff2563EB); // #2563EB
static const Color lightGreyTextColor = Color(0xFF959595);
static const Color labelColorYellow = Color(0xFFFBCB6E);
static const Color tooltipColor = Color(0xFF1AACACAC);
}

@ -21,6 +21,7 @@ class CustomTabBar extends StatefulWidget {
final Color inActiveTextColor;
final Color inActiveBackgroundColor;
final Function(int)? onTabChange;
final bool shouldTabExpanded;
const CustomTabBar({
super.key,
@ -31,6 +32,7 @@ class CustomTabBar extends StatefulWidget {
this.activeBackgroundColor = const Color(0x142E3039),
this.inActiveBackgroundColor = Colors.white,
this.onTabChange,
this.shouldTabExpanded = false
});
@override
@ -58,6 +60,11 @@ class CustomTabBarState extends State<CustomTabBar> {
@override
Widget build(BuildContext context) {
late Widget parentWidget;
if(widget.shouldTabExpanded){
return Row(
children:List.generate(widget.tabs.length, (index)=>myTab(widget.tabs[index], index).expanded),
);
}
if (widget.tabs.length > 3) {
parentWidget = ListView.separated(

@ -0,0 +1,240 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.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/theme/colors.dart';
/// A customizable bar chart widget using `fl_chart`.
///
/// Displays a bar chart with configurable axis labels, colors, and data points.
/// Useful for visualizing comparative data, categories, or grouped values.
///
/// **Parameters:**
/// - [dataPoints]: List of `DataPoint` objects to plot.
/// - [secondaryDataPoints]: Optional list for grouped bars (e.g., comparison data).
/// - [leftLabelFormatter]: Function to build left axis labels.
/// - [bottomLabelFormatter]: Function to build bottom axis labels.
/// - [width]: Optional width of the chart.
/// - [height]: Required height of the chart.
/// - [maxY], [maxX], [minX]: Axis bounds.
/// - [barColor]: Color of the bars.
/// - [secondaryBarColor]: Color of the secondary bars.
/// - [barRadius]: Border radius for bar corners.
/// - [barWidth]: Width of each bar.
/// - [bottomLabelColor]: Color of bottom axis labels.
/// - [bottomLabelSize]: Font size for bottom axis labels.
/// - [bottomLabelFontWeight]: Font weight for bottom axis labels.
/// - [leftLabelInterval]: Interval between left axis labels.
/// - [leftLabelReservedSize]: Reserved space for left axis labels.
/// - [showBottomTitleDates]: Whether to show bottom axis labels.
/// - [isFullScreeGraph]: Whether the graph is fullscreen.
/// - [makeGraphBasedOnActualValue]: Use `actualValue` for plotting.
///
/// Example usage:
/// ```dart
/// CustomBarChart(
/// dataPoints: sampleData,
/// leftLabelFormatter: (value) => ...,
/// bottomLabelFormatter: (value, dataPoints) => ...,
/// height: 300,
/// maxY: 100,
/// )
class CustomBarChart extends StatelessWidget {
final List<DataPoint> dataPoints;
final List<DataPoint>? secondaryDataPoints; // For grouped bar charts
final double? width;
final double height;
final double? maxY;
final double? maxX;
final double? minX;
final Color barColor;
final Color? secondaryBarColor;
final Color barGridColor;
final Color bottomLabelColor;
final double? bottomLabelSize;
final FontWeight? bottomLabelFontWeight;
final double? leftLabelInterval;
final double? leftLabelReservedSize;
final double? bottomLabelReservedSize;
final bool? showGridLines;
final GetDrawingGridLine? getDrawingVerticalLine;
final double? verticalInterval;
final double? minY;
final BorderRadius? barRadius;
final double barWidth;
/// Creates the left label and provides it to the chart
final Widget Function(double) leftLabelFormatter;
final Widget Function(double, List<DataPoint>) bottomLabelFormatter;
final bool showBottomTitleDates;
final bool isFullScreeGraph;
final bool makeGraphBasedOnActualValue;
const CustomBarChart(
{super.key,
required this.dataPoints,
this.secondaryDataPoints,
required this.leftLabelFormatter,
this.width,
required this.height,
this.maxY,
this.maxX,
this.showBottomTitleDates = true,
this.isFullScreeGraph = false,
this.barColor = AppColors.bgGreenColor,
this.secondaryBarColor,
this.barGridColor = AppColors.graphGridColor,
this.bottomLabelColor = AppColors.textColor,
this.bottomLabelFontWeight = FontWeight.w500,
this.bottomLabelSize,
this.leftLabelInterval,
this.leftLabelReservedSize,
this.bottomLabelReservedSize,
this.makeGraphBasedOnActualValue = false,
required this.bottomLabelFormatter,
this.minX,
this.showGridLines = false,
this.getDrawingVerticalLine,
this.verticalInterval,
this.minY,
this.barRadius,
this.barWidth = 16});
@override
Widget build(BuildContext context) {
return Material(
color: Colors.white,
child: SizedBox(
width: width,
height: height,
child: BarChart(
BarChartData(
minY: minY ?? 0,
maxY: maxY,
barTouchData: BarTouchData(
handleBuiltInTouches: true,
touchCallback: (FlTouchEvent event, BarTouchResponse? touchResponse) {
// Let fl_chart handle the touch
},
touchTooltipData: BarTouchTooltipData(
getTooltipColor: (_)=>AppColors.tooltipColor,
getTooltipItem: (group, groupIndex, rod, rodIndex) {
final dataPoint = dataPoints[groupIndex];
return BarTooltipItem(
'${dataPoint.actualValue} ${dataPoint.unitOfMeasurement ?? ""}\n${DateFormat('dd MMM, yyyy').format(dataPoint.time)}',
TextStyle(
color: Colors.black,
fontSize: 12.f,
fontWeight: FontWeight.w500,
),
);
},
),
enabled: true,
),
titlesData: FlTitlesData(
leftTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
reservedSize: leftLabelReservedSize ?? 80,
interval: leftLabelInterval ?? .1,
getTitlesWidget: (value, _) {
return leftLabelFormatter(value);
},
),
),
bottomTitles: AxisTitles(
axisNameSize: 20,
sideTitles: SideTitles(
showTitles: showBottomTitleDates,
reservedSize: bottomLabelReservedSize ?? 30,
getTitlesWidget: (value, _) {
return bottomLabelFormatter(value, dataPoints);
},
interval: 1,
),
),
topTitles: AxisTitles(),
rightTitles: AxisTitles(),
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom: BorderSide.none,
left: BorderSide(color: Colors.grey, width: .5),
right: BorderSide.none,
top: BorderSide.none,
),
),
barGroups: _buildBarGroups(dataPoints),
gridData: FlGridData(
show: showGridLines ?? true,
drawHorizontalLine: false,
verticalInterval: verticalInterval,
getDrawingVerticalLine: getDrawingVerticalLine ??
(value) {
return FlLine(
color: barGridColor,
strokeWidth: 1,
dashArray: [5, 5],
);
},
)),
),
),
);
}
/// Builds bar chart groups from data points
List<BarChartGroupData> _buildBarGroups(List<DataPoint> dataPoints) {
return dataPoints.asMap().entries.map((entry) {
final index = entry.key;
final dataPoint = entry.value;
double value = (makeGraphBasedOnActualValue)
? double.tryParse(dataPoint.actualValue) ?? 0.0
: dataPoint.value;
final barRods = <BarChartRodData>[
BarChartRodData(
toY: value,
color: barColor,
width: barWidth,
borderRadius: barRadius ?? BorderRadius.circular(6),
// backDrawRodData: BackgroundBarChartRodData(
// show: true,
// toY: maxY,
// color: Colors.grey[100],
// ),
),
];
// Add secondary bar if provided (for grouped bar charts)
if (secondaryDataPoints != null && index < secondaryDataPoints!.length) {
final secondaryDataPoint = secondaryDataPoints![index];
double secondaryValue = (makeGraphBasedOnActualValue)
? double.tryParse(secondaryDataPoint.actualValue) ?? 0.0
: secondaryDataPoint.value;
barRods.add(
BarChartRodData(
toY: secondaryValue,
color: secondaryBarColor ?? AppColors.blueColor,
width: barWidth,
borderRadius: barRadius ?? BorderRadius.circular(6),
),
);
}
return BarChartGroupData(
x: index,
barRods: barRods,
barsSpace: 8.w
);
}).toList();
}
}
Loading…
Cancel
Save