@ -0,0 +1,14 @@
|
||||
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.6219 0.583496H10.7809C11.2625 0.583496 11.6528 0.973845 11.6528 1.45539V21.3783C11.6528 21.8598 11.2625 22.2502 10.7809 22.2502H1.6219C1.14035 22.2502 0.75 21.8598 0.75 21.3783V1.45539C0.75 0.973845 1.14035 0.583496 1.6219 0.583496Z" fill="#E9F1FF"/>
|
||||
<path d="M10.7809 0.583496H9.03711C9.51866 0.583496 9.90901 0.973845 9.90901 1.45539V21.3783C9.90901 21.8598 9.51866 22.2502 9.03711 22.2502H10.7809C11.2625 22.2502 11.6528 21.8598 11.6528 21.3783V1.45539C11.6528 0.973845 11.2625 0.583496 10.7809 0.583496Z" fill="#DDE9FF"/>
|
||||
<path d="M11.6528 10.1251V1.45539C11.6528 0.973845 11.2625 0.583496 10.7809 0.583496H1.6219C1.14035 0.583496 0.75 0.973845 0.75 1.45539V10.1251H11.6528Z" fill="#CFDFFF"/>
|
||||
<path d="M10.7811 0.583496H1.62207H9.03735C9.51889 0.583496 9.90924 0.973845 9.90924 1.45539V10.1251H11.653V1.45539C11.653 0.973845 11.2626 0.583496 10.7811 0.583496Z" fill="#C1D6FF"/>
|
||||
<path d="M7.49624 4.55576C7.49624 3.81216 6.87 3.21482 6.11615 3.26243C5.46663 3.30345 4.9407 3.83513 4.90618 4.48505C4.87967 4.98403 5.13566 5.42539 5.52849 5.66398C5.56895 5.68853 5.59302 5.73291 5.59302 5.78025V7.3004C5.59302 7.63578 5.86487 7.90764 6.20025 7.90764C6.53562 7.90764 6.80748 7.63578 6.80748 7.3004V5.78021C6.80748 5.73264 6.83198 5.68831 6.87261 5.66363C7.24648 5.43629 7.49624 5.02527 7.49624 4.55576Z" fill="#7E66FF"/>
|
||||
<path d="M6.12932 18.5699C6.5501 18.5699 6.5508 17.916 6.12932 17.916C5.70854 17.916 5.70785 18.5699 6.12932 18.5699Z" fill="white"/>
|
||||
<path d="M7.47483 17.3139C7.3913 17.3139 7.30778 17.2821 7.244 17.2185C6.66929 16.6455 5.73409 16.6455 5.15938 17.2185C5.03147 17.346 4.82444 17.3456 4.69696 17.2177C4.56949 17.0898 4.5698 16.8828 4.69766 16.7554C5.52697 15.9285 6.87636 15.9285 7.70571 16.7554C7.83357 16.8829 7.83388 17.0899 7.70641 17.2177C7.64254 17.2818 7.55867 17.3139 7.47483 17.3139Z" fill="white"/>
|
||||
<path d="M8.45374 15.851C8.37021 15.851 8.28668 15.8192 8.2229 15.7556C7.10801 14.6441 5.29385 14.6441 4.17891 15.7556C4.051 15.8831 3.84397 15.8828 3.7165 15.7549C3.58902 15.627 3.58933 15.42 3.71719 15.2925C5.08673 13.9272 7.31504 13.9272 8.68457 15.2925C8.81244 15.42 8.81274 15.627 8.68527 15.7549C8.6214 15.819 8.53757 15.851 8.45374 15.851Z" fill="white"/>
|
||||
<path d="M16.0512 22.0851L10.0409 19.5428C9.34799 19.2497 9.02387 18.4504 9.31695 17.7575L13.7898 7.18298C14.0829 6.49008 14.8822 6.16596 15.5752 6.45904L21.5855 9.00132C22.2784 9.29441 22.6025 10.0937 22.3094 10.7867L17.8365 21.3612C17.5434 22.0541 16.7441 22.3782 16.0512 22.0851Z" fill="#90EF96"/>
|
||||
<path d="M21.5866 9.00165L20.1075 8.37598C20.8004 8.66907 21.1245 9.46838 20.8314 10.1613L16.3585 20.7358C16.0654 21.4288 15.2661 21.7529 14.5732 21.4598L10.042 19.5431L16.0523 22.0854C16.7452 22.3785 17.5445 22.0544 17.8376 21.3615L22.3105 10.7869C22.6036 10.0941 22.2796 9.29474 21.5866 9.00165Z" fill="#87DE8D"/>
|
||||
<path d="M15.8828 6.5957L17.6865 7.35948L12.1461 20.4433L10.3424 19.6795L15.8828 6.5957Z" fill="#7E66FF"/>
|
||||
<path d="M18.5635 12.162C18.2287 12.0204 17.8587 12.0176 17.5218 12.1542C17.1849 12.2908 16.9213 12.5505 16.7797 12.8853C16.6381 13.2202 16.6353 13.5901 16.7719 13.927C16.8666 14.1605 17.0204 14.3586 17.2173 14.5054L16.0406 17.2873C15.9702 17.4536 16.048 17.6455 16.2143 17.7158C16.2559 17.7334 16.2991 17.7418 16.3415 17.7418C16.4689 17.7418 16.5901 17.6668 16.6428 17.5421L16.8235 17.115L17.3131 17.3222C17.3547 17.3397 17.3979 17.3481 17.4403 17.3481C17.5677 17.3481 17.6889 17.2731 17.7416 17.1484C17.8119 16.9821 17.7342 16.7903 17.5679 16.7199L17.0782 16.5128L17.8195 14.7601C17.8903 14.7715 17.9617 14.7775 18.0331 14.7775C18.2062 14.7775 18.3794 14.744 18.5447 14.6769C18.8816 14.5403 19.1451 14.2807 19.2868 13.9459C19.5792 13.2546 19.2547 12.4543 18.5635 12.162ZM18.6846 13.691C18.611 13.865 18.4741 13.9999 18.299 14.0709C18.1239 14.1419 17.9317 14.1404 17.7578 14.0668C17.5838 13.9932 17.4489 13.8563 17.3779 13.6812C17.3069 13.5062 17.3084 13.314 17.382 13.1401C17.4556 12.9661 17.5925 12.8312 17.7675 12.7602C17.8534 12.7254 17.9434 12.708 18.0334 12.708C18.1268 12.708 18.2202 12.7268 18.3087 12.7642C18.6679 12.9161 18.8365 13.3319 18.6846 13.691Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1,11 @@
|
||||
<svg width="12" height="22" viewBox="0 0 12 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.37276 13.5952V2.88054C7.37276 1.42768 6.19513 0.250061 4.74244 0.250061C3.28959 0.250061 2.11197 1.42768 2.11197 2.88054V13.5952C0.935008 14.4232 0.166016 15.7919 0.166016 17.3403C0.166016 19.8678 2.21495 21.9167 4.74244 21.9167C7.26994 21.9167 9.31887 19.8678 9.31887 17.3403C9.31887 15.7919 8.54972 14.4232 7.37276 13.5952Z" fill="#D8D8D8"/>
|
||||
<path d="M4.74264 20.4178C2.99984 20.4178 1.58203 18.9998 1.58203 17.2572C1.58203 15.9338 2.40442 14.7555 3.63841 14.2958V2.88041C3.63841 2.27143 4.13366 1.77618 4.74264 1.77618C5.35145 1.77618 5.84686 2.27143 5.84686 2.88041V14.2958C7.08069 14.7553 7.90324 15.9336 7.90324 17.257C7.90324 18.9998 6.48543 20.4178 4.74264 20.4178Z" fill="#F3E8D7"/>
|
||||
<path d="M3.63841 12.8968V14.2961C2.40458 14.7558 1.58203 15.9341 1.58203 17.2575C1.58203 19.0001 3.00001 20.4181 4.7428 20.4181C6.48543 20.4181 7.9034 19.0001 7.9034 17.2575C7.9034 15.9341 7.08085 14.7558 5.84703 14.2961V12.8968H3.63841Z" fill="#023DFE" fill-opacity="0.6"/>
|
||||
<path d="M5.84746 14.2961V12.8968H3.63901V14.2961C3.63901 14.2961 5.16558 15.0044 5.16558 17.2575C5.16558 18.51 4.43312 19.5947 3.37402 20.1058C3.78844 20.3059 4.25294 20.4181 4.74323 20.4181C6.48586 20.4181 7.90384 19.0001 7.90384 17.2575C7.90384 15.9339 7.08129 14.7558 5.84746 14.2961Z" fill="#2F66D3"/>
|
||||
<path d="M11.0168 7.87672H9.11994C8.93926 7.87672 8.79297 7.73026 8.79297 7.54975C8.79297 7.36924 8.93926 7.22278 9.11994 7.22278H11.0168C11.1973 7.22278 11.3436 7.36924 11.3436 7.54975C11.3438 7.73026 11.1973 7.87672 11.0168 7.87672Z" fill="#0D6E9A"/>
|
||||
<path d="M9.98117 5.22682H9.11994C8.93926 5.22682 8.79297 5.08036 8.79297 4.89985C8.79297 4.71933 8.93926 4.57288 9.11994 4.57288H9.98117C10.1617 4.57288 10.3081 4.71933 10.3081 4.89985C10.3081 5.08036 10.1617 5.22682 9.98117 5.22682Z" fill="#0D6E9A"/>
|
||||
<path d="M10.2863 2.57655H9.11994C8.93926 2.57655 8.79297 2.43009 8.79297 2.24958C8.79297 2.06907 8.93926 1.92261 9.11994 1.92261H10.2863C10.467 1.92261 10.6133 2.06907 10.6133 2.24958C10.6133 2.43009 10.467 2.57655 10.2863 2.57655Z" fill="#0D6E9A"/>
|
||||
<path d="M10.2863 13.1768H9.11994C8.93926 13.1768 8.79297 13.0303 8.79297 12.8498C8.79297 12.6691 8.93926 12.5228 9.11994 12.5228H10.2863C10.467 12.5228 10.6133 12.6691 10.6133 12.8498C10.6133 13.0303 10.467 13.1768 10.2863 13.1768Z" fill="#0D6E9A"/>
|
||||
<path d="M9.98117 10.5266H9.11994C8.93926 10.5266 8.79297 10.3802 8.79297 10.1997C8.79297 10.0191 8.93926 9.87268 9.11994 9.87268H9.98117C10.1617 9.87268 10.3081 10.0191 10.3081 10.1997C10.3081 10.3802 10.1617 10.5266 9.98117 10.5266Z" fill="#0D6E9A"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,13 @@
|
||||
<svg width="21" height="23" viewBox="0 0 21 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.9158 19.3576C13.9158 20.8407 12.9152 22.0894 11.5528 22.4666C11.2782 22.5426 10.9891 22.5833 10.6906 22.5833C8.90909 22.5833 7.46484 21.1392 7.46484 19.3576L10.6957 17.6973L13.9158 19.3576Z" fill="#E58E13"/>
|
||||
<path d="M13.7597 20.3521C13.4276 21.3769 12.5963 22.1773 11.5528 22.4661C10.8967 22.2846 10.3246 21.9011 9.90766 21.3868C9.5716 20.9721 9.87477 20.3521 10.4085 20.3521H13.7597Z" fill="#F7D360"/>
|
||||
<path d="M19.0187 16.1322L12.0887 17.6309L2.3623 16.1322C3.12551 16.1322 3.55711 15.733 3.80209 15.071C4.98715 11.875 1.83086 2.56055 10.6908 2.56055C19.5506 2.56055 16.3939 11.875 17.5789 15.071C17.8244 15.733 18.2558 16.1322 19.0187 16.1322Z" fill="#F7D360"/>
|
||||
<path d="M20.6315 17.745C20.6315 18.6355 19.9094 19.3575 19.0189 19.3575H2.36253C1.91737 19.3575 1.51403 19.1772 1.22227 18.8853C0.930345 18.5935 0.75 18.1902 0.75 17.745C0.75 16.8544 1.47204 16.1323 2.36253 16.1323H19.0189C19.4641 16.1323 19.8674 16.3128 20.1592 16.6046C20.4511 16.8965 20.6315 17.2997 20.6315 17.745Z" fill="#E58E13"/>
|
||||
<path d="M17.5786 15.0705H8.92152C7.98822 15.0705 7.24188 14.298 7.2708 13.3651C7.3928 9.4183 6.76332 2.6351 10.6256 2.56055C0.0236018 2.61543 6.80085 16.1317 2.3623 16.1317H19.0184C18.2555 16.1317 17.8241 15.7325 17.5786 15.0705Z" fill="#E58E13"/>
|
||||
<path d="M20.6316 17.745C20.6316 18.6355 19.9095 19.3575 19.019 19.3575H7.02285C6.57752 19.3575 6.17419 19.1772 5.88243 18.8853C5.59067 18.5935 5.41016 18.1902 5.41016 17.745C5.41016 16.8544 6.1322 16.1323 7.02285 16.1323H19.019C19.4642 16.1323 19.8675 16.3128 20.1593 16.6046C20.4512 16.8965 20.6316 17.2997 20.6316 17.745Z" fill="#F7D360"/>
|
||||
<path d="M12.33 2.68392C12.3334 2.64326 12.3347 2.6021 12.3347 2.56044C12.3347 1.65276 11.5987 0.916504 10.6908 0.916504C9.78264 0.916504 9.04688 1.65276 9.04688 2.56044C9.04688 2.6021 9.0482 2.64326 9.05167 2.68392" fill="#E58E13"/>
|
||||
<path d="M18.6989 8.01399C18.5157 8.01399 18.3673 7.86538 18.3673 7.68239C18.3673 6.14755 17.9727 4.8377 17.1946 3.78918C16.6137 3.00647 16.0231 2.66959 16.0173 2.66611C15.858 2.57669 15.8006 2.37502 15.8895 2.21533C15.9785 2.05582 16.1792 1.99796 16.339 2.08623C16.3673 2.10194 17.0387 2.47883 17.7037 3.36253C18.3091 4.1669 19.0306 5.56933 19.0306 7.68239C19.0306 7.86538 18.882 8.01399 18.6989 8.01399Z" fill="#E6E6E6"/>
|
||||
<path d="M20.1569 6.11282C19.9738 6.11282 19.8253 5.96437 19.8253 5.78122C19.8253 3.66435 18.5717 2.8228 18.5183 2.78808C18.3654 2.6884 18.3211 2.48359 18.4198 2.33019C18.5186 2.17679 18.722 2.1315 18.8758 2.22952C18.9418 2.27135 20.4885 3.28449 20.4885 5.78122C20.4885 5.96437 20.3401 6.11282 20.1569 6.11282Z" fill="#E6E6E6"/>
|
||||
<path d="M2.68511 8.01411C2.50196 8.01411 2.35352 7.8655 2.35352 7.68251C2.35352 5.56945 3.07506 4.16702 3.68024 3.36265C4.34541 2.47895 5.01671 2.10189 5.04497 2.08635C5.20532 1.99775 5.40715 2.05594 5.49576 2.21628C5.58419 2.37629 5.52634 2.57763 5.36665 2.6664C5.35359 2.67384 4.76694 3.01155 4.18953 3.7893C3.41129 4.83782 3.01688 6.14767 3.01688 7.68251C3.01671 7.8655 2.86827 8.01411 2.68511 8.01411Z" fill="#E6E6E6"/>
|
||||
<path d="M1.22613 6.11292C1.04297 6.11292 0.894531 5.96447 0.894531 5.78132C0.894531 3.28459 2.44143 2.27145 2.50722 2.22962C2.66178 2.13127 2.86676 2.17689 2.96511 2.33129C3.06314 2.48535 3.01818 2.68966 2.86461 2.78818C2.80956 2.82422 1.55773 3.66611 1.55773 5.78132C1.55773 5.96447 1.40928 6.11292 1.22613 6.11292Z" fill="#E6E6E6"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
@ -0,0 +1,12 @@
|
||||
<svg width="18" height="23" viewBox="0 0 18 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.16795 0.75C5.32124 0.75 2.18555 3.88569 2.18555 7.73241V11.541C2.18555 11.8964 2.4648 12.1758 2.82031 12.1758H5.35937C5.71488 12.1758 5.99413 11.8964 5.99413 11.541V7.73241C5.99413 5.98044 7.41603 4.55859 9.16795 4.55859C10.9199 4.55859 12.3418 5.98048 12.3418 7.73241V9.00194C12.3418 9.35737 12.621 9.6367 12.9765 9.6367H15.5156C15.8711 9.6367 16.1504 9.35737 16.1504 9.00194V7.73241C16.1504 3.88569 13.0147 0.75 9.16795 0.75Z" fill="#C5C9F7"/>
|
||||
<path d="M16.1504 7.73241V9.00194C16.1504 9.35737 15.8711 9.6367 15.5156 9.6367H12.9766C12.621 9.6367 12.3418 9.35737 12.3418 9.00194V7.73241C12.3418 5.98044 10.9199 4.55859 9.16797 4.55859V0.75C13.0147 0.75 16.1504 3.88569 16.1504 7.73241Z" fill="#A8AFF1"/>
|
||||
<path d="M14.2461 10.9062H4.08984C3.73433 10.9062 3.45508 11.1855 3.45508 11.541V21.7819C3.45508 22.1373 3.73433 22.4167 4.08984 22.4167H14.2461C14.6016 22.4167 14.8808 22.1373 14.8808 21.7819V11.541C14.8808 11.1855 14.6016 10.9062 14.2461 10.9062Z" fill="#FEDB41"/>
|
||||
<path d="M14.8808 11.541V21.7819C14.8808 22.1373 14.6016 22.4167 14.2461 22.4167H9.16797V10.9062H14.2461C14.6016 10.9062 14.8808 11.1855 14.8808 11.541Z" fill="#FFCC33"/>
|
||||
<path d="M4.7246 22.4167H2.82031C1.77023 22.4167 0.916016 21.5624 0.916016 20.5124V12.8105C0.916016 11.7605 1.77023 10.9062 2.82031 10.9062H4.7246V22.4167Z" fill="#FEA832"/>
|
||||
<path d="M17.4199 20.5124C17.4199 21.5624 16.5657 22.4167 15.5156 22.4167H13.6113V10.9062H15.5156C16.5657 10.9062 17.4199 11.7605 17.4199 12.8105V20.5124Z" fill="#FE9923"/>
|
||||
<path d="M9.16797 13.4453C8.11416 13.4453 7.26367 14.2958 7.26367 15.3496C7.26367 16.4033 8.11416 17.2539 9.16797 17.2539C10.2218 17.2539 11.0723 16.4033 11.0723 15.3496C11.0723 14.2958 10.2218 13.4453 9.16797 13.4453Z" fill="#994C0F"/>
|
||||
<path d="M9.80273 16.6191V19.1582C9.80273 19.5771 9.48535 19.793 9.16797 19.793C8.85059 19.793 8.5332 19.5771 8.5332 19.1582V16.6191C8.5332 16.2001 8.85059 15.9844 9.16797 15.9844C9.48535 15.9844 9.80273 16.2002 9.80273 16.6191Z" fill="#994C0F"/>
|
||||
<path d="M11.0723 15.3496C11.0723 16.4033 10.2218 17.2539 9.16797 17.2539V13.4453C10.2218 13.4453 11.0723 14.2958 11.0723 15.3496Z" fill="#713708"/>
|
||||
<path d="M9.80273 16.6191V19.1582C9.80273 19.5771 9.48535 19.793 9.16797 19.793V15.9844C9.48535 15.9844 9.80273 16.2002 9.80273 16.6191Z" fill="#713708"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,12 @@
|
||||
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.93921 0.25C5.69449 0.25 2.23438 3.71012 2.23438 7.95483V12.1575C2.23438 12.5497 2.54252 12.8579 2.93481 12.8579H5.73657C6.12887 12.8579 6.43701 12.5497 6.43701 12.1575V7.95483C6.43701 6.0216 8.00602 4.45264 9.93921 4.45264C11.8724 4.45264 13.4414 6.02164 13.4414 7.95483V9.35571C13.4414 9.74792 13.7495 10.0561 14.1418 10.0561H16.9436C17.3359 10.0561 17.644 9.74792 17.644 9.35571V7.95483C17.644 3.71012 14.1839 0.25 9.93921 0.25Z" fill="#C5C9F7"/>
|
||||
<path d="M17.6443 7.95483V9.35571C17.6443 9.74791 17.3361 10.0561 16.9438 10.0561H14.1421C13.7498 10.0561 13.4416 9.74791 13.4416 9.35571V7.95483C13.4416 6.02159 11.8726 4.45264 9.93945 4.45264V0.25C14.1842 0.25 17.6443 3.71012 17.6443 7.95483Z" fill="#A8AFF1"/>
|
||||
<path d="M15.5432 9.21533H4.33618C3.94388 9.21533 3.63574 9.52347 3.63574 9.91577V21.2162C3.63574 21.6084 3.94388 21.9166 4.33618 21.9166H15.5432C15.9355 21.9166 16.2436 21.6084 16.2436 21.2162V9.91577C16.2436 9.52347 15.9355 9.21533 15.5432 9.21533Z" fill="#FEDB41"/>
|
||||
<path d="M16.2434 9.91577V21.2162C16.2434 21.6084 15.9353 21.9166 15.543 21.9166H9.93945V9.21533H15.543C15.9353 9.21533 16.2434 9.52347 16.2434 9.91577Z" fill="#FFCC33"/>
|
||||
<path d="M5.03662 21.9166H2.9353C1.77657 21.9166 0.833984 20.9741 0.833984 19.8153V11.3166C0.833984 10.1579 1.77657 9.21533 2.9353 9.21533H5.03662V21.9166Z" fill="#FEA832"/>
|
||||
<path d="M19.0464 19.8153C19.0464 20.9741 18.1038 21.9166 16.9451 21.9166H14.8438V9.21533H16.9451C18.1038 9.21533 19.0464 10.1579 19.0464 11.3166V19.8153Z" fill="#FE9923"/>
|
||||
<path d="M9.94018 12.0171C8.77735 12.0171 7.83887 12.9556 7.83887 14.1184C7.83887 15.2811 8.77735 16.2197 9.94018 16.2197C11.103 16.2197 12.0415 15.2811 12.0415 14.1184C12.0415 12.9556 11.103 12.0171 9.94018 12.0171Z" fill="#994C0F"/>
|
||||
<path d="M10.6401 15.5193V18.321C10.6401 18.7833 10.2899 19.0215 9.9397 19.0215C9.58948 19.0215 9.23926 18.7833 9.23926 18.321V15.5193C9.23926 15.0569 9.58948 14.8188 9.9397 14.8188C10.2899 14.8188 10.6401 15.057 10.6401 15.5193Z" fill="#994C0F"/>
|
||||
<path d="M12.0408 14.1184C12.0408 15.2811 11.1023 16.2197 9.93945 16.2197V12.0171C11.1023 12.0171 12.0408 12.9556 12.0408 14.1184Z" fill="#713708"/>
|
||||
<path d="M10.6399 15.5193V18.321C10.6399 18.7833 10.2897 19.0215 9.93945 19.0215V14.8188C10.2897 14.8188 10.6399 15.057 10.6399 15.5193Z" fill="#713708"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,79 @@
|
||||
<svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.4237 8.60962C18.0265 8.60962 17.7046 8.9316 17.7046 9.32874V12.838C17.7046 14.1096 17.3186 15.3286 16.5885 16.3636C15.874 17.3765 14.8857 18.1408 13.7305 18.574C13.3586 18.7134 13.1702 19.1279 13.3097 19.4998C13.4179 19.7886 13.6919 19.9667 13.9831 19.9667C14.067 19.9667 14.1523 19.9519 14.2355 19.9207C15.662 19.3858 16.8821 18.4424 17.7638 17.1926C18.666 15.9138 19.1428 14.408 19.1428 12.838V9.32874C19.1428 8.93156 18.8208 8.60962 18.4237 8.60962Z" fill="url(#paint0_linear_2131_6327)"/>
|
||||
<path d="M4.73865 10.0478C5.13583 10.0478 5.45777 9.72583 5.45777 9.32869C5.45777 5.95205 8.20489 3.20489 11.5816 3.20489C13.7997 3.20489 15.85 4.40934 16.9326 6.34821C17.1261 6.69496 17.5642 6.81918 17.9111 6.62554C18.2578 6.43194 18.382 5.99381 18.1884 5.64706C16.852 3.25353 14.3204 1.7666 11.5816 1.7666C7.41185 1.7666 4.01953 5.15892 4.01953 9.32865C4.01953 9.72583 4.34147 10.0478 4.73865 10.0478Z" fill="url(#paint1_linear_2131_6327)"/>
|
||||
<path d="M11.5816 18.9621C8.20489 18.9621 5.45777 16.2149 5.45777 12.8383C5.45777 12.4411 5.13583 12.1191 4.73865 12.1191C4.34152 12.1191 4.01953 12.4411 4.01953 12.8383C4.01953 17.008 7.41185 20.4003 11.5816 20.4003C11.9788 20.4003 12.3007 20.0783 12.3007 19.6812C12.3007 19.2841 11.9788 18.9621 11.5816 18.9621Z" fill="url(#paint2_linear_2131_6327)"/>
|
||||
<path d="M8.62749 7.29413C8.88974 6.99585 8.86056 6.54144 8.56228 6.27919C8.264 6.01694 7.80964 6.04609 7.54739 6.34441C6.68557 7.32455 6.21094 8.58376 6.21094 9.89013V12.276C6.21094 14.0044 7.05084 15.6379 8.45769 16.6454C8.5845 16.7362 8.73086 16.78 8.87581 16.78C9.09991 16.78 9.32066 16.6756 9.46111 16.4795C9.69235 16.1566 9.61808 15.7074 9.29517 15.4762C8.26451 14.738 7.64922 13.5416 7.64922 12.276V9.89013C7.64922 8.93357 7.99661 8.01159 8.62749 7.29413Z" fill="url(#paint3_linear_2131_6327)"/>
|
||||
<path d="M11.5814 17.6477C14.058 17.6477 16.2023 15.9706 16.7961 13.5693C16.8914 13.1837 16.6561 12.7939 16.2706 12.6986C15.8853 12.6036 15.4952 12.8385 15.3999 13.2241C14.9652 14.9818 13.3951 16.2095 11.5814 16.2095C11.1843 16.2095 10.8623 16.5314 10.8623 16.9286C10.8623 17.3257 11.1843 17.6477 11.5814 17.6477Z" fill="url(#paint4_linear_2131_6327)"/>
|
||||
<path d="M16.9524 9.89051C16.9524 6.92872 14.5427 4.51904 11.5809 4.51904C10.9854 4.51904 10.4 4.61603 9.84099 4.80738C9.46522 4.93598 9.26483 5.3448 9.39343 5.72061C9.52202 6.09633 9.93093 6.29669 10.3067 6.16809C10.7154 6.02819 11.1441 5.95729 11.5809 5.95729C13.7497 5.95729 15.5141 7.72167 15.5141 9.89046V11.2558C15.5141 11.653 15.836 11.975 16.2332 11.975C16.6304 11.975 16.9523 11.653 16.9523 11.2558V9.89051H16.9524Z" fill="url(#paint5_linear_2131_6327)"/>
|
||||
<path d="M9.86407 13.0202V10.4587C9.86407 9.51182 10.6344 8.74151 11.5812 8.74151C12.528 8.74151 13.2984 9.51182 13.2984 10.4587V11.708C13.2984 11.8394 13.2963 12.6113 13.2936 12.717C13.267 13.1317 12.9363 13.1676 12.7938 13.1635C12.6781 13.1602 12.3003 13.1146 12.3003 12.6653V11.0833C12.3003 10.6862 11.9783 10.3642 11.5812 10.3642C11.1841 10.3642 10.8621 10.6862 10.8621 11.0833V12.6653C10.8621 13.9011 11.8135 14.5746 12.7533 14.6012C12.7724 14.6017 12.7915 14.602 12.8107 14.602C13.7231 14.602 14.6623 13.9894 14.73 12.7923C14.7355 12.6941 14.7366 11.7177 14.7366 11.708V10.4587C14.7366 8.71874 13.3211 7.30322 11.5812 7.30322C9.84129 7.30322 8.42578 8.71874 8.42578 10.4587V13.0202C8.42578 13.4173 8.74772 13.7393 9.1449 13.7393C9.54212 13.7393 9.86407 13.4174 9.86407 13.0202Z" fill="url(#paint6_linear_2131_6327)"/>
|
||||
<path d="M4.34854 0.25H2.51316C1.53939 0.25 0.75 1.03939 0.75 2.01316V3.84854C0.75 4.26836 1.09034 4.60874 1.5102 4.60874C1.93007 4.60874 2.27041 4.2684 2.27041 3.84854V2.27804C2.27041 1.99769 2.49769 1.77041 2.77804 1.77041H4.34854C4.76836 1.77041 5.10874 1.43007 5.10874 1.0102C5.10874 0.590337 4.76836 0.25 4.34854 0.25Z" fill="url(#paint7_linear_2131_6327)"/>
|
||||
<path d="M22.4164 18.3181V20.1534C22.4164 21.1272 21.627 21.9166 20.6532 21.9166H18.8178C18.398 21.9166 18.0576 21.5763 18.0576 21.1564C18.0576 20.7365 18.398 20.3962 18.8178 20.3962H20.3883C20.6687 20.3962 20.896 20.1689 20.896 19.8886V18.3181C20.896 17.8982 21.2363 17.5579 21.6562 17.5579C22.076 17.5579 22.4164 17.8982 22.4164 18.3181Z" fill="url(#paint8_linear_2131_6327)"/>
|
||||
<path d="M22.4164 3.84854V2.01316C22.4164 1.03939 21.627 0.25 20.6532 0.25H18.8178C18.398 0.25 18.0576 0.590337 18.0576 1.0102C18.0576 1.43007 18.398 1.77041 18.8178 1.77041H20.3883C20.6687 1.77041 20.896 1.99769 20.896 2.27804V3.84854C20.896 4.26836 21.2363 4.60874 21.6562 4.60874C22.076 4.60874 22.4164 4.26836 22.4164 3.84854Z" fill="url(#paint9_linear_2131_6327)"/>
|
||||
<path d="M4.34854 21.9166H2.51316C1.53939 21.9166 0.75 21.1272 0.75 20.1534V18.3181C0.75 17.8982 1.09034 17.5579 1.5102 17.5579C1.93007 17.5579 2.27041 17.8982 2.27041 18.3181V19.8886C2.27041 20.1689 2.49769 20.3962 2.77804 20.3962H4.34854C4.76836 20.3962 5.10874 20.7365 5.10874 21.1564C5.10874 21.5763 4.76836 21.9166 4.34854 21.9166Z" fill="url(#paint10_linear_2131_6327)"/>
|
||||
<path d="M5.10975 1.00998C5.10975 1.43015 4.76946 1.77044 4.34929 1.77044H2.7791C2.4987 1.77044 2.27142 1.99773 2.27142 2.27812V3.84832C2.27142 4.05818 2.18645 4.24851 2.0488 4.38616C1.91115 4.52381 1.72125 4.60877 1.51096 4.60877C1.50713 4.60877 1.50331 4.60877 1.49949 4.60835C1.4553 4.51573 1.43066 4.41207 1.43066 4.30247V2.5823C1.43066 1.66975 2.17073 0.929688 3.08328 0.929688H4.80344C4.91305 0.929688 5.01671 0.954328 5.10932 0.998511C5.10975 1.00233 5.10975 1.00616 5.10975 1.00998Z" fill="url(#paint11_linear_2131_6327)"/>
|
||||
<path d="M21.7387 17.8642V19.5843C21.7387 20.4969 20.9986 21.2369 20.086 21.2369H18.3659C18.2563 21.2369 18.1526 21.2123 18.06 21.1681C18.0596 21.1643 18.0596 21.1605 18.0596 21.1567C18.0596 20.9464 18.1445 20.7565 18.2822 20.6188C18.4198 20.4812 18.6102 20.3962 18.82 20.3962H20.3902C20.6706 20.3962 20.8979 20.1689 20.8979 19.8885V18.3183C20.8979 17.8982 21.2382 17.5579 21.6584 17.5579C21.6622 17.5579 21.666 17.5579 21.6698 17.5583C21.714 17.6509 21.7387 17.7546 21.7387 17.8642Z" fill="url(#paint12_linear_2131_6327)"/>
|
||||
<path d="M21.7387 2.5823V4.30247C21.7387 4.41207 21.714 4.51573 21.6698 4.60835C21.666 4.60877 21.6622 4.60877 21.6584 4.60877C21.2382 4.60877 20.8979 4.26848 20.8979 3.84832V2.27812C20.8979 1.99773 20.6706 1.77044 20.3902 1.77044H18.82C18.6102 1.77044 18.4198 1.68547 18.2822 1.54782C18.1445 1.41018 18.0596 1.22028 18.0596 1.00998C18.0596 1.00616 18.0596 1.00233 18.06 0.998511C18.1526 0.954328 18.2563 0.929688 18.3659 0.929688H20.086C20.9986 0.929688 21.7387 1.66975 21.7387 2.5823Z" fill="url(#paint13_linear_2131_6327)"/>
|
||||
<path d="M5.10975 21.1567C5.10975 21.1605 5.10975 21.1643 5.10932 21.1681C5.01671 21.2123 4.91305 21.2369 4.80344 21.2369H3.08328C2.17073 21.2369 1.43066 20.4969 1.43066 19.5843V17.8642C1.43066 17.7546 1.4553 17.6509 1.49949 17.5583C1.50331 17.5579 1.50713 17.5579 1.51096 17.5579C1.72125 17.5579 1.91115 17.6428 2.0488 17.7805C2.18645 17.9181 2.27142 18.1084 2.27142 18.3183V19.8885C2.27142 20.1689 2.4987 20.3962 2.7791 20.3962H4.34929C4.76946 20.3962 5.10975 20.7365 5.10975 21.1567Z" fill="url(#paint14_linear_2131_6327)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_2131_6327" x1="14.1897" y1="11.4734" x2="18.3533" y2="17.2935" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E6EEFF"/>
|
||||
<stop offset="1" stop-color="#BAC8FA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_2131_6327" x1="7.70304" y1="2.80873" x2="12.9675" y2="10.1677" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E6EEFF"/>
|
||||
<stop offset="1" stop-color="#BAC8FA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_2131_6327" x1="4.44594" y1="12.1634" x2="10.8375" y2="21.0978" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E6EEFF"/>
|
||||
<stop offset="1" stop-color="#BAC8FA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint3_linear_2131_6327" x1="5.64255" y1="7.68392" x2="11.1198" y2="15.3403" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E6EEFF"/>
|
||||
<stop offset="1" stop-color="#BAC8FA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint4_linear_2131_6327" x1="13.3501" y1="14.4784" x2="14.8368" y2="16.5565" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E6EEFF"/>
|
||||
<stop offset="1" stop-color="#BAC8FA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint5_linear_2131_6327" x1="11.0031" y1="3.9385" x2="16.6547" y2="11.8386" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E6EEFF"/>
|
||||
<stop offset="1" stop-color="#BAC8FA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint6_linear_2131_6327" x1="9.32435" y1="8.19478" x2="13.7564" y2="14.3901" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E6EEFF"/>
|
||||
<stop offset="1" stop-color="#BAC8FA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint7_linear_2131_6327" x1="2.92937" y1="0.826546" x2="2.92937" y2="4.29691" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint8_linear_2131_6327" x1="18.9886" y1="18.4888" x2="23.0937" y2="22.5939" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint9_linear_2131_6327" x1="19.5301" y1="0.597134" x2="24.6522" y2="5.71913" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint10_linear_2131_6327" x1="0.462343" y1="18.3956" x2="5.11808" y2="23.0513" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint11_linear_2131_6327" x1="4.40452" y1="3.90354" x2="0.237638" y2="-0.263339" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint12_linear_2131_6327" x1="22.0998" y1="21.5981" x2="15.9395" y2="15.4378" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint13_linear_2131_6327" x1="19.0834" y1="3.58492" x2="22.5889" y2="0.0794194" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint14_linear_2131_6327" x1="5.51653" y1="22.8014" x2="-2.91716" y2="14.3677" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A7B7F1"/>
|
||||
<stop offset="1" stop-color="#406CB9"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,13 @@
|
||||
<svg width="20" height="23" viewBox="0 0 20 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.6979 14.8195V6.00345C16.6979 3.01009 14.2713 0.583496 11.278 0.583496H8.87646C5.8831 0.583496 3.4565 3.01009 3.4565 6.00345V14.8195C3.4565 16.1238 2.47353 17.1985 1.20798 17.3434L1.20511 17.3437C1.04037 17.3625 0.916016 17.5018 0.916016 17.6676V17.8004C0.916016 20.5012 3.10543 22.2502 5.80615 22.2502H14.3482C16.9305 22.2502 19.0453 20.2487 19.2259 17.7124C19.2392 17.5254 19.102 17.3628 18.916 17.3397C18.9149 17.3396 18.9138 17.3394 18.9128 17.3393C17.6635 17.1795 16.6979 16.1123 16.6979 14.8195Z" fill="#766E6E"/>
|
||||
<path d="M18.9163 17.3397C18.9152 17.3396 18.9141 17.3394 18.913 17.3393C17.6637 17.1795 16.6982 16.1123 16.6982 14.8195V6.00345C16.6982 3.01009 14.2716 0.583496 11.2782 0.583496H8.87672C8.78741 0.583496 8.6986 0.585802 8.61035 0.590077C11.48 0.728999 13.7639 3.0994 13.7639 6.00345V14.8195C13.7639 16.1122 14.7295 17.1794 15.9788 17.3393C16.168 17.3631 16.3052 17.5313 16.2912 17.7216C16.1062 20.2534 13.9934 22.2501 11.4142 22.2501H14.3485C16.9308 22.2501 19.0455 20.2486 19.2261 17.7123C19.2395 17.5254 19.1023 17.3628 18.9163 17.3397Z" fill="#5B5353"/>
|
||||
<path d="M9.13211 10.0019C8.73554 10.9227 7.52635 11.2869 6.43133 10.8153C5.33632 10.3437 4.77005 9.21493 5.16663 8.2941C5.56321 7.37327 6.56221 7.49707 7.65728 7.96862C8.75236 8.44017 9.52869 9.08107 9.13211 10.0019Z" fill="#FFCBBE"/>
|
||||
<path d="M7.6557 7.96894C6.96722 7.67242 6.31676 7.51365 5.83008 7.66534C6.11687 7.72687 6.42351 7.83339 6.73814 7.96894C7.83321 8.44055 8.60955 9.08134 8.21297 10.0022C7.99103 10.5175 7.51447 10.8584 6.9459 10.976C7.88152 11.1602 8.79566 10.7796 9.13053 10.0022C9.52711 9.08134 8.75072 8.44049 7.6557 7.96894Z" fill="#FFA68D"/>
|
||||
<path d="M10.8825 10.0024C11.279 10.9232 12.4882 11.2874 13.5833 10.8158C14.6783 10.3442 15.2445 9.21542 14.848 8.29459C14.4514 7.37376 13.4524 7.49756 12.3573 7.96911C11.2622 8.44066 10.4859 9.08156 10.8825 10.0024Z" fill="#FFCBBE"/>
|
||||
<path d="M14.8478 8.29425C14.5702 7.64952 13.997 7.51729 13.3024 7.65757C13.6019 7.74317 13.8419 7.94211 13.9936 8.29425C14.3901 9.21508 13.8239 10.3438 12.7289 10.8154C12.5475 10.8936 12.363 10.9482 12.1797 10.9818C12.6194 11.0662 13.1118 11.0184 13.5831 10.8154C14.6782 10.3439 15.2444 9.21508 14.8478 8.29425Z" fill="#FFA68D"/>
|
||||
<path d="M12.876 9.90768C13.2033 9.90768 13.4687 9.64229 13.4687 9.31492C13.4687 8.98755 13.2033 8.72217 12.876 8.72217C12.5486 8.72217 12.2832 8.98755 12.2832 9.31492C12.2832 9.64229 12.5486 9.90768 12.876 9.90768Z" fill="#873E2F"/>
|
||||
<path d="M7.1367 9.90768C7.46407 9.90768 7.72946 9.64229 7.72946 9.31492C7.72946 8.98755 7.46407 8.72217 7.1367 8.72217C6.80933 8.72217 6.54395 8.98755 6.54395 9.31492C6.54395 9.64229 6.80933 9.90768 7.1367 9.90768Z" fill="#873E2F"/>
|
||||
<path d="M8.00147 15.1972C7.6527 15.1972 7.30764 15.042 7.0771 14.7452C6.6808 14.2351 6.77304 13.5004 7.28312 13.1041C7.99174 12.5535 9.00801 12.2378 10.0713 12.2378C11.1347 12.2378 12.1509 12.5535 12.8595 13.1041C13.3695 13.5004 13.4618 14.2352 13.0655 14.7452C12.6691 15.2553 11.9344 15.3475 11.4244 14.9512C11.1915 14.7702 10.7137 14.5768 10.0713 14.5768C9.42888 14.5768 8.95109 14.7702 8.71818 14.9512C8.50485 15.1169 8.2522 15.1972 8.00147 15.1972Z" fill="#FFCBBE"/>
|
||||
<path d="M12.8596 13.1041C12.151 12.5535 11.1348 12.2378 10.0714 12.2378C9.87185 12.2378 9.67398 12.2489 9.47949 12.2706C10.3215 12.3646 11.1001 12.6569 11.6758 13.1041C12.1858 13.5004 12.278 14.2352 11.8817 14.7452C11.7879 14.866 11.6748 14.9624 11.5505 15.0354C12.0496 15.3291 12.7007 15.2147 13.0656 14.7452C13.4619 14.2352 13.3696 13.5004 12.8596 13.1041Z" fill="#FFA68D"/>
|
||||
<path d="M11.2576 13.8996C11.3899 13.8996 11.4434 13.7267 11.3328 13.6541C10.9834 13.4246 10.5459 13.2881 10.0708 13.2881C9.59561 13.2881 9.15809 13.4246 8.8087 13.6541C8.69813 13.7267 8.75161 13.8996 8.88396 13.8996H11.2576Z" fill="#DA4A54"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.8 KiB |
149
assets/icons/functions_icons/automation_functions/lock_alarm.svg
Normal file
@ -0,0 +1,149 @@
|
||||
<svg width="22" height="23" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.6051 16.4211L10.9069 18.2394C10.5327 19.214 9.43934 19.7006 8.4648 19.3264L7.39797 18.9168C6.42344 18.5426 5.93679 17.4492 6.31096 16.4747L7.00916 14.6564L5.88469 14.2246L4.90351 16.7798C4.43066 18.0113 5.04562 19.393 6.27715 19.8659L8.66239 20.7818C9.89387 21.2546 11.2756 20.6397 11.7484 19.4081L12.7296 16.8529L11.6051 16.4211Z" fill="url(#paint0_linear_2131_6111)"/>
|
||||
<path d="M11.6051 16.4211L10.9069 18.2394C10.5327 19.214 9.43934 19.7006 8.4648 19.3264L7.39797 18.9168C6.42344 18.5426 5.93679 17.4492 6.31096 16.4747L7.00916 14.6564L5.88469 14.2246L4.90351 16.7798C4.43066 18.0113 5.04562 19.393 6.27715 19.8659L8.66239 20.7818C9.89387 21.2546 11.2756 20.6397 11.7484 19.4081L12.7296 16.8529L11.6051 16.4211Z" fill="url(#paint1_linear_2131_6111)"/>
|
||||
<path d="M11.6051 16.4211L10.9069 18.2394C10.5327 19.214 9.43934 19.7006 8.4648 19.3264L7.39797 18.9168C6.42344 18.5426 5.93679 17.4492 6.31096 16.4747L7.00916 14.6564L5.88469 14.2246L4.90351 16.7798C4.43066 18.0113 5.04562 19.393 6.27715 19.8659L8.66239 20.7818C9.89387 21.2546 11.2756 20.6397 11.7484 19.4081L12.7296 16.8529L11.6051 16.4211Z" fill="url(#paint2_linear_2131_6111)"/>
|
||||
<path d="M10.9069 18.2397C10.5326 19.2142 9.43929 19.7009 8.46475 19.3267L7.625 19.0042V20.3837L8.66233 20.782C9.89386 21.2549 11.2755 20.6399 11.7484 19.4084L12.7296 16.8532L11.6051 16.4214L10.9069 18.2397Z" fill="url(#paint3_linear_2131_6111)"/>
|
||||
<path d="M12.3072 15.9595H5.08154C2.7357 15.9595 0.833984 14.0578 0.833984 11.7119C0.833984 9.36607 2.73566 7.46436 5.08154 7.46436H12.3072V15.9595Z" fill="url(#paint4_linear_2131_6111)"/>
|
||||
<path d="M12.3072 15.9595H5.08154C2.7357 15.9595 0.833984 14.0578 0.833984 11.7119C0.833984 9.36607 2.73566 7.46436 5.08154 7.46436H12.3072V15.9595Z" fill="url(#paint5_linear_2131_6111)"/>
|
||||
<path d="M13.5609 3.77436L10.4041 4.99633L5.89782 6.74054C5.12734 7.03875 4.55737 7.70475 4.38645 8.51306C4.18658 9.45814 4.07617 10.4952 4.07617 11.5833C4.07617 12.6711 4.18658 13.7081 4.38649 14.6532C4.55745 15.4614 5.1273 16.1274 5.8977 16.4256L10.4042 18.1703L13.5609 19.3923C14.7653 19.8741 16.0843 20.2795 17.4928 20.5943V2.57178C16.0843 2.88658 14.7652 3.29249 13.5609 3.77436Z" fill="url(#paint6_linear_2131_6111)"/>
|
||||
<path d="M5.47842 13.6268C5.20285 13.6268 4.97949 13.4034 4.97949 13.1279V10.0385C4.97949 9.7629 5.20289 9.53955 5.47842 9.53955C5.75399 9.53955 5.97734 9.76295 5.97734 10.0385V13.1279C5.97734 13.4034 5.75395 13.6268 5.47842 13.6268Z" fill="url(#paint7_linear_2131_6111)"/>
|
||||
<path d="M13.5609 3.77436L10.4041 4.99633L5.89782 6.74054C5.12734 7.03875 4.55737 7.70475 4.38645 8.51306C4.18658 9.45814 4.07617 10.4952 4.07617 11.5833C4.07617 12.6711 4.18658 13.7081 4.38649 14.6532C4.55745 15.4614 5.1273 16.1274 5.8977 16.4256L10.4042 18.1703L13.5609 19.3923C14.7653 19.8741 16.0843 20.2795 17.4928 20.5943V2.57178C16.0843 2.88658 14.7652 3.29249 13.5609 3.77436Z" fill="url(#paint8_linear_2131_6111)"/>
|
||||
<path d="M10.4036 4.99633L7.41699 6.15232V17.014L10.4036 18.1703L13.5604 19.3922C14.7647 19.8741 16.0837 20.2795 17.4922 20.5943V2.57178C16.0838 2.88658 14.7647 3.29249 13.5604 3.77436L10.4036 4.99633Z" fill="url(#paint9_linear_2131_6111)"/>
|
||||
<path d="M16.0542 22.4167C18.9642 22.4167 21.3232 17.5664 21.3232 11.5833C21.3232 5.60025 18.9642 0.75 16.0542 0.75C13.1442 0.75 10.7852 5.60025 10.7852 11.5833C10.7852 17.5664 13.1442 22.4167 16.0542 22.4167Z" fill="url(#paint10_linear_2131_6111)"/>
|
||||
<path d="M16.0546 0.75C15.0063 0.75 14.0297 1.37943 13.209 2.46429V20.7024C14.0297 21.7872 15.0063 22.4167 16.0546 22.4167C18.9646 22.4167 21.3236 17.5664 21.3236 11.5833C21.3236 5.60024 18.9646 0.75 16.0546 0.75Z" fill="url(#paint11_linear_2131_6111)"/>
|
||||
<path d="M16.4459 20.4539C18.6122 20.4539 20.3683 16.4824 20.3683 11.5834C20.3683 6.68435 18.6122 2.71289 16.4459 2.71289C14.2796 2.71289 12.5234 6.68435 12.5234 11.5834C12.5234 16.4824 14.2796 20.4539 16.4459 20.4539Z" fill="url(#paint12_linear_2131_6111)"/>
|
||||
<path d="M16.4459 20.4539C18.6122 20.4539 20.3683 16.4824 20.3683 11.5834C20.3683 6.68435 18.6122 2.71289 16.4459 2.71289C14.2796 2.71289 12.5234 6.68435 12.5234 11.5834C12.5234 16.4824 14.2796 20.4539 16.4459 20.4539Z" fill="url(#paint13_linear_2131_6111)"/>
|
||||
<path d="M10.7939 12.2056C10.9509 17.8989 13.2457 22.4163 16.0541 22.4163C18.8625 22.4163 21.1573 17.8989 21.3143 12.2056H10.7939Z" fill="url(#paint14_linear_2131_6111)"/>
|
||||
<path d="M20.35 12.4394L16.9868 9.07617H12.6826C12.5792 9.87136 12.5234 10.7128 12.5234 11.5837C12.5234 16.4827 14.2796 20.4542 16.4458 20.4542C18.4844 20.4542 20.1596 16.9369 20.35 12.4394Z" fill="url(#paint15_linear_2131_6111)"/>
|
||||
<path d="M14.3977 7.979C13.8201 7.979 13.2746 8.11561 12.7907 8.35716C12.7907 8.35716 12.4648 9.35869 12.4648 11.5833C12.4648 13.808 12.7907 14.8095 12.7907 14.8095C13.2746 15.0511 13.8201 15.1877 14.3977 15.1877C16.3883 15.1877 18.002 13.574 18.002 11.5833C18.002 9.59271 16.3882 7.979 14.3977 7.979Z" fill="url(#paint16_linear_2131_6111)"/>
|
||||
<path d="M14.3977 7.979C13.8201 7.979 13.2746 8.11561 12.7907 8.35716C12.7907 8.35716 12.4648 9.35869 12.4648 11.5833C12.4648 13.808 12.7907 14.8095 12.7907 14.8095C13.2746 15.0511 13.8201 15.1877 14.3977 15.1877C16.3883 15.1877 18.002 13.574 18.002 11.5833C18.002 9.59271 16.3882 7.979 14.3977 7.979Z" fill="url(#paint17_linear_2131_6111)"/>
|
||||
<path d="M12.4648 11.5834C12.4648 13.8081 12.7907 14.8096 12.7907 14.8096C13.2746 15.0511 13.8201 15.1877 14.3977 15.1877C16.3883 15.1877 18.002 13.574 18.002 11.5834C18.002 11.299 17.968 11.0227 17.9058 10.7573H12.4809C12.4708 11.0114 12.4648 11.2861 12.4648 11.5834Z" fill="url(#paint18_linear_2131_6111)"/>
|
||||
<path d="M14.3984 7.979C14.3683 7.979 14.3386 7.98091 14.3086 7.98163V15.185C14.3386 15.1857 14.3682 15.1876 14.3984 15.1876C16.389 15.1876 18.0027 13.5739 18.0027 11.5833C18.0027 9.59266 16.389 7.979 14.3984 7.979Z" fill="url(#paint19_linear_2131_6111)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_2131_6111" x1="8.33495" y1="18.5255" x2="7.93835" y2="19.9326" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFA1AE"/>
|
||||
<stop offset="1" stop-color="#FF4565"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_2131_6111" x1="7.83854" y1="18.9732" x2="8.77245" y2="16.9186" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_2131_6111" x1="7.93046" y1="19.317" x2="7.58857" y2="20.2823" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint3_linear_2131_6111" x1="10.3205" y1="18.7064" x2="11.7732" y2="19.5988" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint4_linear_2131_6111" x1="6.57062" y1="8.95859" x2="6.57062" y2="14.5106" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#5A5A5A"/>
|
||||
<stop offset="1" stop-color="#444444"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint5_linear_2131_6111" x1="2.12573" y1="10.3384" x2="4.84075" y2="10.9267" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#433F43" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#1A1A1A"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint6_linear_2131_6111" x1="10.7845" y1="7.58913" x2="10.7845" y2="14.4651" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFA1AE"/>
|
||||
<stop offset="1" stop-color="#FF4565"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint7_linear_2131_6111" x1="5.77189" y1="11.5832" x2="4.69423" y2="11.5832" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFA1AE"/>
|
||||
<stop offset="1" stop-color="#FF4565"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint8_linear_2131_6111" x1="11.5427" y1="12.8003" x2="9.95893" y2="17.3253" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint9_linear_2131_6111" x1="9.08418" y1="11.4694" x2="12.4327" y2="11.5147" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint10_linear_2131_6111" x1="11.322" y1="11.5833" x2="21.1226" y2="11.5833" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFA1AE"/>
|
||||
<stop offset="1" stop-color="#FF4565"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint11_linear_2131_6111" x1="17.3182" y1="11.5833" x2="21.7048" y2="11.5833" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint12_linear_2131_6111" x1="7.16271" y1="9.52338" x2="21.9392" y2="12.8024" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint13_linear_2131_6111" x1="18.0646" y1="11.5834" x2="12.4647" y2="11.5834" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint14_linear_2131_6111" x1="17.0164" y1="16.1215" x2="20.3162" y2="20.6042" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint15_linear_2131_6111" x1="18.3045" y1="16.7939" x2="14.7764" y2="13.1413" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FE0364" stop-opacity="0"/>
|
||||
<stop offset="0.2343" stop-color="#F90362" stop-opacity="0.234"/>
|
||||
<stop offset="0.5173" stop-color="#EA035B" stop-opacity="0.517"/>
|
||||
<stop offset="0.8243" stop-color="#D20250" stop-opacity="0.824"/>
|
||||
<stop offset="1" stop-color="#C00148"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint16_linear_2131_6111" x1="13.686" y1="10.0411" x2="16.0311" y2="13.6314" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#F5FBFF"/>
|
||||
<stop offset="1" stop-color="#DBD5EF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint17_linear_2131_6111" x1="15.8519" y1="11.3686" x2="12.1993" y2="11.9082" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#DBD5EF" stop-opacity="0"/>
|
||||
<stop offset="0.2853" stop-color="#D9D2EE" stop-opacity="0.285"/>
|
||||
<stop offset="0.4739" stop-color="#D4C9E9" stop-opacity="0.474"/>
|
||||
<stop offset="0.6346" stop-color="#CBBAE2" stop-opacity="0.635"/>
|
||||
<stop offset="0.7795" stop-color="#BFA5D7" stop-opacity="0.78"/>
|
||||
<stop offset="0.9126" stop-color="#AF8ACA" stop-opacity="0.913"/>
|
||||
<stop offset="1" stop-color="#A274BF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint18_linear_2131_6111" x1="15.2334" y1="11.795" x2="15.2334" y2="15.2816" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#DBD5EF" stop-opacity="0"/>
|
||||
<stop offset="0.2853" stop-color="#D9D2EE" stop-opacity="0.285"/>
|
||||
<stop offset="0.4739" stop-color="#D4C9E9" stop-opacity="0.474"/>
|
||||
<stop offset="0.6346" stop-color="#CBBAE2" stop-opacity="0.635"/>
|
||||
<stop offset="0.7795" stop-color="#BFA5D7" stop-opacity="0.78"/>
|
||||
<stop offset="0.9126" stop-color="#AF8ACA" stop-opacity="0.913"/>
|
||||
<stop offset="1" stop-color="#A274BF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint19_linear_2131_6111" x1="14.3425" y1="11.0266" x2="17.6216" y2="13.7661" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#DBD5EF" stop-opacity="0"/>
|
||||
<stop offset="0.2853" stop-color="#D9D2EE" stop-opacity="0.285"/>
|
||||
<stop offset="0.4739" stop-color="#D4C9E9" stop-opacity="0.474"/>
|
||||
<stop offset="0.6346" stop-color="#CBBAE2" stop-opacity="0.635"/>
|
||||
<stop offset="0.7795" stop-color="#BFA5D7" stop-opacity="0.78"/>
|
||||
<stop offset="0.9126" stop-color="#AF8ACA" stop-opacity="0.913"/>
|
||||
<stop offset="1" stop-color="#A274BF"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 13 KiB |
14
assets/icons/functions_icons/automation_functions/motion.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.6376 6.30312C16.0754 5.97851 15.3565 6.17117 15.0319 6.73336L13.9543 8.5998C13.8964 8.70015 13.7427 8.63652 13.7727 8.5246L14.64 5.28773C14.808 4.66066 14.4359 4.01613 13.8089 3.84813C13.1818 3.68012 12.5373 4.05223 12.3693 4.6793L11.2191 8.97183C11.1891 9.08378 11.0242 9.06206 11.0242 8.94616V3.96016C11.0242 3.31969 10.5221 2.77828 9.8818 2.76071C9.21755 2.7425 8.67333 3.27555 8.67333 3.9357V8.93913C8.67333 9.05503 8.50848 9.07671 8.47849 8.9648L7.33653 4.70293C7.17075 4.08426 6.5456 3.69129 5.92263 3.84004C5.2763 3.99438 4.88857 4.65012 5.05943 5.28777L6.98306 12.4668C6.99306 12.5041 6.98341 12.5455 6.95407 12.5706C6.91439 12.6046 6.85689 12.6013 6.82142 12.5658L5.36021 11.1046C4.62787 10.3723 3.44045 10.3723 2.7081 11.1046C2.30303 11.5097 2.30303 12.1665 2.7081 12.5715L6.09368 15.9571C6.09368 15.9571 6.76001 16.574 7.39622 17.163C7.69571 17.4403 7.86591 17.8298 7.86591 18.2379V19.6558C7.86591 19.8459 8.02005 20.0001 8.2102 20.0001H13.8934C14.0836 20.0001 14.2377 19.8459 14.2377 19.6558V18.2049C14.2377 17.8588 14.3605 17.5233 14.5873 17.2619C15.2967 16.4442 15.7259 15.377 15.7259 14.2096V10.5709C15.7259 10.3495 15.7842 10.1319 15.8949 9.94019L17.0677 7.90882C17.3924 7.3466 17.1998 6.62769 16.6376 6.30312Z" fill="#EB9C8D"/>
|
||||
<path d="M16.6369 6.30318C16.4275 6.18232 16.1964 6.13318 15.9721 6.1481C16.0778 6.45798 16.0544 6.81013 15.8778 7.11599L15.0957 8.47056C14.729 9.10568 14.536 9.82614 14.536 10.5595V13.4168C14.536 14.5124 14.1579 15.5197 13.5251 16.3154C13.2211 16.6975 13.0478 17.1669 13.0478 17.6552V18.1918C13.0478 18.7526 12.5931 19.2073 12.0323 19.2073H7.86523V19.6559C7.86523 19.846 8.01937 20.0002 8.20953 20.0002H13.8928C14.083 20.0002 14.2371 19.846 14.2371 19.6559V18.205C14.2371 17.8589 14.3599 17.5234 14.5867 17.2619C15.296 16.4443 15.7253 15.3771 15.7253 14.2097V10.5709C15.7253 10.3495 15.7836 10.132 15.8943 9.94028L17.0671 7.90892C17.3917 7.34666 17.199 6.62779 16.6369 6.30318Z" fill="#D78878"/>
|
||||
<path d="M18.1332 8.82153C18.0828 8.82153 18.0316 8.80867 17.9848 8.78164C17.8426 8.69953 17.7939 8.51774 17.876 8.37551C18.4575 7.36813 18.1112 6.0754 17.1038 5.4938C16.9616 5.41169 16.9129 5.22985 16.995 5.08767C17.077 4.94544 17.2588 4.89677 17.4011 4.97884C18.6924 5.72434 19.1364 7.38149 18.3909 8.67285C18.3359 8.76824 18.2359 8.82153 18.1332 8.82153Z" fill="#E94444"/>
|
||||
<path d="M15.9106 5.21552C15.7502 5.21552 15.618 5.08775 15.6135 4.92642C15.5879 4.00006 14.9452 3.18568 14.0505 2.94592C13.8919 2.90342 13.7978 2.74037 13.8403 2.58178C13.8827 2.42319 14.0458 2.32901 14.2044 2.37155C15.3512 2.67881 16.1751 3.72268 16.2079 4.90998C16.2124 5.07408 16.0831 5.21088 15.9189 5.21541C15.9162 5.21549 15.9134 5.21552 15.9106 5.21552Z" fill="#FFC344"/>
|
||||
<path d="M7.61372 3.338C7.57681 3.338 7.53927 3.33109 7.5029 3.31648C7.35056 3.25523 7.27669 3.08207 7.33794 2.92968C7.75267 1.89808 8.73798 1.23145 9.84809 1.23145C10.0123 1.23145 10.1454 1.36453 10.1454 1.52875C10.1454 1.69297 10.0123 1.82605 9.84809 1.82605C8.98208 1.82605 8.21337 2.34629 7.88966 3.15148C7.84306 3.2675 7.73153 3.338 7.61372 3.338Z" fill="#E94444"/>
|
||||
<path d="M3.86829 5.90389C3.737 5.90389 3.61688 5.81627 3.58129 5.68346C3.39462 4.98674 3.4909 4.25818 3.85243 3.63205C4.21395 3.00592 4.79672 2.55823 5.49344 2.37155C5.65195 2.32901 5.81508 2.42315 5.85758 2.58178C5.90008 2.74038 5.80594 2.90346 5.64731 2.94592C5.10403 3.09147 4.6495 3.44076 4.36739 3.92936C4.08528 4.41795 4.01008 4.98623 4.15567 5.52951C4.19817 5.6881 4.10403 5.85119 3.9454 5.89365C3.91969 5.9006 3.89379 5.90389 3.86829 5.90389Z" fill="#FFC344"/>
|
||||
<path d="M0.297178 10.5924C0.253076 10.5924 0.20835 10.5826 0.166123 10.5618C0.0187797 10.4893 -0.0418842 10.3111 0.0306156 10.1638C0.214131 9.79076 0.458115 9.45069 0.755731 9.15303C0.928739 8.98002 1.11589 8.81991 1.31206 8.67709C1.44487 8.58041 1.63081 8.60975 1.72741 8.74248C1.82405 8.87522 1.79475 9.06123 1.66202 9.15784C1.49081 9.28245 1.32737 9.42233 1.1762 9.57346C0.924715 9.82494 0.718778 10.1119 0.56413 10.4263C0.512451 10.5314 0.406904 10.5924 0.297178 10.5924Z" fill="#E94444"/>
|
||||
<path d="M1.1723 12.1352C1.00809 12.1352 0.875 12.0021 0.875 11.8378C0.875 11.1525 1.14191 10.508 1.62656 10.0234C2.26953 9.38043 3.12437 9.02637 4.03359 9.02637C4.19781 9.02637 4.33089 9.15945 4.33089 9.32367C4.33089 9.48789 4.19777 9.62098 4.03359 9.62098C3.28316 9.62098 2.57765 9.91324 2.04703 10.4439C1.67469 10.8162 1.46965 11.3112 1.46965 11.8378C1.46965 12.0021 1.33652 12.1352 1.1723 12.1352Z" fill="#E94444"/>
|
||||
<path d="M7.81813 1.21039C7.72243 1.21039 7.62848 1.16429 7.5711 1.07887C7.4795 0.942576 7.51571 0.75785 7.652 0.666249C8.30051 0.23039 9.06001 0 9.84832 0C10.0125 0 10.1456 0.133086 10.1456 0.297304C10.1456 0.461523 10.0125 0.594608 9.84832 0.594608C9.1786 0.594608 8.53383 0.790038 7.98372 1.15976C7.93282 1.19402 7.87513 1.21039 7.81813 1.21039Z" fill="#E94444"/>
|
||||
<path d="M19.2004 9.43762C19.15 9.43762 19.0989 9.42477 19.052 9.39774C18.9098 9.31563 18.8611 9.13379 18.9432 8.9916C19.4691 8.08067 19.5323 6.95817 19.1122 5.98891C19.0469 5.83825 19.1161 5.66317 19.2668 5.59786C19.4174 5.53251 19.5925 5.60177 19.6578 5.75243C20.1524 6.89364 20.0778 8.21567 19.4582 9.28891C19.4031 9.3843 19.3032 9.43762 19.2004 9.43762Z" fill="#E94444"/>
|
||||
<path d="M8.44359 13.3371C9.39062 13.0616 10.4202 13.3041 11.1531 14.0207C11.6853 14.541 11.9825 15.2331 11.9898 15.9693C11.9927 16.2502 11.9536 16.5278 11.8738 16.7942C11.8267 16.9516 11.916 17.1173 12.0733 17.1644C12.1017 17.1729 12.1305 17.177 12.1587 17.177C12.2867 17.177 12.4048 17.0937 12.4434 16.9649C12.5405 16.6412 12.5879 16.3041 12.5845 15.9633C12.5755 15.068 12.2148 14.2271 11.5688 13.5956C10.6698 12.7165 9.41304 12.4358 8.27746 12.7662C8.0789 12.8239 7.86027 12.7646 7.70687 12.6112L6.76953 11.6738L6.98328 12.4715C6.99469 12.5141 6.97609 12.559 6.93789 12.5811C6.89988 12.603 6.85195 12.5968 6.82078 12.5661L7.28641 13.0316C7.5932 13.3384 8.03656 13.4556 8.44359 13.3371Z" fill="#D78878"/>
|
||||
<path d="M13.7719 8.52433L14.1717 7.03223L12.7684 9.46281C12.6863 9.60499 12.735 9.78683 12.8772 9.86894C12.9241 9.89597 12.9752 9.90882 13.0256 9.90882C13.1284 9.90882 13.2283 9.8555 13.2834 9.76011L13.9534 8.59957C13.8954 8.69988 13.7419 8.63625 13.7719 8.52433Z" fill="#D78878"/>
|
||||
</svg>
|
After Width: | Height: | Size: 6.2 KiB |
@ -0,0 +1,16 @@
|
||||
<svg width="17" height="23" viewBox="0 0 17 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.05566 4.86011C1.83076 4.86011 0.833984 3.86333 0.833984 2.63843C0.833984 1.41353 1.83076 0.416748 3.05566 0.416748C4.28056 0.416748 5.27734 1.41353 5.27734 2.63843C5.27734 3.86333 4.28056 4.86011 3.05566 4.86011Z" fill="#25D9F8"/>
|
||||
<path d="M8.76855 0.416748C7.54977 0.416748 6.54688 1.41964 6.54688 2.63843C6.54688 3.85721 7.54977 4.86011 8.76855 4.86011C9.98734 4.86011 10.9902 3.85721 10.9902 2.63843C10.9902 1.41964 9.98734 0.416748 8.76855 0.416748Z" fill="#25D9F8"/>
|
||||
<path d="M14.5342 4.86011C13.3093 4.86011 12.3125 3.86333 12.3125 2.63843C12.3125 1.41353 13.3093 0.416748 14.5342 0.416748C15.7591 0.416748 16.7559 1.41353 16.7559 2.63843C16.7559 3.86333 15.7591 4.86011 14.5342 4.86011Z" fill="#00C0F1"/>
|
||||
<path d="M3.05566 10.6152C1.83076 10.6152 0.833984 9.61845 0.833984 8.39355C0.833984 7.16866 1.83076 6.17188 3.05566 6.17188C4.28056 6.17188 5.27734 7.16866 5.27734 8.39355C5.27734 9.61845 4.28056 10.6152 3.05566 10.6152Z" fill="#25D9F8"/>
|
||||
<path d="M8.76855 6.17188C7.54977 6.17188 6.54688 7.17477 6.54688 8.39355C6.54688 9.61234 7.54977 10.6152 8.76855 10.6152C9.98734 10.6152 10.9902 9.61234 10.9902 8.39355C10.9902 7.17477 9.98734 6.17188 8.76855 6.17188Z" fill="#25D9F8"/>
|
||||
<path d="M14.5342 10.6152C13.3093 10.6152 12.3125 9.61845 12.3125 8.39355C12.3125 7.16866 13.3093 6.17188 14.5342 6.17188C15.7591 6.17188 16.7559 7.16866 16.7559 8.39355C16.7559 9.61845 15.7591 10.6152 14.5342 10.6152Z" fill="#00C0F1"/>
|
||||
<path d="M3.05566 16.3281C1.83076 16.3281 0.833984 15.3313 0.833984 14.1064C0.833984 12.8815 1.83076 11.8848 3.05566 11.8848C4.28056 11.8848 5.27734 12.8815 5.27734 14.1064C5.27734 15.3313 4.28056 16.3281 3.05566 16.3281Z" fill="#25D9F8"/>
|
||||
<path d="M8.76855 11.8848C7.54977 11.8848 6.54688 12.8877 6.54688 14.1064C6.54688 15.3252 7.54977 16.3281 8.76855 16.3281C9.98734 16.3281 10.9902 15.3252 10.9902 14.1064C10.9902 12.8877 9.98734 11.8848 8.76855 11.8848Z" fill="#25D9F8"/>
|
||||
<path d="M8.76855 17.6401C7.54977 17.6401 6.54688 18.643 6.54688 19.8618C6.54688 21.0806 7.54977 22.0835 8.76855 22.0835C9.98734 22.0835 10.9902 21.0806 10.9902 19.8618C10.9902 18.643 9.98734 17.6401 8.76855 17.6401Z" fill="#25D9F8"/>
|
||||
<path d="M14.5342 16.3281C13.3093 16.3281 12.3125 15.3313 12.3125 14.1064C12.3125 12.8815 13.3093 11.8848 14.5342 11.8848C15.7591 11.8848 16.7559 12.8815 16.7559 14.1064C16.7559 15.3313 15.7591 16.3281 14.5342 16.3281Z" fill="#00C0F1"/>
|
||||
<path d="M10.9902 19.8618C10.9902 21.0806 9.98734 22.0835 8.76855 22.0835V17.6401C9.98734 17.6401 10.9902 18.643 10.9902 19.8618Z" fill="#00C0F1"/>
|
||||
<path d="M10.9902 14.1064C10.9902 15.3252 9.98734 16.3281 8.76855 16.3281V11.8848C9.98734 11.8848 10.9902 12.8877 10.9902 14.1064Z" fill="#00C0F1"/>
|
||||
<path d="M10.9902 8.39355C10.9902 9.61234 9.98734 10.6152 8.76855 10.6152V6.17188C9.98734 6.17188 10.9902 7.17477 10.9902 8.39355Z" fill="#00C0F1"/>
|
||||
<path d="M8.76855 4.86011V0.416748C9.98734 0.416748 10.9902 1.41964 10.9902 2.63843C10.9902 3.85721 9.98734 4.86011 8.76855 4.86011Z" fill="#00C0F1"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
@ -0,0 +1,18 @@
|
||||
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 1.39551L0.43631 14.5042C-0.648319 15.9909 0.413536 18.08 2.25384 18.08H17.7462C19.5865 18.08 20.6483 15.9909 19.5637 14.5042L10 1.39551Z" fill="#F1FAFF"/>
|
||||
<path d="M19.5625 14.5031L9.99968 1.39551L8.36328 3.63848L16.2897 14.503C17.3747 15.9902 16.3125 18.08 14.4716 18.08H17.7445C19.5853 18.08 20.6475 15.9902 19.5625 14.5031Z" fill="#C7EEFB"/>
|
||||
<path d="M11.9176 5.4031H8.09515C7.05127 5.4031 6.20508 4.55687 6.20508 3.51302V1.76807C6.20508 1.66022 6.29254 1.57275 6.40039 1.57275H13.6124C13.7203 1.57275 13.8077 1.66022 13.8077 1.76807V3.51302C13.8077 4.55687 12.9615 5.4031 11.9176 5.4031Z" fill="#E0DDE2"/>
|
||||
<path d="M13.6131 1.57275H12.5435V2.24335C12.5435 3.28962 11.6953 4.1378 10.6491 4.1378H6.83536C6.64466 4.1378 6.46071 4.10932 6.28711 4.05694C6.52227 4.83582 7.2451 5.40314 8.1007 5.40314H11.9144C12.9607 5.40314 13.8088 4.55496 13.8088 3.50869V1.7685C13.8088 1.66041 13.7212 1.57275 13.6131 1.57275Z" fill="#C8C1C9"/>
|
||||
<path d="M15.0484 2.26481H4.96485C4.85699 2.26481 4.76953 2.17734 4.76953 2.06949V0.195316C4.76953 0.0874625 4.85699 0 4.96485 0H15.0484C15.1562 0 15.2437 0.0874625 15.2437 0.195316V2.06949C15.2437 2.17738 15.1562 2.26481 15.0484 2.26481Z" fill="#E0DDE2"/>
|
||||
<path d="M15.0479 0H13.9042V0.729545C13.9042 0.837672 13.8165 0.925329 13.7084 0.925329H4.76953V2.06906C4.76953 2.17719 4.85719 2.26485 4.96532 2.26485H15.0479C15.156 2.26485 15.2437 2.17719 15.2437 2.06906V0.195785C15.2437 0.0876579 15.156 0 15.0479 0Z" fill="#C8C1C9"/>
|
||||
<path d="M10.0073 4.26404C10.2842 4.26404 10.5087 4.03955 10.5087 3.76264C10.5087 3.48572 10.2842 3.26123 10.0073 3.26123C9.73035 3.26123 9.50586 3.48572 9.50586 3.76264C9.50586 4.03955 9.73035 4.26404 10.0073 4.26404Z" fill="#FA2A3B"/>
|
||||
<path d="M9.8893 9.28347C10.3885 9.28347 10.7932 8.87876 10.7932 8.37953C10.7932 7.8803 10.3885 7.47559 9.8893 7.47559C9.39006 7.47559 8.98535 7.8803 8.98535 8.37953C8.98535 8.87876 9.39006 9.28347 9.8893 9.28347Z" fill="#62D8F9"/>
|
||||
<path d="M9.88961 7.47559C9.82531 7.47559 9.76262 7.48242 9.70215 7.49516C10.1114 7.58148 10.4186 7.94457 10.4186 8.37953C10.4186 8.81449 10.1114 9.17758 9.70215 9.2639C9.76266 9.27668 9.82531 9.28347 9.88961 9.28347C10.3888 9.28347 10.7936 8.87875 10.7936 8.37953C10.7936 7.88031 10.3889 7.47559 9.88961 7.47559Z" fill="#00BEF7"/>
|
||||
<path d="M13.0358 12.1673L11.4546 11.9102L10.5953 10.2506C10.5183 10.077 10.3974 9.83939 10.1304 9.75986L9.12693 9.45876C9.01685 9.43196 8.91099 9.42211 8.72325 9.45157L6.58333 9.94857C6.4552 9.97837 6.34074 10.0503 6.25836 10.1528L5.1158 11.5749C4.91267 11.8278 4.95295 12.1974 5.2058 12.4006C5.31424 12.4878 5.44416 12.5301 5.57323 12.5301C5.74511 12.5301 5.91542 12.455 6.03144 12.3106L7.04685 11.0468L8.0512 10.8135L7.46143 12.779C7.4501 12.8121 7.44647 12.8548 7.43026 12.9482L7.09752 15.3102L5.54569 16.6566C5.30069 16.8692 5.2744 17.2401 5.48698 17.4851C5.60315 17.619 5.76651 17.6875 5.93085 17.6875C6.06726 17.6875 6.20434 17.6403 6.31547 17.5439L8.03331 16.0534C8.14039 15.9605 8.21023 15.8321 8.23 15.6917L8.50207 13.7605L8.53828 13.7713L10.0084 15.487L10.8786 17.3765C10.9777 17.5915 11.1902 17.7182 11.4124 17.7182C11.4946 17.7182 11.5782 17.7009 11.6578 17.6642C11.9524 17.5285 12.0812 17.1797 11.9455 16.8851L11.041 14.9214C11.0183 14.8721 10.9889 14.8262 10.9536 14.7849L9.72272 13.3485L10.146 11.9377L10.5473 12.7127C10.6327 12.8777 10.7912 12.9925 10.9745 13.0223L12.8473 13.3268C12.8792 13.332 12.911 13.3345 12.9423 13.3345C13.2251 13.3345 13.4744 13.1295 13.5212 12.8413C13.5733 12.5211 13.356 12.2194 13.0358 12.1673Z" fill="#62D8F9"/>
|
||||
<path d="M8.30566 9.54864C8.4934 9.51919 8.59872 9.53106 8.7088 9.55786L9.71225 9.85896C9.97929 9.93849 10.1002 10.1762 10.1772 10.3497L11.1316 12.2035C11.156 12.251 11.2017 12.284 11.2545 12.2921L13.5191 12.6415C13.4757 12.404 13.2881 12.2083 13.0362 12.1673L11.4549 11.9102L10.5957 10.2506C10.5187 10.077 10.3978 9.83939 10.1307 9.75986L9.12728 9.45876C9.0172 9.43196 8.91134 9.42211 8.7236 9.45157L8.30566 9.54864Z" fill="#00BEF7"/>
|
||||
<path d="M11.0419 14.9213C11.0192 14.872 10.9898 14.8261 10.9544 14.7849L9.72357 13.3484L10.1469 11.938L10.0931 11.8342C10.0232 11.699 9.82428 11.7176 9.78052 11.8634L9.36196 13.2581C9.32653 13.3761 9.3536 13.5042 9.43384 13.5978L10.5359 14.8841C10.5712 14.9253 10.6007 14.9712 10.6234 15.0205L11.5279 16.9842C11.649 17.2471 11.559 17.5529 11.3288 17.7121C11.3567 17.7161 11.3849 17.7183 11.4133 17.7183C11.4954 17.7183 11.579 17.7009 11.6586 17.6642C11.9532 17.5285 12.082 17.1797 11.9463 16.8851L11.0419 14.9213Z" fill="#00BEF7"/>
|
||||
<path d="M3.21138 16.8311C3.05665 16.8311 2.92712 16.7102 2.91845 16.5538C2.85149 15.3472 3.77866 14.311 4.98521 14.2441C5.14751 14.2357 5.28576 14.359 5.2947 14.521C5.30369 14.6829 5.17974 14.8215 5.01778 14.8305C4.13453 14.8795 3.4558 15.638 3.50483 16.5212C3.51381 16.6831 3.38986 16.8217 3.22791 16.8307C3.2224 16.831 3.21685 16.8311 3.21138 16.8311Z" fill="#00BEF7"/>
|
||||
<path d="M4.40203 16.8436C4.24731 16.8436 4.11778 16.7226 4.10911 16.5662C4.07606 15.9709 4.53352 15.4597 5.12879 15.4267C5.29043 15.4178 5.42926 15.5417 5.43824 15.7037C5.44723 15.8656 5.32324 16.0041 5.16129 16.0131C4.88938 16.0282 4.68039 16.2618 4.69547 16.5338C4.70446 16.6957 4.58047 16.8342 4.41852 16.8432C4.41305 16.8434 4.4075 16.8436 4.40203 16.8436Z" fill="#00BEF7"/>
|
||||
<path d="M15.7026 12.3836C15.6998 12.3836 15.697 12.3835 15.6943 12.3835C15.5321 12.3789 15.4044 12.2438 15.4089 12.0817C15.4335 11.1975 14.7342 10.458 13.8499 10.4334C13.6878 10.4289 13.5601 10.2938 13.5646 10.1317C13.5691 9.96955 13.705 9.84185 13.8663 9.8463C15.0742 9.87994 16.0297 10.8901 15.996 12.0981C15.9915 12.2574 15.8609 12.3836 15.7026 12.3836Z" fill="#00BEF7"/>
|
||||
<path d="M14.5123 12.4288C14.5095 12.4288 14.5067 12.4287 14.5039 12.4286C14.3418 12.4241 14.2141 12.289 14.2186 12.1269C14.2223 11.9951 14.1743 11.8696 14.0837 11.7738C13.993 11.6779 13.8705 11.6231 13.7386 11.6194C13.5765 11.6149 13.4487 11.4798 13.4532 11.3177C13.4578 11.1556 13.5914 11.0276 13.755 11.0324C14.0437 11.0404 14.3119 11.1604 14.5104 11.3702C14.7089 11.5801 14.8137 11.8546 14.8057 12.1433C14.8012 12.3026 14.6707 12.4288 14.5123 12.4288Z" fill="#00BEF7"/>
|
||||
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
@ -0,0 +1,18 @@
|
||||
<svg width="23" height="20" viewBox="0 0 23 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.5833 1.84497L1.22267 16.046C0.0476544 17.6566 1.198 19.9198 3.19166 19.9198H19.975C21.9687 19.9198 23.119 17.6566 21.944 16.046L11.5833 1.84497Z" fill="#F1FAFF"/>
|
||||
<path d="M21.9431 16.0448L11.5833 1.84497L9.81055 4.27486L18.3975 16.0448C19.5729 17.6558 18.4222 19.9198 16.4279 19.9198H19.9735C21.9678 19.9198 23.1185 17.6559 21.9431 16.0448Z" fill="#C7EEFB"/>
|
||||
<path d="M13.6602 6.1864H9.51926C8.38838 6.1864 7.47168 5.26966 7.47168 4.13882V2.24846C7.47168 2.13162 7.56643 2.03687 7.68327 2.03687H15.4963C15.6131 2.03687 15.7079 2.13162 15.7079 2.24846V4.13882C15.7079 5.26966 14.7911 6.1864 13.6602 6.1864Z" fill="#E0DDE2"/>
|
||||
<path d="M15.498 2.03687H14.3393V2.76335C14.3393 3.89681 13.4204 4.81567 12.287 4.81567H8.15546C7.94886 4.81567 7.74959 4.78482 7.56152 4.72807C7.81628 5.57186 8.59934 6.18645 9.52624 6.18645H13.6578C14.7912 6.18645 15.7101 5.26759 15.7101 4.13413V2.24892C15.7101 2.13183 15.6151 2.03687 15.498 2.03687Z" fill="#C8C1C9"/>
|
||||
<path d="M17.0524 2.78679H6.12858C6.01174 2.78679 5.91699 2.69204 5.91699 2.5752V0.544844C5.91699 0.428003 6.01174 0.333252 6.12858 0.333252H17.0524C17.1692 0.333252 17.264 0.428003 17.264 0.544844V2.5752C17.264 2.69208 17.1693 2.78679 17.0524 2.78679Z" fill="#E0DDE2"/>
|
||||
<path d="M17.0519 0.333252H15.8129V1.12359C15.8129 1.24073 15.7179 1.33569 15.6008 1.33569H5.91699V2.57473C5.91699 2.69187 6.01195 2.78684 6.12909 2.78684H17.0519C17.1691 2.78684 17.264 2.69187 17.264 2.57473V0.545352C17.264 0.428215 17.1691 0.333252 17.0519 0.333252Z" fill="#C8C1C9"/>
|
||||
<path d="M11.591 4.95259C11.891 4.95259 12.1342 4.7094 12.1342 4.4094C12.1342 4.10941 11.891 3.86621 11.591 3.86621C11.291 3.86621 11.0479 4.10941 11.0479 4.4094C11.0479 4.7094 11.291 4.95259 11.591 4.95259Z" fill="#FA2A3B"/>
|
||||
<path d="M11.4636 10.3904C12.0045 10.3904 12.4429 9.95199 12.4429 9.41116C12.4429 8.87032 12.0045 8.43188 11.4636 8.43188C10.9228 8.43188 10.4844 8.87032 10.4844 9.41116C10.4844 9.95199 10.9228 10.3904 11.4636 10.3904Z" fill="#62D8F9"/>
|
||||
<path d="M11.4638 8.43213C11.3942 8.43213 11.3262 8.43953 11.2607 8.45333C11.7041 8.54685 12.0369 8.94019 12.0369 9.4114C12.0369 9.88261 11.7041 10.276 11.2607 10.3695C11.3263 10.3833 11.3942 10.3907 11.4638 10.3907C12.0046 10.3907 12.4431 9.95222 12.4431 9.4114C12.4431 8.87058 12.0047 8.43213 11.4638 8.43213Z" fill="#00BEF7"/>
|
||||
<path d="M14.8717 13.5145L13.1586 13.236L12.2278 11.4381C12.1444 11.2501 12.0134 10.9926 11.7241 10.9064L10.637 10.5802C10.5178 10.5512 10.4031 10.5405 10.1997 10.5725L7.88145 11.1109C7.74264 11.1432 7.61865 11.2211 7.5294 11.3322L6.29163 12.8728C6.07157 13.1467 6.1152 13.5471 6.38913 13.7672C6.50661 13.8617 6.64736 13.9075 6.78718 13.9075C6.97338 13.9075 7.15789 13.8262 7.28357 13.6697L8.3836 12.3006L9.47165 12.0479L8.83273 14.1772C8.82045 14.213 8.81652 14.2593 8.79896 14.3605L8.43849 16.9193L6.75734 18.3779C6.49192 18.6082 6.46344 19.0101 6.69374 19.2755C6.81959 19.4205 6.99657 19.4948 7.1746 19.4948C7.32238 19.4948 7.47087 19.4435 7.59127 19.3391L9.45227 17.7244C9.56826 17.6238 9.64393 17.4847 9.66534 17.3326L9.96009 15.2404L9.99932 15.2522L11.5919 17.1109L12.5347 19.1578C12.642 19.3907 12.8723 19.528 13.113 19.528C13.202 19.528 13.2925 19.5092 13.3787 19.4695C13.6979 19.3225 13.8374 18.9446 13.6905 18.6254L12.7106 16.4981C12.686 16.4446 12.6542 16.3949 12.6159 16.3503L11.2825 14.7941L11.7411 13.2658L12.1757 14.1053C12.2683 14.2841 12.44 14.4085 12.6386 14.4408L14.6674 14.7706C14.702 14.7762 14.7364 14.7789 14.7703 14.7789C15.0767 14.7789 15.3468 14.5569 15.3975 14.2447C15.4539 13.8978 15.2185 13.5709 14.8717 13.5145Z" fill="#62D8F9"/>
|
||||
<path d="M9.74707 10.6776C9.95045 10.6457 10.0645 10.6586 10.1838 10.6876L11.2709 11.0138C11.5602 11.1 11.6911 11.3574 11.7745 11.5454L12.8085 13.5537C12.835 13.6052 12.8845 13.6409 12.9417 13.6497L15.395 14.0282C15.3479 13.7709 15.1447 13.5589 14.8718 13.5145L13.1588 13.236L12.2279 11.4381C12.1445 11.2501 12.0135 10.9926 11.7242 10.9064L10.6372 10.5802C10.5179 10.5512 10.4032 10.5405 10.1998 10.5725L9.74707 10.6776Z" fill="#00BEF7"/>
|
||||
<path d="M12.7115 16.498C12.6869 16.4446 12.655 16.3948 12.6167 16.3502L11.2833 14.794L11.7419 13.266L11.6837 13.1536C11.6079 13.0072 11.3924 13.0273 11.345 13.1852L10.8916 14.6961C10.8532 14.824 10.8825 14.9627 10.9694 15.0642L12.1634 16.4576C12.2016 16.5023 12.2335 16.552 12.2581 16.6054L13.2379 18.7328C13.3691 19.0176 13.2716 19.3488 13.0223 19.5213C13.0525 19.5257 13.0831 19.528 13.1138 19.528C13.2028 19.528 13.2933 19.5092 13.3795 19.4695C13.6987 19.3224 13.8382 18.9445 13.6913 18.6254L12.7115 16.498Z" fill="#00BEF7"/>
|
||||
<path d="M4.22827 18.567C4.06064 18.567 3.92032 18.436 3.91092 18.2666C3.83839 16.9594 4.84282 15.8369 6.14991 15.7644C6.32574 15.7553 6.47551 15.8889 6.4852 16.0643C6.49493 16.2398 6.36065 16.3899 6.1852 16.3996C5.22834 16.4528 4.49305 17.2745 4.54616 18.2313C4.5559 18.4067 4.42162 18.5568 4.24617 18.5666C4.2402 18.5669 4.23419 18.567 4.22827 18.567Z" fill="#00BEF7"/>
|
||||
<path d="M5.51838 18.5804C5.35076 18.5804 5.21044 18.4493 5.20104 18.2799C5.16524 17.635 5.66082 17.0812 6.3057 17.0454C6.48081 17.0358 6.63121 17.17 6.64094 17.3454C6.65068 17.5209 6.51636 17.671 6.34091 17.6807C6.04634 17.6971 5.81994 17.95 5.83627 18.2447C5.84601 18.4201 5.71169 18.5702 5.53624 18.5799C5.53032 18.5802 5.52431 18.5804 5.51838 18.5804Z" fill="#00BEF7"/>
|
||||
<path d="M17.7606 13.7491C17.7576 13.7491 17.7546 13.749 17.7516 13.749C17.576 13.744 17.4376 13.5977 17.4425 13.4221C17.4691 12.4641 16.7115 11.663 15.7536 11.6364C15.578 11.6315 15.4396 11.4851 15.4445 11.3095C15.4494 11.1339 15.5966 10.9955 15.7713 11.0004C17.0799 11.0368 18.115 12.1311 18.0785 13.4398C18.0737 13.6124 17.9322 13.7491 17.7606 13.7491Z" fill="#00BEF7"/>
|
||||
<path d="M16.4716 13.7978C16.4686 13.7978 16.4656 13.7978 16.4626 13.7977C16.287 13.7928 16.1486 13.6465 16.1535 13.4708C16.1575 13.328 16.1055 13.1921 16.0074 13.0882C15.9091 12.9844 15.7763 12.925 15.6335 12.921C15.4579 12.9161 15.3195 12.7698 15.3243 12.5942C15.3293 12.4186 15.474 12.2798 15.6512 12.2851C15.964 12.2938 16.2546 12.4238 16.4696 12.6511C16.6846 12.8784 16.7982 13.1758 16.7895 13.4886C16.7846 13.6611 16.6432 13.7978 16.4716 13.7978Z" fill="#00BEF7"/>
|
||||
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
@ -0,0 +1,15 @@
|
||||
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.91795 0.916504C5.07124 0.916504 1.93555 4.05219 1.93555 7.89891V11.7075C1.93555 12.0629 2.2148 12.3423 2.57031 12.3423H5.10937C5.46488 12.3423 5.74413 12.0629 5.74413 11.7075V7.89891C5.74413 6.14694 7.16603 4.72509 8.91795 4.72509C10.6699 4.72509 12.0918 6.14698 12.0918 7.89891V9.16844C12.0918 9.52387 12.371 9.80321 12.7265 9.80321H15.2656C15.6211 9.80321 15.9004 9.52387 15.9004 9.16844V7.89891C15.9004 4.05219 12.7647 0.916504 8.91795 0.916504Z" fill="#C5C9F7"/>
|
||||
<path d="M15.9004 7.89891V9.16844C15.9004 9.52387 15.6211 9.80321 15.2656 9.80321H12.7266C12.371 9.80321 12.0918 9.52387 12.0918 9.16844V7.89891C12.0918 6.14694 10.6699 4.72509 8.91797 4.72509V0.916504C12.7647 0.916504 15.9004 4.05219 15.9004 7.89891Z" fill="#A8AFF1"/>
|
||||
<path d="M13.9961 11.0728H3.83984C3.48433 11.0728 3.20508 11.352 3.20508 11.7075V21.9484C3.20508 22.3038 3.48433 22.5832 3.83984 22.5832H13.9961C14.3516 22.5832 14.6308 22.3038 14.6308 21.9484V11.7075C14.6308 11.352 14.3516 11.0728 13.9961 11.0728Z" fill="#FEDB41"/>
|
||||
<path d="M18.874 7.33116L21.4131 6.06163C22.1691 5.68813 22.7259 6.82477 21.9809 7.19725L19.4419 8.46678C18.679 8.84304 18.1354 7.70048 18.874 7.33116Z" fill="#1BD9DE"/>
|
||||
<path d="M21.4133 14.8142L18.8743 13.5447C18.5606 13.3878 18.4341 13.0066 18.5904 12.6929C18.749 12.3799 19.1284 12.2541 19.4421 12.409L21.9811 13.6786C22.7341 14.0551 22.1615 15.1832 21.4133 14.8142Z" fill="#1BD9DE"/>
|
||||
<path d="M21.6972 11.0728H19.1581C18.3214 11.0728 18.318 9.80322 19.1581 9.80322H21.6972C22.5339 9.80322 22.5373 11.0728 21.6972 11.0728Z" fill="#1BD9DE"/>
|
||||
<path d="M14.6308 11.7075V21.9484C14.6308 22.3038 14.3516 22.5832 13.9961 22.5832H8.91797V11.0728H13.9961C14.3516 11.0728 14.6308 11.352 14.6308 11.7075Z" fill="#FFCC33"/>
|
||||
<path d="M4.4746 22.5832H2.57031C1.52023 22.5832 0.666016 21.7289 0.666016 20.6789V12.977C0.666016 11.927 1.52023 11.0728 2.57031 11.0728H4.4746V22.5832Z" fill="#FEA832"/>
|
||||
<path d="M17.1699 20.6789C17.1699 21.7289 16.3157 22.5832 15.2656 22.5832H13.3613V11.0728H15.2656C16.3157 11.0728 17.1699 11.927 17.1699 12.977V20.6789Z" fill="#FE9923"/>
|
||||
<path d="M8.91797 13.6118C7.86416 13.6118 7.01367 14.4623 7.01367 15.5161C7.01367 16.5698 7.86416 17.4204 8.91797 17.4204C9.97177 17.4204 10.8223 16.5698 10.8223 15.5161C10.8223 14.4623 9.97177 13.6118 8.91797 13.6118Z" fill="#994C0F"/>
|
||||
<path d="M9.55273 16.7852V19.3242C9.55273 19.7431 9.23535 19.959 8.91797 19.959C8.60059 19.959 8.2832 19.7431 8.2832 19.3242V16.7852C8.2832 16.3662 8.60059 16.1504 8.91797 16.1504C9.23535 16.1504 9.55273 16.3662 9.55273 16.7852Z" fill="#994C0F"/>
|
||||
<path d="M10.8223 15.5161C10.8223 16.5698 9.97178 17.4204 8.91797 17.4204V13.6118C9.97178 13.6118 10.8223 14.4623 10.8223 15.5161Z" fill="#713708"/>
|
||||
<path d="M9.55273 16.7852V19.3242C9.55273 19.7431 9.23535 19.959 8.91797 19.959V16.1504C9.23535 16.1504 9.55273 16.3662 9.55273 16.7852Z" fill="#713708"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
@ -0,0 +1,40 @@
|
||||
<svg width="22" height="23" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.2406 19.2489C20.2388 17.359 21.4858 14.683 21.4858 11.7155C21.4858 5.98953 16.8439 1.34766 11.1179 1.34766C5.39187 1.34766 0.75 5.98953 0.75 11.7155C0.75 17.4415 5.39187 22.0834 11.1179 22.0834C11.5666 22.0834 12.0086 22.0549 12.4423 21.9996L18.2406 19.2489Z" fill="#816AE2"/>
|
||||
<path d="M17.0779 15.8865C16.9869 15.5522 16.9548 15.2045 16.9831 14.8592L17.1524 13.2644C17.235 12.2638 17.0825 11.2613 16.6396 10.3604C15.4951 8.03233 15.7576 7.86339 15.7221 5.55289C15.7221 5.08092 15.3394 4.69824 14.8674 4.69824C14.3954 4.69824 14.0128 5.08088 14.0128 5.55289C14.0128 14.9488 14.0303 14.2593 13.9723 14.5348V15.7651C13.9723 16.8017 13.129 17.6451 12.0924 17.6451C11.4039 17.6451 9.02967 17.6451 7.41406 17.6451C8.13279 18.6447 9.11604 19.4273 10.2571 19.9012C10.2642 19.9041 10.2712 19.9071 10.2783 19.9101C11.1599 20.2825 12.1443 21.0255 12.3087 21.9474L12.3247 22.0132C14.6462 21.7441 16.7338 20.7084 18.3278 19.1654L17.0779 15.8865Z" fill="#F9BA8F"/>
|
||||
<path d="M4.23933 4.72767L3.97904 4.4865C3.57774 4.11469 2.94522 4.13882 2.57341 4.54007C2.20161 4.94137 2.22573 5.57389 2.62699 5.9457L4.23933 7.43964V4.72767Z" fill="#F9BA8F"/>
|
||||
<path d="M3.156 5.19843C2.90984 4.97034 2.80629 4.64424 2.84831 4.3335C2.74785 4.38491 2.65428 4.45321 2.57341 4.54043C2.20161 4.94173 2.22573 5.57425 2.62699 5.94605L4.23933 7.44V6.20225L3.156 5.19843Z" fill="#FCAD6D"/>
|
||||
<path d="M17.1572 16.0903C16.8042 18.5247 14.709 20.3948 12.1768 20.3948C11.7396 20.3948 11.3155 20.339 10.9111 20.2343C11.5816 20.6442 12.1847 21.2434 12.3102 21.9469L12.3261 22.0128C14.6477 21.7436 16.7352 20.708 18.3293 19.1649L17.1572 16.0903Z" fill="#FD995B"/>
|
||||
<path d="M12.5409 17.6853H5.67544C4.86358 17.6853 4.20312 17.0248 4.20312 16.2129V1.88886C4.20312 1.077 4.86358 0.416504 5.67544 0.416504H12.5409C13.3527 0.416504 14.0132 1.077 14.0132 1.88886V16.213C14.0132 17.0248 13.3527 17.6853 12.5409 17.6853Z" fill="#2A428C"/>
|
||||
<path d="M5.67447 0.416504C4.8626 0.416504 4.20215 1.077 4.20215 1.88882V16.2129C4.20215 17.0248 4.86264 17.6853 5.67447 17.6853H7.72112C7.26688 17.2219 7.7967 16.7693 7.7967 16.7693C7.04907 16.5731 7.11255 15.7874 7.11255 15.7874C7.11255 15.7874 7.11255 3.77992 7.11255 3.02878C7.11255 2.27764 7.87554 2.08793 7.87554 2.08793C7.575 1.78739 7.87554 1.47157 7.87554 1.47157V0.962699C7.59831 0.786995 7.6529 0.547773 7.71325 0.416504L5.67447 0.416504Z" fill="#142766"/>
|
||||
<path d="M8.02256 1.4718H7.87555C7.73501 1.4718 7.62109 1.35788 7.62109 1.21735C7.62109 1.07681 7.73501 0.962891 7.87555 0.962891H8.02256C8.1631 0.962891 8.27702 1.07681 8.27702 1.21735C8.27702 1.35788 8.1631 1.4718 8.02256 1.4718Z" fill="#3C58A0"/>
|
||||
<path d="M10.3038 1.4718H8.89118C8.75064 1.4718 8.63672 1.35788 8.63672 1.21735C8.63672 1.07681 8.75064 0.962891 8.89118 0.962891H10.3038C10.4444 0.962891 10.5583 1.07681 10.5583 1.21735C10.5583 1.35788 10.4444 1.4718 10.3038 1.4718Z" fill="#3C58A0"/>
|
||||
<path d="M12.5399 1.33252H11.5081C11.3157 1.33252 11.1598 1.48846 11.1598 1.68079C11.1598 1.9047 10.9766 2.08793 10.7527 2.08793H7.46176C7.23786 2.08793 7.05462 1.90474 7.05462 1.68079C7.05462 1.48846 6.89868 1.33252 6.70635 1.33252H5.67447C5.36725 1.33252 5.11816 1.5816 5.11816 1.88883V16.213C5.11816 16.5202 5.36725 16.7693 5.67447 16.7693H12.5399C12.8471 16.7693 13.0962 16.5202 13.0962 16.213C13.0962 14.7395 13.0962 2.28209 13.0962 1.88883C13.0962 1.5816 12.8471 1.33252 12.5399 1.33252Z" fill="#73C3F9"/>
|
||||
<path d="M7.79666 16.7693C7.69087 16.3128 8.22035 16.2061 8.22035 16.2061C8.22035 16.2061 8.55711 13.2562 8.22035 12.9194C7.88358 12.5827 8.22035 12.2647 8.22035 12.2647C8.22035 12.2647 8.58826 9.34593 8.22035 8.97798C7.85244 8.61007 8.22035 8.32319 8.22035 8.32319V5.0365C7.56138 4.62044 7.908 4.02177 7.908 4.02177V3.07914C7.41005 2.58119 7.87533 2.0881 7.8755 2.08793H7.46172C7.23782 2.08793 7.05458 1.90474 7.05458 1.68079C7.05458 1.48846 6.89864 1.33252 6.70631 1.33252H5.67447C5.36725 1.33252 5.11816 1.58156 5.11816 1.88883V16.213C5.11816 16.5202 5.36725 16.7693 5.67447 16.7693H7.79666V16.7693Z" fill="#4FABF7"/>
|
||||
<path d="M7.03969 4.02169H11.1792C11.4395 4.02169 11.6505 3.81069 11.6505 3.55039C11.6505 3.2901 11.4395 3.0791 11.1792 3.0791H7.03969C6.7794 3.0791 6.56836 3.2901 6.56836 3.55039C6.56836 3.81073 6.7794 4.02169 7.03969 4.02169Z" fill="#E9EFFF"/>
|
||||
<path d="M7.0377 3.0791H7.90826V4.02173H7.0377C6.7774 4.02173 6.56641 3.81073 6.56641 3.55044C6.56636 3.29006 6.7774 3.0791 7.0377 3.0791Z" fill="#9BD8F9"/>
|
||||
<path d="M12.0147 8.32331H6.20226C5.96909 8.32331 5.77832 8.13254 5.77832 7.89937V5.46056C5.77832 5.22739 5.96909 5.03662 6.20226 5.03662H12.0147C12.2479 5.03662 12.4387 5.22739 12.4387 5.46056V7.89937C12.4387 8.13254 12.2479 8.32331 12.0147 8.32331Z" fill="#E9EFFF"/>
|
||||
<path d="M12.0147 12.2647H6.20226C5.96909 12.2647 5.77832 12.0739 5.77832 11.8408V9.40197C5.77832 9.1688 5.96909 8.97803 6.20226 8.97803H12.0147C12.2479 8.97803 12.4387 9.1688 12.4387 9.40197V11.8408C12.4387 12.0739 12.2479 12.2647 12.0147 12.2647Z" fill="#E9EFFF"/>
|
||||
<path d="M12.0147 16.2061H6.20226C5.96909 16.2061 5.77832 16.0154 5.77832 15.7822V13.3434C5.77832 13.1102 5.96909 12.9194 6.20226 12.9194H12.0147C12.2479 12.9194 12.4387 13.1102 12.4387 13.3434V15.7822C12.4387 16.0154 12.2479 16.2061 12.0147 16.2061Z" fill="#E9EFFF"/>
|
||||
<path d="M12.0147 8.32331H6.20226C5.96909 8.32331 5.77832 8.13254 5.77832 7.89937V5.46056C5.77832 5.22739 5.96909 5.03662 6.20226 5.03662H12.0147C12.2479 5.03662 12.4387 5.22739 12.4387 5.46056V7.89937C12.4387 8.13254 12.2479 8.32331 12.0147 8.32331Z" fill="#E9EFFF"/>
|
||||
<path d="M12.0147 12.2647H6.20226C5.96909 12.2647 5.77832 12.0739 5.77832 11.8408V9.40197C5.77832 9.1688 5.96909 8.97803 6.20226 8.97803H12.0147C12.2479 8.97803 12.4387 9.1688 12.4387 9.40197V11.8408C12.4387 12.0739 12.2479 12.2647 12.0147 12.2647Z" fill="#E9EFFF"/>
|
||||
<path d="M12.0147 16.2061H6.20226C5.96909 16.2061 5.77832 16.0154 5.77832 15.7822V13.3434C5.77832 13.1102 5.96909 12.9194 6.20226 12.9194H12.0147C12.2479 12.9194 12.4387 13.1102 12.4387 13.3434V15.7822C12.4387 16.0154 12.2479 16.2061 12.0147 16.2061Z" fill="#E9EFFF"/>
|
||||
<path d="M7.79674 7.89933V5.46056C7.79674 5.22739 7.98751 5.03662 8.22068 5.03662H6.20128C5.96811 5.03662 5.77734 5.22739 5.77734 5.46056V7.89933C5.77734 8.1325 5.96811 8.32327 6.20128 8.32327H8.22068C7.98751 8.32327 7.79674 8.1325 7.79674 7.89933Z" fill="#D3DCFB"/>
|
||||
<path d="M7.79674 11.8408V9.40197C7.79674 9.1688 7.98751 8.97803 8.22068 8.97803H6.20128C5.96811 8.97803 5.77734 9.1688 5.77734 9.40197V11.8408C5.77734 12.0739 5.96811 12.2647 6.20128 12.2647H8.22068C7.98751 12.2647 7.79674 12.0739 7.79674 11.8408Z" fill="#D3DCFB"/>
|
||||
<path d="M7.79674 15.7827V13.3439C7.79674 13.1107 7.98751 12.9199 8.22068 12.9199H6.20128C5.96811 12.9199 5.77734 13.1107 5.77734 13.3439V15.7827C5.77734 16.0158 5.96811 16.2066 6.20128 16.2066H8.22068C7.98751 16.2066 7.79674 16.0158 7.79674 15.7827Z" fill="#D3DCFB"/>
|
||||
<path d="M8.87857 6.39941H7.17871C7.00343 6.39941 6.86133 6.25735 6.86133 6.08203C6.86133 5.90671 7.00343 5.76465 7.17871 5.76465H8.87857C9.05385 5.76465 9.19595 5.90671 9.19595 6.08203C9.19595 6.25731 9.05385 6.39941 8.87857 6.39941Z" fill="#3C58A0"/>
|
||||
<path d="M11.0368 7.59473H7.17871C7.00343 7.59473 6.86133 7.45267 6.86133 7.27734C6.86133 7.10202 7.00343 6.95996 7.17871 6.95996H11.0368C11.2121 6.95996 11.3542 7.10202 11.3542 7.27734C11.3542 7.45267 11.2121 7.59473 11.0368 7.59473Z" fill="#BEC8F7"/>
|
||||
<path d="M10.2047 6.39941H9.96484C9.78956 6.39941 9.64746 6.25735 9.64746 6.08203C9.64746 5.90671 9.78956 5.76465 9.96484 5.76465H10.2047C10.3799 5.76465 10.522 5.90671 10.522 6.08203C10.522 6.25731 10.38 6.39941 10.2047 6.39941Z" fill="#BEC8F7"/>
|
||||
<path d="M8.87857 10.3418H7.17871C7.00343 10.3418 6.86133 10.1997 6.86133 10.0244C6.86133 9.84909 7.00343 9.70703 7.17871 9.70703H8.87857C9.05385 9.70703 9.19595 9.84909 9.19595 10.0244C9.19595 10.1997 9.05385 10.3418 8.87857 10.3418Z" fill="#3C58A0"/>
|
||||
<path d="M11.0368 11.5361H7.17871C7.00343 11.5361 6.86133 11.3941 6.86133 11.2188C6.86133 11.0434 7.00343 10.9014 7.17871 10.9014H11.0368C11.2121 10.9014 11.3542 11.0434 11.3542 11.2188C11.3542 11.394 11.2121 11.5361 11.0368 11.5361Z" fill="#BEC8F7"/>
|
||||
<path d="M10.2047 10.3418H9.96484C9.78956 10.3418 9.64746 10.1997 9.64746 10.0244C9.64746 9.84909 9.78956 9.70703 9.96484 9.70703H10.2047C10.3799 9.70703 10.522 9.84909 10.522 10.0244C10.522 10.1997 10.38 10.3418 10.2047 10.3418Z" fill="#BEC8F7"/>
|
||||
<path d="M8.87857 14.2827H7.17871C7.00343 14.2827 6.86133 14.1406 6.86133 13.9653C6.86133 13.79 7.00343 13.6479 7.17871 13.6479H8.87857C9.05385 13.6479 9.19595 13.79 9.19595 13.9653C9.19595 14.1407 9.05385 14.2827 8.87857 14.2827Z" fill="#3C58A0"/>
|
||||
<path d="M11.0368 15.478H7.17871C7.00343 15.478 6.86133 15.336 6.86133 15.1606C6.86133 14.9853 7.00343 14.8433 7.17871 14.8433H11.0368C11.2121 14.8433 11.3542 14.9853 11.3542 15.1606C11.3542 15.336 11.2121 15.478 11.0368 15.478Z" fill="#BEC8F7"/>
|
||||
<path d="M10.2047 14.2827H9.96484C9.78956 14.2827 9.64746 14.1406 9.64746 13.9653C9.64746 13.79 9.78956 13.6479 9.96484 13.6479H10.2047C10.3799 13.6479 10.522 13.79 10.522 13.9653C10.522 14.1407 10.38 14.2827 10.2047 14.2827Z" fill="#BEC8F7"/>
|
||||
<path d="M5.68743 9.97325C5.36027 10.3263 4.80887 10.3473 4.45581 10.0202L2.99598 8.66753C2.64292 8.34042 2.62189 7.78898 2.94905 7.43592C3.27621 7.08286 3.82761 7.06183 4.18066 7.38899L5.6405 8.74163C5.99355 9.06879 6.01459 9.62019 5.68743 9.97325Z" fill="#F9BA8F"/>
|
||||
<path d="M5.05639 9.40617L3.59655 8.05353C3.35238 7.8273 3.26728 7.49383 3.34603 7.19287C3.19885 7.23536 3.06077 7.31623 2.94905 7.43679C2.62189 7.78985 2.64292 8.34129 2.99598 8.66841L4.45581 10.021C4.80887 10.3482 5.36027 10.3272 5.68743 9.97412C5.78831 9.86523 5.85585 9.73739 5.89098 9.60316C5.60715 9.68505 5.28888 9.62161 5.05639 9.40617Z" fill="#FCAD6D"/>
|
||||
<path d="M5.68743 14.7281C5.36027 15.0812 4.80887 15.1022 4.45581 14.7751L2.99598 13.4224C2.64292 13.0953 2.62189 12.5439 2.94905 12.1908C3.27621 11.8377 3.82761 11.8167 4.18066 12.1439L5.6405 13.4965C5.99355 13.8236 6.01459 14.3751 5.68743 14.7281Z" fill="#F9BA8F"/>
|
||||
<path d="M5.05639 14.1601L3.59655 12.8074C3.35238 12.5812 3.26728 12.2477 3.34603 11.9468C3.19885 11.9893 3.06077 12.0701 2.94905 12.1907C2.62189 12.5438 2.64292 13.0952 2.99598 13.4223L4.45581 14.775C4.80887 15.1021 5.36027 15.0811 5.68743 14.728C5.78831 14.6191 5.85585 14.4913 5.89098 14.3571C5.60715 14.439 5.28888 14.3755 5.05639 14.1601Z" fill="#FCAD6D"/>
|
||||
<path d="M5.68743 12.3507C5.36027 12.7037 4.80887 12.7248 4.45581 12.3976L2.99598 11.045C2.64292 10.7179 2.62189 10.1664 2.94905 9.81336C3.27621 9.4603 3.82761 9.43927 4.18066 9.76643L5.6405 11.1191C5.99355 11.4462 6.01459 11.9976 5.68743 12.3507Z" fill="#F9BA8F"/>
|
||||
<path d="M5.05639 11.7826L3.59655 10.43C3.35238 10.2038 3.26728 9.8703 3.34603 9.56934C3.19885 9.61182 3.06073 9.69269 2.94905 9.81325C2.62189 10.1663 2.64292 10.7177 2.99598 11.0449L4.45581 12.3975C4.80887 12.7247 5.36027 12.7036 5.68743 12.3506C5.78831 12.2417 5.85585 12.1139 5.89098 11.9796C5.60715 12.0616 5.28888 11.9981 5.05639 11.7826Z" fill="#FCAD6D"/>
|
||||
<path d="M18.1452 4.09326C17.5824 4.80911 17.0745 5.8376 17.4806 6.95995C18.2423 9.06538 19.4554 10.8528 18.8912 13.9651C18.6351 15.3774 19.4753 15.9693 20.4694 16.1947C21.1202 14.8388 21.4854 13.3197 21.4854 11.7152C21.4855 8.70098 20.1988 5.9877 18.1452 4.09326Z" fill="#9181F2"/>
|
||||
</svg>
|
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,4 @@
|
||||
<svg width="12" height="22" viewBox="0 0 12 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.8752 6.4735H8.18799L11.4195 1.04496C11.5372 0.848435 11.5403 0.604218 11.4275 0.405239C11.3147 0.20626 11.1039 0.0834961 10.8752 0.0834961H5.79707H3.25799C2.96663 0.0834961 2.71311 0.281882 2.64244 0.564524L0.103362 10.7631C0.0556273 10.9528 0.0984106 11.1537 0.218678 11.3074C0.338946 11.4617 0.523664 11.5516 0.718918 11.5516H3.61135L0.124479 20.8923C0.0128862 21.1898 0.13874 21.524 0.418292 21.6746C0.699113 21.8251 1.04654 21.7445 1.23219 21.4886L5.79707 15.1696L11.3885 7.48143C11.5292 7.28863 11.549 7.03324 11.4412 6.82C11.3327 6.60739 11.1139 6.4735 10.8752 6.4735Z" fill="#FED843"/>
|
||||
<path d="M11.441 6.82C11.3325 6.60739 11.1137 6.4735 10.875 6.4735H8.18779L11.4193 1.04496C11.537 0.848435 11.5401 0.604218 11.4273 0.405239C11.3145 0.20626 11.1038 0.0834961 10.875 0.0834961H5.79688V15.1697L11.3883 7.48143C11.529 7.28867 11.5489 7.03328 11.441 6.82Z" fill="#FABE2C"/>
|
||||
</svg>
|
After Width: | Height: | Size: 995 B |
@ -0,0 +1,23 @@
|
||||
<svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.7415 21.7502H2.6543C1.60427 21.7502 0.75 20.8959 0.75 19.8459V4.52686C0.75 3.47683 1.60427 2.62256 2.6543 2.62256H13.7415C14.7916 2.62256 15.6458 3.47683 15.6458 4.52686V19.8459C15.6458 20.8959 14.7916 21.7502 13.7415 21.7502Z" fill="#FF5E82"/>
|
||||
<path d="M13.7409 2.62256H8.19727V21.7502H13.7409C14.7909 21.7502 15.6452 20.8959 15.6452 19.8459V4.52686C15.6452 3.47683 14.7909 2.62256 13.7409 2.62256Z" fill="#B7457D"/>
|
||||
<path d="M2.6543 3.89209C2.30429 3.89209 2.01953 4.17685 2.01953 4.52686V19.8459C2.01953 20.1959 2.30429 20.4806 2.6543 20.4806H13.7415C14.0915 20.4806 14.3763 20.1959 14.3763 19.8459V4.52686C14.3763 4.17685 14.0915 3.89209 13.7415 3.89209H2.6543Z" fill="#F2FAFF"/>
|
||||
<path d="M13.7409 3.89258H8.19727V20.4811H13.7409C14.0909 20.4811 14.3757 20.1964 14.3757 19.8464V4.52734C14.3757 4.17733 14.0909 3.89258 13.7409 3.89258Z" fill="#C8EAFA"/>
|
||||
<path d="M5.10314 10.179C4.94069 10.179 4.77823 10.1171 4.65432 9.99306L3.45741 8.79615C3.20951 8.54825 3.20951 8.14636 3.45741 7.89846C3.70526 7.65056 4.1072 7.65056 4.35509 7.89846L5.10319 8.64655L7.04823 6.70155C7.29613 6.45365 7.69806 6.45365 7.94592 6.70155C8.19382 6.94945 8.19382 7.35134 7.94592 7.59923L5.55205 9.99306C5.42806 10.1171 5.26556 10.179 5.10314 10.179Z" fill="#5E54AC"/>
|
||||
<path d="M5.10314 14.3445C4.94069 14.3445 4.77823 14.2826 4.65432 14.1586L3.45741 12.9617C3.20951 12.7138 3.20951 12.3119 3.45741 12.064C3.70526 11.8161 4.1072 11.8161 4.35509 12.064L5.10319 12.8121L7.04823 10.8671C7.29613 10.6192 7.69806 10.6192 7.94592 10.8671C8.19382 11.115 8.19382 11.5169 7.94592 11.7648L5.55205 14.1586C5.42806 14.2825 5.26556 14.3445 5.10314 14.3445Z" fill="#5E54AC"/>
|
||||
<path d="M6.17603 17.3067L6.99674 16.486C7.24463 16.2381 7.24463 15.8362 6.99674 15.5883C6.74888 15.3404 6.34695 15.3404 6.09905 15.5883L5.27834 16.409L4.45763 15.5883C4.20978 15.3404 3.80784 15.3404 3.55995 15.5883C3.31205 15.8362 3.31205 16.2381 3.55995 16.486L4.38066 17.3067L3.55995 18.1274C3.31205 18.3753 3.31205 18.7772 3.55995 19.0251C3.68389 19.149 3.84635 19.211 4.00881 19.211C4.17127 19.211 4.33373 19.149 4.45763 19.025L5.27834 18.2043L6.09905 19.0251C6.22296 19.149 6.38542 19.211 6.54787 19.211C6.71033 19.211 6.87279 19.149 6.99669 19.025C7.24459 18.7771 7.24459 18.3752 6.99669 18.1273L6.17603 17.3067Z" fill="#5E54AC"/>
|
||||
<path d="M21.7826 21.7503H17.5508C17.2002 21.7503 16.916 21.4661 16.916 21.1156V16.8838C16.916 16.5332 17.2002 16.249 17.5508 16.249H21.7826C22.1331 16.249 22.4173 16.5332 22.4173 16.8838V21.1156C22.4173 21.4661 22.1331 21.7503 21.7826 21.7503Z" fill="#F2FAFF"/>
|
||||
<path d="M21.7829 16.249H19.667V21.7503H21.7829C22.1334 21.7503 22.4176 21.4661 22.4176 21.1156V16.8838C22.4176 16.5332 22.1334 16.249 21.7829 16.249Z" fill="#C8EAFA"/>
|
||||
<path d="M20.513 13.71H18.8203C17.7703 13.71 16.916 14.5642 16.916 15.6143V16.8838H22.4173V15.6143C22.4173 14.5642 21.5631 13.71 20.513 13.71Z" fill="#A4E9FF"/>
|
||||
<path d="M22.4176 15.6143C22.4176 14.5642 21.5634 13.71 20.5133 13.71H19.667V16.8838H22.4176V15.6143Z" fill="#91BBFF"/>
|
||||
<path d="M11.5833 5.16162H4.8125C4.46194 5.16162 4.17773 4.87742 4.17773 4.52686V3.6805C4.17773 2.67237 4.96514 1.84472 5.95728 1.78027C6.23285 0.802262 7.13299 0.0834961 8.19792 0.0834961C9.26284 0.0834961 10.163 0.802262 10.4386 1.78027C11.4307 1.84472 12.2181 2.67237 12.2181 3.6805V4.52686C12.2181 4.87742 11.9339 5.16162 11.5833 5.16162Z" fill="#FFE67A"/>
|
||||
<path d="M10.4379 1.78027C10.1623 0.802262 9.26219 0.0834961 8.19727 0.0834961V5.16162H11.5827C11.9332 5.16162 12.2174 4.87742 12.2174 4.52686V3.6805C12.2174 2.67237 11.43 1.84472 10.4379 1.78027Z" fill="#FFC336"/>
|
||||
<path d="M9.11561 16.8557C8.90525 16.6453 8.8692 16.317 9.02895 16.066L11.1235 12.7744C11.2525 12.5718 11.4875 12.4558 11.7349 12.4849C11.8823 12.5023 12.0174 12.5759 12.1223 12.6808L13.2904 13.8489C13.3953 13.9538 13.469 14.0889 13.4863 14.2363C13.5154 14.4837 13.3994 14.7187 13.1967 14.8476L9.90518 16.9422C9.65423 17.1021 9.32598 17.066 9.11561 16.8557Z" fill="#FFD6AA"/>
|
||||
<path d="M13.2891 13.8487L12.705 13.2646L9.11426 16.8554C9.32462 17.0658 9.65292 17.1018 9.90391 16.9421L13.1955 14.8475C13.3981 14.7186 13.5141 14.4835 13.485 14.2361C13.4677 14.0887 13.394 13.9536 13.2891 13.8487Z" fill="#FAC68F"/>
|
||||
<path d="M20.7863 6.38235L19.5893 5.18543C19.3414 4.93754 18.9395 4.93754 18.6917 5.18543L17.3451 6.53198C17.0972 6.77988 17.0972 7.18177 17.3451 7.42967L18.542 8.62658C18.7899 8.87448 19.1918 8.87448 19.4397 8.62658L20.7863 7.28003C21.0341 7.03218 21.0341 6.63025 20.7863 6.38235Z" fill="#F2FAFF"/>
|
||||
<path d="M20.1876 5.78369L17.9434 8.02793L18.5418 8.62638C18.7897 8.87428 19.1916 8.87428 19.4395 8.62638L20.7861 7.27983C21.0339 7.03194 21.0339 6.63005 20.7861 6.38215L20.1876 5.78369Z" fill="#C8EAFA"/>
|
||||
<path d="M21.9829 3.98849C21.4045 3.41009 20.4667 3.41009 19.8883 3.98849L18.6914 5.1854L20.786 7.28L21.9829 6.08309C22.5613 5.50469 22.5613 4.56688 21.9829 3.98849Z" fill="#FF5E82"/>
|
||||
<path d="M21.9825 3.98828L19.7383 6.23252L20.7856 7.27984L21.9825 6.08292C22.5609 5.50448 22.5609 4.56668 21.9825 3.98828Z" fill="#B7457D"/>
|
||||
<path d="M11.208 12.666L17.3413 6.5327L19.4356 8.627L13.3023 14.7603L11.208 12.666Z" fill="#BC8173"/>
|
||||
<path d="M12.2559 13.7139L18.3892 7.58055L19.4363 8.6277L13.303 14.761L12.2559 13.7139Z" fill="#9D5E4A"/>
|
||||
</svg>
|
After Width: | Height: | Size: 5.2 KiB |
@ -0,0 +1,16 @@
|
||||
<svg width="23" height="21" viewBox="0 0 23 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.7197 12.305C10.6976 12.946 10.1954 13.4656 9.55068 13.5131C8.95032 13.557 8.34412 13.5797 7.74956 13.5797C7.15499 13.5797 6.54934 13.557 5.94894 13.5131C5.30419 13.4656 4.80149 12.946 4.77987 12.305C4.68377 9.49902 4.68377 6.65658 4.77936 3.85693C4.80154 3.21535 5.30372 2.69632 5.94843 2.6488C6.54879 2.60496 7.15499 2.58227 7.74956 2.58227C8.34412 2.58227 8.95032 2.60496 9.55123 2.6488C10.1954 2.69632 10.6981 3.21539 10.7203 3.85693C10.7346 4.27092 10.7462 4.68542 10.7562 5.10098H13.172C13.1619 4.65745 13.1493 4.21548 13.134 3.77402C13.0701 1.89736 11.6058 0.377692 9.72812 0.239863C9.0686 0.191283 8.40328 0.166992 7.74956 0.166992C7.09638 0.166992 6.43051 0.191283 5.77154 0.239863C3.89386 0.377692 2.42959 1.89736 2.36518 3.77402C2.26751 6.62861 2.26751 9.52644 2.36569 12.3874C2.42959 14.2645 3.89382 15.7837 5.77154 15.922C6.43051 15.9706 7.09638 15.9949 7.74956 15.9949C8.40328 15.9949 9.0686 15.9706 9.72812 15.922C11.6053 15.7837 13.0695 14.2645 13.134 12.3874C13.1419 12.1513 13.1493 11.9148 13.1561 11.6777H10.7393C10.7335 11.8873 10.7272 12.0964 10.7197 12.305Z" fill="#665E66"/>
|
||||
<path d="M9.54972 2.64855C9.15316 2.61952 8.75398 2.60103 8.35742 2.591C8.56122 2.58571 8.76507 2.58203 8.9668 2.58203C9.56136 2.58203 10.1676 2.60471 10.7679 2.64855C11.4127 2.69608 11.9148 3.21515 11.937 3.85668C11.9513 4.27068 11.9628 4.68518 11.9729 5.10074H10.7547C10.7446 4.68518 10.733 4.27068 10.7188 3.85668C10.6966 3.21515 10.1944 2.69608 9.54972 2.64855Z" fill="#544F57"/>
|
||||
<path d="M6.98863 15.922C5.1112 15.7839 3.64697 14.2644 3.58277 12.3876C3.48489 9.52678 3.48477 6.62882 3.58244 3.77428C3.64672 1.89736 5.11099 0.377946 6.98854 0.23999C7.44401 0.206517 7.90235 0.185273 8.35778 0.174821C8.15402 0.170166 7.95064 0.166992 7.74865 0.166992C7.09523 0.166992 6.42961 0.191536 5.7703 0.23999C3.89279 0.377988 2.42847 1.89736 2.36419 3.77428C2.26652 6.62886 2.26661 9.52682 2.36453 12.3876C2.42877 14.2644 3.89296 15.7839 5.77039 15.922C6.42957 15.9705 7.09514 15.9951 7.74861 15.9951C7.95064 15.9951 8.15397 15.9919 8.35773 15.9872C7.90231 15.9768 7.44405 15.9555 6.98863 15.922Z" fill="#544F57"/>
|
||||
<path d="M7.74913 18.9005C6.15049 18.9005 4.53836 18.8541 2.92889 18.7621C1.77218 18.696 0.847284 17.7756 0.774116 16.6194C0.630194 14.3455 0.62994 12.0639 0.773609 9.79394C0.846776 8.63769 1.77171 7.71745 2.92834 7.65139C4.53637 7.55956 6.15058 7.51318 7.74913 7.51318C9.34768 7.51318 10.9619 7.55956 12.5699 7.65139C13.7266 7.71745 14.6515 8.63773 14.7247 9.79394C14.8683 12.0639 14.8681 14.3455 14.7241 16.6194C14.6509 17.7756 13.7261 18.696 12.5694 18.7621C10.9599 18.8541 9.34776 18.9005 7.74913 18.9005Z" fill="#F4DD45"/>
|
||||
<path d="M3.47709 18.7909C3.29411 18.7824 3.11113 18.7722 2.92878 18.7619C1.77236 18.6961 0.847215 17.7758 0.774133 16.6193C0.630379 14.3451 0.629787 12.0636 0.773498 9.79364C0.84658 8.63782 1.77173 7.7175 2.92815 7.65106C3.11113 7.64077 3.29347 7.63053 3.47646 7.62207C2.79709 8.02062 2.32846 8.73866 2.27595 9.57262C2.12254 11.99 2.12318 14.4194 2.27654 16.8403C2.3291 17.6743 2.79772 18.3923 3.47709 18.7909Z" fill="#ECC32E"/>
|
||||
<path d="M20.4501 20.0105C16.193 20.1697 11.9359 20.1697 7.67881 20.0105C6.97054 19.984 6.38329 19.459 6.26794 18.7597C6.06824 17.5491 6.06824 16.3386 6.26794 15.128C6.38329 14.4287 6.97054 13.9037 7.67881 13.8772C11.9359 13.718 16.193 13.718 20.4501 13.8772C21.1583 13.9037 21.7456 14.4287 21.8609 15.128C22.0606 16.3386 22.0606 17.5492 21.8609 18.7597C21.7456 19.459 21.1583 19.984 20.4501 20.0105Z" fill="#F9F6F9"/>
|
||||
<path d="M14.0646 20.4513C11.927 20.4513 9.7895 20.4116 7.66693 20.3322C6.81228 20.3003 6.0903 19.6609 5.95027 18.8119C5.74574 17.5722 5.74574 16.3151 5.95027 15.0754C6.0903 14.2264 6.81228 13.587 7.66693 13.5551C11.9122 13.3964 16.2171 13.3964 20.4623 13.5551C21.3169 13.587 22.0389 14.2264 22.1789 15.0754C22.3835 16.3151 22.3835 17.5722 22.1789 18.8119C22.0389 19.6609 21.317 20.3003 20.4623 20.3322C18.3397 20.4116 16.2021 20.4513 14.0646 20.4513ZM14.0646 14.0803C11.9351 14.0803 9.80562 14.1198 7.691 14.1989C7.14109 14.2194 6.67635 14.6322 6.58592 15.1803C6.39287 16.3504 6.39287 17.537 6.58592 18.7071C6.67635 19.2552 7.14109 19.6679 7.69105 19.6885C11.9203 19.8466 16.209 19.8466 20.4382 19.6885C20.9882 19.6679 21.4529 19.2552 21.5433 18.7071C21.7364 17.537 21.7364 16.3504 21.5433 15.1803C21.4529 14.6322 20.9882 14.2194 20.4382 14.1989C18.3236 14.1198 16.1941 14.0803 14.0646 14.0803Z" fill="#E2DFE2"/>
|
||||
<path d="M10.2132 16.0491C10.1242 15.895 9.92723 15.8423 9.77315 15.9312L8.98549 16.386V15.4764C8.98549 15.2985 8.84127 15.1543 8.66337 15.1543C8.48547 15.1543 8.34125 15.2985 8.34125 15.4764V16.386L7.55355 15.9312C7.39947 15.8422 7.20244 15.895 7.11353 16.0491C7.02458 16.2031 7.07734 16.4001 7.23142 16.4891L8.01913 16.9439L7.23142 17.3987C7.07734 17.4876 7.02458 17.6846 7.11353 17.8387C7.17319 17.942 7.28144 17.9998 7.39278 17.9998C7.44741 17.9998 7.50281 17.9859 7.55355 17.9566L8.34125 17.5018V18.4113C8.34125 18.5892 8.48547 18.7334 8.66337 18.7334C8.84127 18.7334 8.98549 18.5892 8.98549 18.4113V17.5018L9.77315 17.9565C9.82389 17.9858 9.87928 17.9997 9.93392 17.9997C10.0452 17.9997 10.1535 17.9419 10.2132 17.8386C10.3021 17.6846 10.2494 17.4876 10.0953 17.3986L9.30757 16.9438L10.0953 16.489C10.2494 16.4002 10.3021 16.2032 10.2132 16.0491Z" fill="#665E66"/>
|
||||
<path d="M13.7572 16.0491C13.6682 15.895 13.4712 15.8422 13.3171 15.9312L12.5294 16.386V15.4764C12.5294 15.2985 12.3852 15.1543 12.2073 15.1543C12.0294 15.1543 11.8852 15.2985 11.8852 15.4764V16.386L11.0975 15.9312C10.9434 15.8422 10.7464 15.895 10.6575 16.0491C10.5685 16.2031 10.6213 16.4001 10.7754 16.4891L11.5631 16.9439L10.7754 17.3987C10.6213 17.4876 10.5685 17.6846 10.6575 17.8387C10.7171 17.942 10.8254 17.9998 10.9367 17.9998C10.9914 17.9998 11.0468 17.9859 11.0975 17.9566L11.8852 17.5018V18.4113C11.8852 18.5892 12.0294 18.7334 12.2073 18.7334C12.3852 18.7334 12.5294 18.5892 12.5294 18.4113V17.5018L13.3171 17.9566C13.3679 17.9859 13.4233 17.9998 13.4779 17.9998C13.5892 17.9998 13.6975 17.942 13.7572 17.8387C13.8461 17.6846 13.7933 17.4876 13.6393 17.3987L12.8516 16.9439L13.6393 16.4891C13.7933 16.4001 13.8461 16.2031 13.7572 16.0491Z" fill="#665E66"/>
|
||||
<path d="M17.3031 16.0491C17.2141 15.895 17.0171 15.8422 16.863 15.9312L16.0753 16.386V15.4764C16.0753 15.2985 15.9311 15.1543 15.7532 15.1543C15.5753 15.1543 15.4311 15.2985 15.4311 15.4764V16.386L14.6434 15.9312C14.4893 15.8422 14.2923 15.895 14.2034 16.0491C14.1144 16.2031 14.1672 16.4001 14.3213 16.4891L15.109 16.9439L14.3213 17.3987C14.1672 17.4876 14.1144 17.6846 14.2034 17.8387C14.263 17.942 14.3713 17.9998 14.4826 17.9998C14.5373 17.9998 14.5927 17.9859 14.6434 17.9566L15.4311 17.5018V18.4113C15.4311 18.5892 15.5753 18.7334 15.7532 18.7334C15.9311 18.7334 16.0753 18.5892 16.0753 18.4113V17.5018L16.863 17.9566C16.9138 17.9859 16.9692 17.9998 17.0238 17.9998C17.1351 17.9998 17.2434 17.942 17.3031 17.8387C17.392 17.6846 17.3392 17.4876 17.1852 17.3987L16.3975 16.9439L17.1852 16.4891C17.3392 16.4001 17.3921 16.2031 17.3031 16.0491Z" fill="#665E66"/>
|
||||
<path d="M20.73 17.3987L19.9423 16.9439L20.73 16.4891C20.8841 16.4002 20.9369 16.2032 20.8479 16.0491C20.759 15.895 20.562 15.8423 20.4079 15.9312L19.6203 16.386V15.4764C19.6203 15.2985 19.476 15.1543 19.2981 15.1543C19.1202 15.1543 18.976 15.2985 18.976 15.4764V16.386L18.1883 15.9312C18.0343 15.8422 17.8372 15.895 17.7483 16.0491C17.6593 16.2031 17.7121 16.4001 17.8662 16.4891L18.6539 16.9439L17.8662 17.3987C17.7121 17.4876 17.6593 17.6846 17.7483 17.8387C17.808 17.942 17.9162 17.9998 18.0275 17.9998C18.0822 17.9998 18.1376 17.9859 18.1883 17.9566L18.976 17.5018V18.4113C18.976 18.5892 19.1202 18.7334 19.2981 18.7334C19.476 18.7334 19.6203 18.5892 19.6203 18.4113V17.5018L20.4079 17.9565C20.4587 17.9858 20.5141 17.9997 20.5687 17.9997C20.68 17.9997 20.7883 17.9419 20.8479 17.8386C20.9369 17.6846 20.8841 17.4877 20.73 17.3987Z" fill="#665E66"/>
|
||||
<path d="M14.3142 5.76905C14.268 5.76905 14.2211 5.7591 14.1766 5.73803C14.0158 5.66198 13.9471 5.46995 14.0232 5.3091L14.6445 3.99551C14.7205 3.83471 14.9125 3.76594 15.0734 3.84207C15.2342 3.91811 15.3029 4.11015 15.2269 4.271L14.6056 5.58458C14.5505 5.70092 14.4349 5.76905 14.3142 5.76905Z" fill="#DD636E"/>
|
||||
<path d="M16.2547 8.14267C16.2085 8.14267 16.1617 8.13273 16.1172 8.11165L14.8036 7.49035C14.6428 7.4143 14.5741 7.22226 14.6502 7.06146C14.7262 6.90061 14.9182 6.83184 15.079 6.90801L16.3926 7.52932C16.5534 7.60537 16.6222 7.7974 16.5461 7.95821C16.4911 8.0745 16.3754 8.14267 16.2547 8.14267Z" fill="#DD636E"/>
|
||||
<path d="M14.9912 6.51534C14.8589 6.51534 14.735 6.43328 14.6879 6.30163C14.6279 6.13414 14.7151 5.9498 14.8826 5.88984L16.2508 5.40031C16.4183 5.34026 16.6027 5.4276 16.6626 5.5951C16.7225 5.76259 16.6354 5.94693 16.4678 6.00689L15.0997 6.49642C15.0638 6.50924 15.0272 6.51534 14.9912 6.51534Z" fill="#DD636E"/>
|
||||
</svg>
|
After Width: | Height: | Size: 8.7 KiB |
@ -44,9 +44,9 @@ PODS:
|
||||
- FirebaseCoreInternal (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.12)
|
||||
- GoogleUtilities/Logger (~> 7.12)
|
||||
- FirebaseCoreExtension (10.27.0):
|
||||
- FirebaseCoreExtension (10.29.0):
|
||||
- FirebaseCore (~> 10.0)
|
||||
- FirebaseCoreInternal (10.27.0):
|
||||
- FirebaseCoreInternal (10.29.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||
- FirebaseCrashlytics (10.20.0):
|
||||
- FirebaseCore (~> 10.5)
|
||||
@ -56,12 +56,12 @@ PODS:
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- nanopb (< 2.30910.0, >= 2.30908.0)
|
||||
- PromisesObjC (~> 2.1)
|
||||
- FirebaseInstallations (10.27.0):
|
||||
- FirebaseInstallations (10.29.0):
|
||||
- FirebaseCore (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||
- PromisesObjC (~> 2.1)
|
||||
- FirebaseSessions (10.27.0):
|
||||
- FirebaseSessions (10.29.0):
|
||||
- FirebaseCore (~> 10.5)
|
||||
- FirebaseCoreExtension (~> 10.0)
|
||||
- FirebaseInstallations (~> 10.0)
|
||||
@ -277,11 +277,11 @@ SPEC CHECKSUMS:
|
||||
firebase_crashlytics: 012078b4eec6fc9716f97ba3da0f0e44a04e95b1
|
||||
FirebaseAnalytics: a2731bf3670747ce8f65368b118d18aa8e368246
|
||||
FirebaseCore: 28045c1560a2600d284b9c45a904fe322dc890b6
|
||||
FirebaseCoreExtension: 4ec89dd0c6de93d6becde32122d68b7c35f6bf5d
|
||||
FirebaseCoreInternal: 4b297a2d56063dbea2c1d0d04222d44a8d058862
|
||||
FirebaseCoreExtension: 705ca5b14bf71d2564a0ddc677df1fc86ffa600f
|
||||
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
||||
FirebaseCrashlytics: 81530595edb6d99f1918f723a6c33766a24a4c86
|
||||
FirebaseInstallations: 766dabca09fd94aef922538aaf144cc4a6fb6869
|
||||
FirebaseSessions: 2fdf949f9e58295a57703ae8f2efc44f9fa3aa16
|
||||
FirebaseInstallations: 913cf60d0400ebd5d6b63a28b290372ab44590dd
|
||||
FirebaseSessions: dbd14adac65ce996228652c1fc3a3f576bdf3ecc
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_localization: f43b18844a2b3d2c71fd64f04ffd6b1e64dd54d4
|
||||
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
|
||||
|
@ -17,10 +17,16 @@ import 'package:syncrow_app/features/devices/model/status_model.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/curtains/curtain_view.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/devices_view_body.dart';
|
||||
import 'package:syncrow_app/features/menu/view/menu_view.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/smart_scene/smart_scene_select_dart_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.dart';
|
||||
import 'package:syncrow_app/features/scene/view/create_scene_view.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_tasks_view.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_view.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/navigation_service.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
import 'package:syncrow_app/services/api/devices_api.dart';
|
||||
import 'package:syncrow_app/services/api/profile_api.dart';
|
||||
import 'package:syncrow_app/services/api/spaces_api.dart';
|
||||
@ -52,13 +58,12 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
|
||||
Future fetchUserInfo() async {
|
||||
Future fetchUserInfo() async {
|
||||
try {
|
||||
var uuid = await const FlutterSecureStorage().read(key: UserModel.userUuidKey);
|
||||
var uuid =
|
||||
await const FlutterSecureStorage().read(key: UserModel.userUuidKey);
|
||||
user = await ProfileApi().fetchUserInfo(uuid);
|
||||
emit(HomeUserInfoLoaded(user!)); // Emit state after fetching user info
|
||||
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
@ -77,9 +82,12 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
selectedSpace = null;
|
||||
selectedRoom = null;
|
||||
pageIndex = 0;
|
||||
OneSignal.User.pushSubscription.removeObserver((stateChanges) => oneSignalSubscriptionObserver);
|
||||
OneSignal.Notifications.removePermissionObserver((permission) => oneSignalPermissionObserver);
|
||||
OneSignal.Notifications.removeClickListener((event) => oneSignalClickListenerObserver);
|
||||
OneSignal.User.pushSubscription
|
||||
.removeObserver((stateChanges) => oneSignalSubscriptionObserver);
|
||||
OneSignal.Notifications.removePermissionObserver(
|
||||
(permission) => oneSignalPermissionObserver);
|
||||
OneSignal.Notifications.removeClickListener(
|
||||
(event) => oneSignalClickListenerObserver);
|
||||
return super.close();
|
||||
}
|
||||
|
||||
@ -121,7 +129,9 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
return;
|
||||
}
|
||||
|
||||
var userUuid = await const FlutterSecureStorage().read(key: UserModel.userUuidKey) ?? '';
|
||||
var userUuid =
|
||||
await const FlutterSecureStorage().read(key: UserModel.userUuidKey) ??
|
||||
'';
|
||||
if (userUuid.isNotEmpty) {
|
||||
await OneSignal.login(userUuid);
|
||||
}
|
||||
@ -129,21 +139,24 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
await OneSignal.User.pushSubscription.optIn();
|
||||
|
||||
//this function will be called once a user is subscribed
|
||||
oneSignalSubscriptionObserver = OneSignal.User.pushSubscription.addObserver((state) async {
|
||||
oneSignalSubscriptionObserver =
|
||||
OneSignal.User.pushSubscription.addObserver((state) async {
|
||||
if (state.current.optedIn) {
|
||||
await _sendSubscriptionId();
|
||||
}
|
||||
});
|
||||
|
||||
// Send the player id when a user allows notifications
|
||||
oneSignalPermissionObserver = OneSignal.Notifications.addPermissionObserver((state) async {
|
||||
oneSignalPermissionObserver =
|
||||
OneSignal.Notifications.addPermissionObserver((state) async {
|
||||
await _sendSubscriptionId();
|
||||
});
|
||||
|
||||
//check if the player id is sent, if not send it again
|
||||
await _sendSubscriptionId();
|
||||
|
||||
oneSignalClickListenerObserver = OneSignal.Notifications.addClickListener((event) async {
|
||||
oneSignalClickListenerObserver =
|
||||
OneSignal.Notifications.addClickListener((event) async {
|
||||
//Once the user clicks on the notification
|
||||
});
|
||||
} catch (err) {
|
||||
@ -230,7 +243,9 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
|
||||
Future<bool> joinAUnit(String code) async {
|
||||
try {
|
||||
var uuid = await const FlutterSecureStorage().read(key: UserModel.userUuidKey) ?? '';
|
||||
var uuid =
|
||||
await const FlutterSecureStorage().read(key: UserModel.userUuidKey) ??
|
||||
'';
|
||||
Map<String, String> body = {'userUuid': uuid, 'inviteCode': code};
|
||||
|
||||
final success = await SpacesAPI.joinUnit(body);
|
||||
@ -348,15 +363,28 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
size: 32,
|
||||
),
|
||||
style: ButtonStyle(
|
||||
foregroundColor: WidgetStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
foregroundColor:
|
||||
WidgetStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
Navigator.pushNamed(
|
||||
NavigationService.navigatorKey.currentContext!,
|
||||
CustomPageRoute(
|
||||
builder: (context) => const CreateSceneView(),
|
||||
Routes.sceneTasksRoute,
|
||||
arguments: SceneSettingsRouteArguments(
|
||||
sceneType: '',
|
||||
sceneId: '',
|
||||
sceneName: '',
|
||||
),
|
||||
);
|
||||
NavigationService.navigatorKey.currentContext!
|
||||
.read<CreateSceneBloc>()
|
||||
.add(const ClearTaskListEvent());
|
||||
NavigationService.navigatorKey.currentContext!
|
||||
.read<CreateSceneBloc>()
|
||||
.add(const SceneTypeEvent(CreateSceneEnum.none));
|
||||
NavigationService.navigatorKey.currentContext!
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(const SmartSceneClearEvent());
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
@ -365,7 +393,8 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
size: 28,
|
||||
),
|
||||
style: ButtonStyle(
|
||||
foregroundColor: WidgetStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
foregroundColor:
|
||||
WidgetStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
@ -398,7 +427,8 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
};
|
||||
|
||||
static var bottomNavItems = [
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsDashboard, label: 'Dashboard'),
|
||||
defaultBottomNavBarItem(
|
||||
icon: Assets.assetsIconsDashboard, label: 'Dashboard'),
|
||||
// defaultBottomNavBarItem(icon: Assets.assetsIconslayout, label: 'Layout'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsDevices, label: 'Devices'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsRoutines, label: 'Routine'),
|
||||
@ -424,7 +454,8 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
|
||||
void updateDevice(String deviceId) async {
|
||||
try {
|
||||
final response = await DevicesAPI.firmwareDevice(deviceId: deviceId, firmwareVersion: '0');
|
||||
final response = await DevicesAPI.firmwareDevice(
|
||||
deviceId: deviceId, firmwareVersion: '0');
|
||||
if (response['success'] ?? false) {
|
||||
CustomSnackBar.displaySnackBar('No updates available');
|
||||
}
|
||||
@ -432,7 +463,8 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
}
|
||||
}
|
||||
|
||||
BottomNavigationBarItem defaultBottomNavBarItem({required String icon, required String label}) {
|
||||
BottomNavigationBarItem defaultBottomNavBarItem(
|
||||
{required String icon, required String label}) {
|
||||
return BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(icon),
|
||||
activeIcon: SvgPicture.asset(
|
||||
|
@ -45,7 +45,8 @@ class DeviceModel {
|
||||
|
||||
if (type == DeviceType.LightBulb) {
|
||||
tempIcon = Assets.assetsIconsLight;
|
||||
} else if (type == DeviceType.CeilingSensor || type == DeviceType.WallSensor) {
|
||||
} else if (type == DeviceType.CeilingSensor ||
|
||||
type == DeviceType.WallSensor) {
|
||||
tempIcon = Assets.assetsIconsSensors;
|
||||
} else if (type == DeviceType.AC) {
|
||||
tempIcon = Assets.assetsIconsAC;
|
||||
@ -93,5 +94,6 @@ class DeviceModel {
|
||||
};
|
||||
}
|
||||
|
||||
List<FunctionModel> getFunctions(DeviceType type) => devicesFunctionsMap[productType] ?? [];
|
||||
List<FunctionModel> getFunctions(DeviceType type) =>
|
||||
devicesFunctionsMap[productType] ?? [];
|
||||
}
|
||||
|
@ -1,6 +1,3 @@
|
||||
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
@ -12,7 +9,6 @@ import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dar
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
|
||||
|
||||
class SceneListview extends StatelessWidget {
|
||||
final List<ScenesModel> scenes;
|
||||
final String? loadingSceneId;
|
||||
@ -24,8 +20,7 @@ class SceneListview extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return
|
||||
ListView.builder(
|
||||
return ListView.builder(
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: scenes.length,
|
||||
@ -34,7 +29,7 @@ class SceneListview extends StatelessWidget {
|
||||
final isLoading = loadingSceneId == scene.id;
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child:DefaultContainer(
|
||||
child: DefaultContainer(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
@ -45,10 +40,11 @@ class SceneListview extends StatelessWidget {
|
||||
sceneName: scene.name,
|
||||
),
|
||||
);
|
||||
BlocProvider.of<CreateSceneBloc>(context).add(FetchSceneTasksEvent(sceneId: scene.id));
|
||||
BlocProvider.of<CreateSceneBloc>(context)
|
||||
.add(FetchSceneTasksEvent(sceneId: scene.id));
|
||||
},
|
||||
child:SizedBox(
|
||||
width: MediaQuery.of(context).size.width*0.4,
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.4,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@ -73,8 +69,7 @@ class SceneListview extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -1,10 +1,17 @@
|
||||
import 'dart:async';
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_event.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/scene_operations_data_helper.dart';
|
||||
import 'package:syncrow_app/features/scene/model/create_automation_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/create_scene_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/navigation/navigation_service.dart';
|
||||
import 'package:syncrow_app/services/api/scene_api.dart';
|
||||
|
||||
part 'create_scene_event.dart';
|
||||
@ -25,23 +32,65 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
on<RemoveFromSelectedValueById>(_removeFromSelectedValueById);
|
||||
on<DeleteSceneEvent>(_deleteScene);
|
||||
on<UpdateTaskEvent>(_updateTaskValue);
|
||||
on<SelectConditionEvent>(_selectConditionRule);
|
||||
on<SceneTypeEvent>(_sceneTypeEvent);
|
||||
on<EffectiveTimePeriodEvent>(_onEffectiveTimeEvent);
|
||||
}
|
||||
|
||||
CreateSceneEnum sceneType = CreateSceneEnum.none;
|
||||
|
||||
/// tab to run values and list
|
||||
List<SceneStaticFunction> tasksList = [];
|
||||
List<SceneStaticFunction> tempTasksList = [];
|
||||
final Map<String, dynamic> selectedValues = {};
|
||||
|
||||
/// automation values and list
|
||||
List<SceneStaticFunction> automationTasksList = [];
|
||||
List<SceneStaticFunction> automationTempTasksList = [];
|
||||
final Map<String, dynamic> automationSelectedValues = {};
|
||||
final Map<String, String> automationComparatorValues = {};
|
||||
String conditionRule = 'or';
|
||||
EffectiveTime? effectiveTime;
|
||||
|
||||
FutureOr<void> _onAddSceneTask(
|
||||
AddTaskEvent event, Emitter<CreateSceneState> emit) {
|
||||
final copyList = List<SceneStaticFunction>.from(tempTasksList);
|
||||
tasksList.addAll(copyList);
|
||||
tempTasksList.clear();
|
||||
selectedValues.clear();
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(CreateSceneLoading());
|
||||
if (event.isAutomation == true) {
|
||||
final copyList = List<SceneStaticFunction>.from(automationTempTasksList);
|
||||
automationTasksList.addAll(copyList);
|
||||
automationTempTasksList.clear();
|
||||
automationSelectedValues.clear();
|
||||
automationComparatorValues.clear();
|
||||
emit(AddSceneTask(
|
||||
automationTasksList: automationTasksList,
|
||||
tasksList: tasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
} else {
|
||||
final copyList = List<SceneStaticFunction>.from(tempTasksList);
|
||||
tasksList.addAll(copyList);
|
||||
tempTasksList.clear();
|
||||
selectedValues.clear();
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
FutureOr<void> _onTempHoldSceneTask(
|
||||
TempHoldSceneTasksEvent event, Emitter<CreateSceneState> emit) {
|
||||
if (event.isAutomation == true) {
|
||||
addToTempAutomationTaskList(event, emit);
|
||||
} else {
|
||||
addToTempTaskList(event, emit);
|
||||
}
|
||||
}
|
||||
|
||||
void addToTempTaskList(
|
||||
TempHoldSceneTasksEvent event, Emitter<CreateSceneState> emit) {
|
||||
emit(CreateSceneLoading());
|
||||
bool updated = false;
|
||||
for (var element in tempTasksList) {
|
||||
if (element.code == event.deviceControlModel.code) {
|
||||
@ -53,6 +102,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
code: event.deviceControlModel.code ?? '',
|
||||
deviceId: event.deviceId,
|
||||
functionValue: event.deviceControlModel.value,
|
||||
operationDialogType: event.operationType,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
value: event.deviceControlModel.value,
|
||||
@ -67,12 +117,12 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
}
|
||||
}
|
||||
if (!updated) {
|
||||
// Add new function if not found
|
||||
var newElement = SceneStaticFunction(
|
||||
operationName: event.operation,
|
||||
deviceName: event.deviceName,
|
||||
icon: event.icon,
|
||||
code: event.deviceControlModel.code ?? '',
|
||||
operationDialogType: event.operationType,
|
||||
deviceId: event.deviceId,
|
||||
functionValue: event.deviceControlModel.value,
|
||||
operationalValues: [
|
||||
@ -86,40 +136,161 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
selectedValues[newElement.code] = event.deviceControlModel.value;
|
||||
}
|
||||
|
||||
emit(TempHoldSceneTask(tempTasksList: tempTasksList));
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
|
||||
void addToTempAutomationTaskList(
|
||||
TempHoldSceneTasksEvent event, Emitter<CreateSceneState> emit) {
|
||||
emit(CreateSceneLoading());
|
||||
bool updated = false;
|
||||
for (var element in automationTempTasksList) {
|
||||
if (element.code == event.deviceControlModel.code) {
|
||||
// Update the existing function with new values
|
||||
var updatedElement = element.copyWith(
|
||||
operationName: event.operation,
|
||||
deviceName: event.deviceName,
|
||||
icon: event.icon,
|
||||
code: event.deviceControlModel.code ?? '',
|
||||
deviceId: event.deviceId,
|
||||
functionValue: event.deviceControlModel.value,
|
||||
operationDialogType: event.operationType,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
value: event.deviceControlModel.value,
|
||||
icon: '',
|
||||
),
|
||||
],
|
||||
comparator: automationComparatorValues[element.code],
|
||||
);
|
||||
automationTempTasksList[automationTempTasksList.indexOf(element)] =
|
||||
updatedElement;
|
||||
automationSelectedValues[updatedElement.code] =
|
||||
event.deviceControlModel.value;
|
||||
updated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!updated) {
|
||||
var newElement = SceneStaticFunction(
|
||||
operationName: event.operation,
|
||||
deviceName: event.deviceName,
|
||||
icon: event.icon,
|
||||
code: event.deviceControlModel.code ?? '',
|
||||
operationDialogType: event.operationType,
|
||||
deviceId: event.deviceId,
|
||||
functionValue: event.deviceControlModel.value,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
value: event.deviceControlModel.value,
|
||||
icon: '',
|
||||
),
|
||||
],
|
||||
comparator:
|
||||
automationComparatorValues[event.deviceControlModel.code] ?? '==',
|
||||
);
|
||||
automationTempTasksList.add(newElement);
|
||||
automationSelectedValues[newElement.code] =
|
||||
event.deviceControlModel.value;
|
||||
}
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
|
||||
FutureOr<void> _selectedValue(
|
||||
SelectedValueEvent event, Emitter<CreateSceneState> emit) {
|
||||
selectedValues[event.code] = event.value;
|
||||
if (event.isAutomation == true) {
|
||||
automationSelectedValues[event.code] = event.value;
|
||||
automationComparatorValues[event.code] = event.comparator ?? '==';
|
||||
|
||||
// Update the comparator value for the specific task in automationTasksList
|
||||
for (int i = 0; i < automationTasksList.length; i++) {
|
||||
if (automationTasksList[i].code == event.code) {
|
||||
automationTasksList[i] = automationTasksList[i].copyWith(
|
||||
comparator: event.comparator ?? '==',
|
||||
functionValue: event.value,
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selectedValues[event.code] = event.value;
|
||||
}
|
||||
emit(SelectedTaskValueState(value: event.value));
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(AddSceneTask(
|
||||
tasksList: List.from(tasksList),
|
||||
automationTasksList: List.from(
|
||||
automationTasksList,
|
||||
),
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
|
||||
FutureOr<void> _removeTaskById(
|
||||
RemoveTaskByIdEvent event, Emitter<CreateSceneState> emit) {
|
||||
emit(CreateSceneLoading());
|
||||
if (event.isAutomation == true) {
|
||||
for (var element in automationTasksList) {
|
||||
if (element.uniqueCustomId == event.taskId) {
|
||||
automationTasksList.remove(element);
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var element in tasksList) {
|
||||
if (element.uniqueCustomId == event.taskId) {
|
||||
tasksList.remove(element);
|
||||
|
||||
for (var element in tasksList) {
|
||||
if (element.uniqueCustomId == event.taskId) {
|
||||
tasksList.remove(element);
|
||||
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
break;
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FutureOr<void> _removeTempTaskById(
|
||||
RemoveTempTaskByIdEvent event, Emitter<CreateSceneState> emit) {
|
||||
for (var element in tempTasksList) {
|
||||
if (element.code == event.code) {
|
||||
tempTasksList.remove(element);
|
||||
emit(CreateSceneLoading());
|
||||
if (event.isAutomation == true) {
|
||||
for (var element in automationTempTasksList) {
|
||||
if (element.uniqueCustomId == event.code) {
|
||||
automationTempTasksList.remove(element);
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var element in tempTasksList) {
|
||||
if (element.code == event.code) {
|
||||
tempTasksList.remove(element);
|
||||
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -128,27 +299,53 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
CreateSceneWithTasksEvent event, Emitter<CreateSceneState> emit) async {
|
||||
emit(CreateSceneLoading());
|
||||
try {
|
||||
final response = event.updateScene
|
||||
? await SceneApi.updateScene(event.createSceneModel, event.sceneId)
|
||||
: await SceneApi.createScene(event.createSceneModel);
|
||||
dynamic response;
|
||||
if (event.createSceneModel != null) {
|
||||
response = event.updateScene
|
||||
? await SceneApi.updateScene(event.createSceneModel!, event.sceneId)
|
||||
: await SceneApi.createScene(event.createSceneModel!);
|
||||
} else if (event.createAutomationModel != null) {
|
||||
response = event.updateScene
|
||||
? await SceneApi.updateAutomation(
|
||||
event.createAutomationModel!, event.sceneId)
|
||||
: await SceneApi.createAutomation(event.createAutomationModel!);
|
||||
}
|
||||
|
||||
if (response['success'] == true) {
|
||||
tasksList.clear();
|
||||
tempTasksList.clear();
|
||||
selectedValues.clear();
|
||||
automationTasksList.clear();
|
||||
automationTempTasksList.clear();
|
||||
automationSelectedValues.clear();
|
||||
automationComparatorValues.clear();
|
||||
effectiveTime = null;
|
||||
sceneType = CreateSceneEnum.none;
|
||||
conditionRule = 'or';
|
||||
emit(const CreateSceneWithTasks(success: true));
|
||||
} else {
|
||||
emit(const CreateSceneError(message: 'Something went wrong'));
|
||||
}
|
||||
} catch (e) {
|
||||
emit(const CreateSceneError(message: 'Something went wrong'));
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
FutureOr<void> _clearTaskList(
|
||||
ClearTaskListEvent event, Emitter<CreateSceneState> emit) {
|
||||
emit(CreateSceneLoading());
|
||||
automationTasksList.clear();
|
||||
tasksList.clear();
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
|
||||
FutureOr<void> _fetchSceneTasks(
|
||||
@ -156,13 +353,46 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
emit(CreateSceneLoading());
|
||||
|
||||
try {
|
||||
final response = await SceneApi.getSceneDetails(event.sceneId);
|
||||
final response = event.isAutomation
|
||||
? await SceneApi.getAutomationDetails(event.sceneId)
|
||||
: await SceneApi.getSceneDetails(event.sceneId);
|
||||
if (response.id.isNotEmpty) {
|
||||
tasksList = List<SceneStaticFunction>.from(
|
||||
getTaskListFunctionsFromApi(actions: response.actions));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
));
|
||||
if (event.isAutomation) {
|
||||
automationTasksList = List<SceneStaticFunction>.from(
|
||||
getTaskListFunctionsFromApi(
|
||||
actions: [],
|
||||
isAutomation: true,
|
||||
conditions: response.conditions));
|
||||
tasksList = List<SceneStaticFunction>.from(
|
||||
getTaskListFunctionsFromApi(
|
||||
actions: response.actions, isAutomation: false));
|
||||
|
||||
conditionRule = response.decisionExpr ?? conditionRule;
|
||||
|
||||
if (response.effectiveTime != null) {
|
||||
BlocProvider.of<EffectPeriodBloc>(
|
||||
NavigationService.navigatorKey.currentState!.context)
|
||||
.add(SetCustomTime(response.effectiveTime!.start,
|
||||
response.effectiveTime!.end));
|
||||
BlocProvider.of<EffectPeriodBloc>(
|
||||
NavigationService.navigatorKey.currentState!.context)
|
||||
.add(ToggleDay(response.effectiveTime!.loops));
|
||||
}
|
||||
|
||||
emit(AddSceneTask(
|
||||
automationTasksList: automationTasksList,
|
||||
tasksList: tasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
} else {
|
||||
tasksList = List<SceneStaticFunction>.from(
|
||||
getTaskListFunctionsFromApi(
|
||||
actions: response.actions, isAutomation: false));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
} else {
|
||||
emit(const CreateSceneError(message: 'Something went wrong'));
|
||||
}
|
||||
@ -173,17 +403,51 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
|
||||
FutureOr<void> _clearTempTaskList(
|
||||
ClearTempTaskListEvent event, Emitter<CreateSceneState> emit) {
|
||||
tempTasksList.clear();
|
||||
selectedValues.clear();
|
||||
emit(AddSceneTask(tasksList: tempTasksList));
|
||||
emit(CreateSceneLoading());
|
||||
if (event.isAutomation == true) {
|
||||
automationTempTasksList.clear();
|
||||
automationSelectedValues.clear();
|
||||
automationComparatorValues.clear();
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
} else {
|
||||
tempTasksList.clear();
|
||||
selectedValues.clear();
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
FutureOr<void> _removeFromSelectedValueById(
|
||||
RemoveFromSelectedValueById event, Emitter<CreateSceneState> emit) {
|
||||
if (selectedValues.containsKey(event.code)) {
|
||||
selectedValues.remove(event.code);
|
||||
emit(const SelectedTaskValueState(value: null));
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(CreateSceneLoading());
|
||||
if (event.isAutomation == true) {
|
||||
if (automationSelectedValues.containsKey(event.code)) {
|
||||
automationSelectedValues.remove(event.code);
|
||||
automationComparatorValues.remove(event.code);
|
||||
emit(const SelectedTaskValueState(value: null));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
} else {
|
||||
if (selectedValues.containsKey(event.code)) {
|
||||
selectedValues.remove(event.code);
|
||||
emit(const SelectedTaskValueState(value: null));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,8 +456,12 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
emit(DeleteSceneLoading());
|
||||
|
||||
try {
|
||||
final response = await SceneApi.deleteScene(
|
||||
sceneId: event.sceneId, unitUuid: event.unitUuid);
|
||||
final response =
|
||||
sceneType.name == CreateSceneEnum.deviceStatusChanges.name
|
||||
? await SceneApi.deleteAutomation(
|
||||
automationId: event.sceneId, unitUuid: event.unitUuid)
|
||||
: await SceneApi.deleteScene(
|
||||
sceneId: event.sceneId, unitUuid: event.unitUuid);
|
||||
if (response == true) {
|
||||
emit(const DeleteSceneSuccess(true));
|
||||
} else {
|
||||
@ -206,14 +474,66 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
|
||||
|
||||
FutureOr<void> _updateTaskValue(
|
||||
UpdateTaskEvent event, Emitter<CreateSceneState> emit) {
|
||||
for (var i = 0; i < tasksList.length; i++) {
|
||||
if (tasksList[i].uniqueCustomId == event.taskId) {
|
||||
tasksList[i] = tasksList[i].copyWith(
|
||||
functionValue: event.newValue,
|
||||
);
|
||||
break;
|
||||
emit(CreateSceneLoading());
|
||||
if (event.isAutomation == true) {
|
||||
for (var i = 0; i < automationTasksList.length; i++) {
|
||||
if (automationTasksList[i].uniqueCustomId == event.taskId) {
|
||||
automationTasksList[i] = automationTasksList[i].copyWith(
|
||||
functionValue: event.newValue,
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < tasksList.length; i++) {
|
||||
if (tasksList[i].uniqueCustomId == event.taskId) {
|
||||
tasksList[i] = tasksList[i].copyWith(
|
||||
functionValue: event.newValue,
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
emit(AddSceneTask(tasksList: tasksList));
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
|
||||
FutureOr<void> _selectConditionRule(
|
||||
SelectConditionEvent event, Emitter<CreateSceneState> emit) {
|
||||
emit(CreateSceneInitial());
|
||||
if (event.condition.contains('any')) {
|
||||
conditionRule = 'or';
|
||||
} else {
|
||||
conditionRule = 'and';
|
||||
}
|
||||
|
||||
emit(AddSceneTask(
|
||||
tasksList: tasksList,
|
||||
automationTasksList: automationTasksList,
|
||||
condition: conditionRule,
|
||||
));
|
||||
}
|
||||
|
||||
FutureOr<void> _sceneTypeEvent(
|
||||
SceneTypeEvent event, Emitter<CreateSceneState> emit) {
|
||||
emit(CreateSceneInitial());
|
||||
|
||||
if (event.type == CreateSceneEnum.tabToRun) {
|
||||
sceneType = CreateSceneEnum.tabToRun;
|
||||
} else if (event.type == CreateSceneEnum.deviceStatusChanges) {
|
||||
sceneType = CreateSceneEnum.deviceStatusChanges;
|
||||
} else {
|
||||
sceneType = CreateSceneEnum.none;
|
||||
}
|
||||
|
||||
emit(SceneTypeState(event.type));
|
||||
}
|
||||
|
||||
FutureOr<void> _onEffectiveTimeEvent(
|
||||
EffectiveTimePeriodEvent event, Emitter<CreateSceneState> emit) {
|
||||
effectiveTime = event.period;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,9 @@ sealed class CreateSceneEvent extends Equatable {
|
||||
}
|
||||
|
||||
class AddTaskEvent extends CreateSceneEvent {
|
||||
const AddTaskEvent({this.isAutomation});
|
||||
final bool? isAutomation;
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
@ -19,6 +22,8 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
|
||||
final String operation;
|
||||
final String deviceName;
|
||||
final String uniqueId;
|
||||
final bool? isAutomation;
|
||||
final OperationDialogType operationType;
|
||||
|
||||
const TempHoldSceneTasksEvent({
|
||||
required this.deviceControlModel,
|
||||
@ -27,6 +32,8 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
|
||||
required this.operation,
|
||||
required this.deviceName,
|
||||
required this.uniqueId,
|
||||
this.isAutomation,
|
||||
required this.operationType,
|
||||
});
|
||||
|
||||
@override
|
||||
@ -38,23 +45,37 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
|
||||
operation,
|
||||
uniqueId,
|
||||
deviceName,
|
||||
icon
|
||||
icon,
|
||||
];
|
||||
}
|
||||
|
||||
class UpdateTaskEvent extends CreateSceneEvent {
|
||||
final String taskId;
|
||||
final dynamic newValue;
|
||||
const UpdateTaskEvent({required this.taskId, required this.newValue});
|
||||
final bool? isAutomation;
|
||||
const UpdateTaskEvent({
|
||||
required this.taskId,
|
||||
required this.newValue,
|
||||
this.isAutomation,
|
||||
});
|
||||
@override
|
||||
List<Object> get props => [taskId, newValue];
|
||||
}
|
||||
|
||||
class SelectedValueEvent extends CreateSceneEvent {
|
||||
final dynamic value;
|
||||
final dynamic automationValue;
|
||||
final String code;
|
||||
final bool? isAutomation;
|
||||
final String? comparator;
|
||||
|
||||
const SelectedValueEvent({this.value, required this.code});
|
||||
const SelectedValueEvent({
|
||||
this.value,
|
||||
required this.code,
|
||||
this.isAutomation,
|
||||
this.automationValue,
|
||||
this.comparator,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object> get props => [value!, code];
|
||||
@ -62,8 +83,11 @@ class SelectedValueEvent extends CreateSceneEvent {
|
||||
|
||||
class RemoveTaskByIdEvent extends CreateSceneEvent {
|
||||
final String taskId;
|
||||
|
||||
const RemoveTaskByIdEvent({required this.taskId});
|
||||
final bool? isAutomation;
|
||||
const RemoveTaskByIdEvent({
|
||||
required this.taskId,
|
||||
this.isAutomation,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object> get props => [taskId];
|
||||
@ -71,7 +95,8 @@ class RemoveTaskByIdEvent extends CreateSceneEvent {
|
||||
|
||||
class RemoveTempTaskByIdEvent extends CreateSceneEvent {
|
||||
final String code;
|
||||
const RemoveTempTaskByIdEvent({required this.code});
|
||||
final bool? isAutomation;
|
||||
const RemoveTempTaskByIdEvent({required this.code, this.isAutomation});
|
||||
|
||||
@override
|
||||
List<Object> get props => [code];
|
||||
@ -79,36 +104,42 @@ class RemoveTempTaskByIdEvent extends CreateSceneEvent {
|
||||
|
||||
class RemoveFromSelectedValueById extends CreateSceneEvent {
|
||||
final String code;
|
||||
|
||||
const RemoveFromSelectedValueById({required this.code});
|
||||
final bool? isAutomation;
|
||||
const RemoveFromSelectedValueById({required this.code, this.isAutomation});
|
||||
|
||||
@override
|
||||
List<Object> get props => [code];
|
||||
}
|
||||
|
||||
class CreateSceneWithTasksEvent extends CreateSceneEvent {
|
||||
final CreateSceneModel createSceneModel;
|
||||
final CreateSceneModel? createSceneModel;
|
||||
final bool updateScene;
|
||||
final String sceneId;
|
||||
final CreateAutomationModel? createAutomationModel;
|
||||
//final bool isAutomation;
|
||||
const CreateSceneWithTasksEvent({
|
||||
required this.createSceneModel,
|
||||
required this.updateScene,
|
||||
required this.sceneId,
|
||||
required this.createAutomationModel,
|
||||
// required this.isAutomation,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object> get props => [createSceneModel];
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class ClearTaskListEvent extends CreateSceneEvent {
|
||||
const ClearTaskListEvent();
|
||||
const ClearTaskListEvent({this.isAutomation});
|
||||
final bool? isAutomation;
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class ClearTempTaskListEvent extends CreateSceneEvent {
|
||||
const ClearTempTaskListEvent();
|
||||
const ClearTempTaskListEvent({this.isAutomation});
|
||||
final bool? isAutomation;
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
@ -116,10 +147,13 @@ class ClearTempTaskListEvent extends CreateSceneEvent {
|
||||
|
||||
class FetchSceneTasksEvent extends CreateSceneEvent {
|
||||
final String sceneId;
|
||||
const FetchSceneTasksEvent({required this.sceneId});
|
||||
final bool isAutomation;
|
||||
|
||||
const FetchSceneTasksEvent(
|
||||
{this.isAutomation = false, required this.sceneId});
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
List<Object> get props => [sceneId, isAutomation];
|
||||
}
|
||||
|
||||
class DeleteSceneEvent extends CreateSceneEvent {
|
||||
@ -133,3 +167,19 @@ class DeleteSceneEvent extends CreateSceneEvent {
|
||||
@override
|
||||
List<Object> get props => [sceneId, unitUuid];
|
||||
}
|
||||
|
||||
class SelectConditionEvent extends CreateSceneEvent {
|
||||
final String condition;
|
||||
|
||||
const SelectConditionEvent(this.condition);
|
||||
}
|
||||
|
||||
class SceneTypeEvent extends CreateSceneEvent {
|
||||
final CreateSceneEnum type;
|
||||
const SceneTypeEvent(this.type);
|
||||
}
|
||||
|
||||
class EffectiveTimePeriodEvent extends CreateSceneEvent {
|
||||
final EffectiveTime period;
|
||||
const EffectiveTimePeriodEvent(this.period);
|
||||
}
|
||||
|
@ -21,7 +21,10 @@ class CreateSceneError extends CreateSceneState {
|
||||
|
||||
class AddSceneTask extends CreateSceneState {
|
||||
final List<SceneStaticFunction> tasksList;
|
||||
const AddSceneTask({required this.tasksList});
|
||||
final List<SceneStaticFunction>? automationTasksList;
|
||||
final String? condition;
|
||||
const AddSceneTask(
|
||||
{required this.tasksList, this.automationTasksList, this.condition});
|
||||
|
||||
@override
|
||||
List<Object> get props => [tasksList];
|
||||
@ -29,7 +32,9 @@ class AddSceneTask extends CreateSceneState {
|
||||
|
||||
class TempHoldSceneTask extends CreateSceneState {
|
||||
final List<SceneStaticFunction> tempTasksList;
|
||||
const TempHoldSceneTask({required this.tempTasksList});
|
||||
final List<SceneStaticFunction>? automationTempTasksList;
|
||||
const TempHoldSceneTask(
|
||||
{required this.tempTasksList, this.automationTempTasksList});
|
||||
|
||||
@override
|
||||
List<Object> get props => [tempTasksList];
|
||||
@ -68,3 +73,14 @@ class DeleteSceneError extends CreateSceneState {
|
||||
}
|
||||
|
||||
class DeleteSceneLoading extends CreateSceneState {}
|
||||
|
||||
class ConditionSelectedState extends CreateSceneState {
|
||||
final String condition;
|
||||
|
||||
const ConditionSelectedState(this.condition);
|
||||
}
|
||||
|
||||
class SceneTypeState extends CreateSceneState {
|
||||
final CreateSceneEnum type;
|
||||
const SceneTypeState(this.type);
|
||||
}
|
||||
|
@ -0,0 +1,86 @@
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_event.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_state.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/effective_period_options.dart';
|
||||
import 'package:syncrow_app/features/scene/model/create_automation_model.dart';
|
||||
import 'package:syncrow_app/navigation/navigation_service.dart';
|
||||
|
||||
class EffectPeriodBloc extends Bloc<EffectPeriodEvent, EffectPeriodState> {
|
||||
EffectPeriodBloc() : super(EffectPeriodState.initial()) {
|
||||
on<SetPeriod>(_onSetPeriod);
|
||||
on<ToggleDay>(_onToggleDay);
|
||||
on<SetCustomTime>(_onSetCustomTime);
|
||||
}
|
||||
|
||||
void _onSetPeriod(SetPeriod event, Emitter<EffectPeriodState> emit) {
|
||||
String startTime = '';
|
||||
String endTime = '';
|
||||
|
||||
switch (event.period) {
|
||||
case EnumEffectivePeriodOptions.allDay:
|
||||
startTime = '00:00';
|
||||
endTime = '23:59';
|
||||
break;
|
||||
case EnumEffectivePeriodOptions.daytime:
|
||||
startTime = '06:00';
|
||||
endTime = '18:00';
|
||||
break;
|
||||
case EnumEffectivePeriodOptions.night:
|
||||
startTime = '18:00';
|
||||
endTime = '06:00';
|
||||
break;
|
||||
case EnumEffectivePeriodOptions.custom:
|
||||
startTime = state.customStartTime ?? '00:00';
|
||||
endTime = state.customEndTime ?? '23:59';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Update CreateSceneBloc
|
||||
BlocProvider.of<CreateSceneBloc>(
|
||||
NavigationService.navigatorKey.currentState!.context)
|
||||
.add(EffectiveTimePeriodEvent(EffectiveTime(
|
||||
start: startTime, end: endTime, loops: state.selectedDaysBinary)));
|
||||
|
||||
emit(state.copyWith(selectedPeriod: event.period));
|
||||
}
|
||||
|
||||
void _onToggleDay(ToggleDay event, Emitter<EffectPeriodState> emit) {
|
||||
final daysList = state.selectedDaysBinary.split('');
|
||||
final dayIndex = _getDayIndex(event.day);
|
||||
if (daysList[dayIndex] == '1') {
|
||||
daysList[dayIndex] = '0';
|
||||
} else {
|
||||
daysList[dayIndex] = '1';
|
||||
}
|
||||
final newDaysBinary = daysList.join();
|
||||
emit(state.copyWith(selectedDaysBinary: newDaysBinary));
|
||||
|
||||
BlocProvider.of<CreateSceneBloc>(
|
||||
NavigationService.navigatorKey.currentState!.context)
|
||||
.add(EffectiveTimePeriodEvent(EffectiveTime(
|
||||
start: state.customStartTime ?? '00:00',
|
||||
end: state.customEndTime ?? '23:59',
|
||||
loops: newDaysBinary)));
|
||||
}
|
||||
|
||||
void _onSetCustomTime(SetCustomTime event, Emitter<EffectPeriodState> emit) {
|
||||
emit(state.copyWith(
|
||||
customStartTime: event.startTime, customEndTime: event.endTime));
|
||||
|
||||
BlocProvider.of<CreateSceneBloc>(
|
||||
NavigationService.navigatorKey.currentState!.context)
|
||||
.add(EffectiveTimePeriodEvent(EffectiveTime(
|
||||
start: event.startTime,
|
||||
end: event.endTime,
|
||||
loops: state.selectedDaysBinary)));
|
||||
}
|
||||
|
||||
int _getDayIndex(String day) {
|
||||
const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
||||
return days.indexOf(day);
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/effective_period_options.dart';
|
||||
|
||||
abstract class EffectPeriodEvent extends Equatable {
|
||||
const EffectPeriodEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class SetPeriod extends EffectPeriodEvent {
|
||||
final EnumEffectivePeriodOptions period;
|
||||
|
||||
const SetPeriod(this.period);
|
||||
|
||||
@override
|
||||
List<Object> get props => [period];
|
||||
}
|
||||
|
||||
class ToggleDay extends EffectPeriodEvent {
|
||||
final String day;
|
||||
|
||||
const ToggleDay(this.day);
|
||||
|
||||
@override
|
||||
List<Object> get props => [day];
|
||||
}
|
||||
|
||||
class SetCustomTime extends EffectPeriodEvent {
|
||||
final String startTime;
|
||||
final String endTime;
|
||||
|
||||
const SetCustomTime(this.startTime, this.endTime);
|
||||
|
||||
@override
|
||||
List<Object> get props => [startTime, endTime];
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/effective_period_options.dart';
|
||||
|
||||
class EffectPeriodState extends Equatable {
|
||||
final EnumEffectivePeriodOptions selectedPeriod;
|
||||
final String selectedDaysBinary;
|
||||
final String? customStartTime;
|
||||
final String? customEndTime;
|
||||
|
||||
const EffectPeriodState({
|
||||
required this.selectedPeriod,
|
||||
required this.selectedDaysBinary,
|
||||
this.customStartTime,
|
||||
this.customEndTime,
|
||||
});
|
||||
|
||||
factory EffectPeriodState.initial() {
|
||||
return const EffectPeriodState(
|
||||
selectedPeriod: EnumEffectivePeriodOptions.allDay,
|
||||
selectedDaysBinary: "1111111", // All days selected
|
||||
customStartTime: "00:00",
|
||||
customEndTime: "23:59",
|
||||
);
|
||||
}
|
||||
|
||||
EffectPeriodState copyWith({
|
||||
EnumEffectivePeriodOptions? selectedPeriod,
|
||||
String? selectedDaysBinary,
|
||||
String? customStartTime,
|
||||
String? customEndTime,
|
||||
}) {
|
||||
return EffectPeriodState(
|
||||
selectedPeriod: selectedPeriod ?? this.selectedPeriod,
|
||||
selectedDaysBinary: selectedDaysBinary ?? this.selectedDaysBinary,
|
||||
customStartTime: customStartTime ?? this.customStartTime,
|
||||
customEndTime: customEndTime ?? this.customEndTime,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props =>
|
||||
[selectedPeriod, selectedDaysBinary, customStartTime, customEndTime];
|
||||
}
|
@ -11,34 +11,95 @@ part 'scene_state.dart';
|
||||
class SceneBloc extends Bloc<SceneEvent, SceneState> {
|
||||
SceneBloc() : super(SceneInitial()) {
|
||||
on<LoadScenes>(_onLoadScenes);
|
||||
on<LoadAutomation>(_onLoadAutomation);
|
||||
on<SceneTrigger>(_onSceneTrigger);
|
||||
on<UpdateAutomationStatus>(_onUpdateAutomationStatus);
|
||||
}
|
||||
|
||||
List<ScenesModel> scenes = [];
|
||||
List<ScenesModel> automationList = [];
|
||||
|
||||
Future<void> _onLoadScenes(LoadScenes event, Emitter<SceneState> emit) async {
|
||||
emit(SceneLoading());
|
||||
|
||||
try {
|
||||
if (event.unitId.isNotEmpty) {
|
||||
final scenes = await SceneApi.getScenesByUnitId(event.unitId);
|
||||
emit(SceneLoaded(scenes));
|
||||
scenes = await SceneApi.getScenesByUnitId(event.unitId);
|
||||
emit(SceneLoaded(scenes, automationList));
|
||||
} else {
|
||||
const SceneError(message: '');
|
||||
emit(const SceneError(message: 'Unit ID is empty'));
|
||||
}
|
||||
} catch (e) {
|
||||
emit(const SceneError(message: 'Something went wrong'));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _onSceneTrigger(SceneTrigger event, Emitter<SceneState> emit) async {
|
||||
Future<void> _onLoadAutomation(
|
||||
LoadAutomation event, Emitter<SceneState> emit) async {
|
||||
emit(SceneLoading());
|
||||
|
||||
try {
|
||||
if (event.unitId.isNotEmpty) {
|
||||
automationList = await SceneApi.getAutomationByUnitId(event.unitId);
|
||||
emit(SceneLoaded(scenes, automationList));
|
||||
} else {
|
||||
emit(const SceneError(message: 'Unit ID is empty'));
|
||||
}
|
||||
} catch (e) {
|
||||
emit(const SceneError(message: 'Something went wrong'));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _onSceneTrigger(
|
||||
SceneTrigger event, Emitter<SceneState> emit) async {
|
||||
final currentState = state;
|
||||
if (currentState is SceneLoaded) {
|
||||
emit(SceneLoaded(currentState.scenes, loadingSceneId: event.sceneId));
|
||||
emit(SceneLoaded(
|
||||
currentState.scenes,
|
||||
currentState.automationList,
|
||||
loadingSceneId: event.sceneId,
|
||||
));
|
||||
|
||||
try {
|
||||
final success = await SceneApi.triggerScene(event.sceneId);
|
||||
if (success) {
|
||||
emit(SceneTriggerSuccess(event.name));
|
||||
emit(SceneLoaded(currentState.scenes));
|
||||
emit(SceneLoaded(currentState.scenes, currentState.automationList));
|
||||
} else {
|
||||
emit(const SceneError(message: 'Something went wrong'));
|
||||
}
|
||||
} catch (e) {
|
||||
emit(const SceneError(message: 'Something went wrong'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _onUpdateAutomationStatus(
|
||||
UpdateAutomationStatus event, Emitter<SceneState> emit) async {
|
||||
final currentState = state;
|
||||
if (currentState is SceneLoaded) {
|
||||
final newLoadingStates =
|
||||
Map<String, bool>.from(currentState.loadingStates)
|
||||
..[event.automationId] = true;
|
||||
|
||||
emit(SceneLoaded(
|
||||
currentState.scenes,
|
||||
currentState.automationList,
|
||||
loadingStates: newLoadingStates,
|
||||
));
|
||||
|
||||
try {
|
||||
final success = await SceneApi.updateAutomationStatus(
|
||||
event.automationId, event.automationStatusUpdate);
|
||||
if (success) {
|
||||
automationList = await SceneApi.getAutomationByUnitId(
|
||||
event.automationStatusUpdate.unitUuid);
|
||||
newLoadingStates[event.automationId] = false;
|
||||
emit(SceneLoaded(
|
||||
currentState.scenes,
|
||||
automationList,
|
||||
loadingStates: newLoadingStates,
|
||||
));
|
||||
} else {
|
||||
emit(const SceneError(message: 'Something went wrong'));
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_app/features/scene/model/update_automation.dart';
|
||||
|
||||
abstract class SceneEvent extends Equatable {
|
||||
const SceneEvent();
|
||||
@ -16,6 +17,15 @@ class LoadScenes extends SceneEvent {
|
||||
List<Object> get props => [unitId];
|
||||
}
|
||||
|
||||
class LoadAutomation extends SceneEvent {
|
||||
final String unitId;
|
||||
|
||||
const LoadAutomation(this.unitId);
|
||||
|
||||
@override
|
||||
List<Object> get props => [unitId];
|
||||
}
|
||||
|
||||
class SceneTrigger extends SceneEvent {
|
||||
final String sceneId;
|
||||
final String name;
|
||||
@ -25,3 +35,15 @@ class SceneTrigger extends SceneEvent {
|
||||
@override
|
||||
List<Object> get props => [sceneId];
|
||||
}
|
||||
|
||||
//updateAutomationStatus
|
||||
class UpdateAutomationStatus extends SceneEvent {
|
||||
final String automationId;
|
||||
final AutomationStatusUpdate automationStatusUpdate;
|
||||
|
||||
const UpdateAutomationStatus(
|
||||
{required this.automationStatusUpdate, required this.automationId});
|
||||
|
||||
@override
|
||||
List<Object> get props => [automationStatusUpdate];
|
||||
}
|
||||
|
@ -13,12 +13,16 @@ class SceneLoading extends SceneState {}
|
||||
|
||||
class SceneLoaded extends SceneState {
|
||||
final List<ScenesModel> scenes;
|
||||
final List<ScenesModel> automationList;
|
||||
final String? loadingSceneId;
|
||||
final Map<String, bool> loadingStates;
|
||||
|
||||
const SceneLoaded(this.scenes, {this.loadingSceneId});
|
||||
const SceneLoaded(this.scenes, this.automationList,
|
||||
{this.loadingSceneId, this.loadingStates = const {}});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [scenes, loadingSceneId];
|
||||
List<Object?> get props =>
|
||||
[scenes, loadingSceneId, automationList, loadingStates];
|
||||
}
|
||||
|
||||
class SceneError extends SceneState {
|
||||
@ -38,3 +42,7 @@ class SceneTriggerSuccess extends SceneState {
|
||||
@override
|
||||
List<Object> get props => [sceneName];
|
||||
}
|
||||
|
||||
class UpdateAutomationStatusLoading extends SceneState {
|
||||
const UpdateAutomationStatusLoading();
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_app/features/scene/model/smart_scene_enable.dart';
|
||||
|
||||
part 'smart_scene_select_dart_event.dart';
|
||||
part 'smart_scene_select_dart_state.dart';
|
||||
|
||||
class SmartSceneSelectBloc
|
||||
extends Bloc<SmartSceneSelectEvent, SmartSceneSelectState> {
|
||||
SmartSceneSelectBloc() : super(SmartSceneSelectInitial()) {
|
||||
on<SmartSceneEnableEvent>(_onSmartSceneEnable);
|
||||
on<SmartSceneClearEvent>(_smartSceneClear);
|
||||
}
|
||||
|
||||
SmartSceneEnable? smartSceneEnable;
|
||||
|
||||
FutureOr<void> _onSmartSceneEnable(
|
||||
SmartSceneEnableEvent event, Emitter<SmartSceneSelectState> emit) {
|
||||
smartSceneEnable = event.smartSceneEnable;
|
||||
emit(SmartSceneSelected(smartSceneEnable: smartSceneEnable!));
|
||||
}
|
||||
|
||||
FutureOr<void> _smartSceneClear(
|
||||
SmartSceneClearEvent event, Emitter<SmartSceneSelectState> emit) {
|
||||
smartSceneEnable = null;
|
||||
emit(SmartSceneSelectInitial());
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
part of 'smart_scene_select_dart_bloc.dart';
|
||||
|
||||
sealed class SmartSceneSelectEvent extends Equatable {
|
||||
const SmartSceneSelectEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class SmartSceneEnableEvent extends SmartSceneSelectEvent {
|
||||
final SmartSceneEnable smartSceneEnable;
|
||||
|
||||
const SmartSceneEnableEvent(this.smartSceneEnable);
|
||||
|
||||
@override
|
||||
List<Object> get props => [smartSceneEnable];
|
||||
}
|
||||
|
||||
class SmartSceneClearEvent extends SmartSceneSelectEvent {
|
||||
const SmartSceneClearEvent();
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
part of 'smart_scene_select_dart_bloc.dart';
|
||||
|
||||
sealed class SmartSceneSelectState extends Equatable {
|
||||
const SmartSceneSelectState();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
final class SmartSceneSelectInitial extends SmartSceneSelectState {}
|
||||
|
||||
class SmartSceneSelected extends SmartSceneSelectState {
|
||||
final SmartSceneEnable smartSceneEnable;
|
||||
|
||||
const SmartSceneSelected({required this.smartSceneEnable});
|
||||
|
||||
@override
|
||||
List<Object> get props => [smartSceneEnable];
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
enum CreateSceneEnum {
|
||||
tabToRun,
|
||||
deviceStatusChanges,
|
||||
none,
|
||||
}
|
||||
|
7
lib/features/scene/enum/effective_period_options.dart
Normal file
@ -0,0 +1,7 @@
|
||||
enum EnumEffectivePeriodOptions {
|
||||
allDay,
|
||||
daytime,
|
||||
night,
|
||||
custom,
|
||||
none,
|
||||
}
|
9
lib/features/scene/enum/operation_dialog_type.dart
Normal file
@ -0,0 +1,9 @@
|
||||
enum OperationDialogType {
|
||||
countdown,
|
||||
delay,
|
||||
temperature,
|
||||
onOff,
|
||||
integerSteps,
|
||||
listOfOptions,
|
||||
none,
|
||||
}
|
150
lib/features/scene/helper/effect_period_helper.dart
Normal file
@ -0,0 +1,150 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_event.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/effective_period_options.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
import 'package:time_picker_spinner/time_picker_spinner.dart';
|
||||
|
||||
class EffectPeriodHelper {
|
||||
static Future<List<String>?> showCustomTimePicker(
|
||||
BuildContext context) async {
|
||||
String selectedStartTime = "00:00";
|
||||
String selectedEndTime = "23:59";
|
||||
PageController pageController = PageController(initialPage: 0);
|
||||
|
||||
DateTime startDateTime = DateTime(2022, 1, 1, 0, 0);
|
||||
DateTime endDateTime = DateTime(2022, 1, 1, 23, 59);
|
||||
|
||||
context.customAlertDialog(
|
||||
alertBody: SizedBox(
|
||||
height: 250,
|
||||
child: PageView(
|
||||
controller: pageController,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
_buildTimePickerPage(
|
||||
context: context,
|
||||
pageController: pageController,
|
||||
isStartTime: true,
|
||||
time: startDateTime,
|
||||
onTimeChange: (time) {
|
||||
selectedStartTime =
|
||||
"${time.hour.toString().padLeft(2, '0')}:${time.minute.toString().padLeft(2, '0')}";
|
||||
},
|
||||
),
|
||||
_buildTimePickerPage(
|
||||
context: context,
|
||||
pageController: pageController,
|
||||
isStartTime: false,
|
||||
time: endDateTime,
|
||||
onTimeChange: (time) {
|
||||
selectedEndTime =
|
||||
"${time.hour.toString().padLeft(2, '0')}:${time.minute.toString().padLeft(2, '0')}";
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
title: "Custom",
|
||||
onConfirm: () {
|
||||
context.read<EffectPeriodBloc>().add(
|
||||
SetCustomTime(selectedStartTime, selectedEndTime),
|
||||
);
|
||||
context.read<EffectPeriodBloc>().add(
|
||||
const SetPeriod(EnumEffectivePeriodOptions.custom),
|
||||
);
|
||||
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
static Widget _buildTimePickerPage({
|
||||
required BuildContext context,
|
||||
required PageController pageController,
|
||||
required bool isStartTime,
|
||||
required DateTime time,
|
||||
required Function(DateTime) onTimeChange,
|
||||
}) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
if (!isStartTime)
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
pageController.previousPage(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeIn,
|
||||
);
|
||||
},
|
||||
child: const BodyMedium(text: "Start"),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {},
|
||||
child: BodyMedium(
|
||||
text: isStartTime ? "Start" : "End",
|
||||
style: context.bodyMedium.copyWith(
|
||||
color: ColorsManager.primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isStartTime)
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
pageController.nextPage(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeIn,
|
||||
);
|
||||
},
|
||||
child: const BodyMedium(text: "End"),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
TimePickerSpinner(
|
||||
is24HourMode: false,
|
||||
normalTextStyle: const TextStyle(
|
||||
fontSize: 24,
|
||||
color: Colors.grey,
|
||||
),
|
||||
highlightedTextStyle: const TextStyle(
|
||||
fontSize: 24,
|
||||
color: ColorsManager.primaryColor,
|
||||
),
|
||||
spacing: 20,
|
||||
itemHeight: 50,
|
||||
isForce2Digits: true,
|
||||
time: time,
|
||||
onTimeChange: onTimeChange,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
static String formatEnumValue(EnumEffectivePeriodOptions value) {
|
||||
switch (value) {
|
||||
case EnumEffectivePeriodOptions.allDay:
|
||||
return "All Day";
|
||||
case EnumEffectivePeriodOptions.daytime:
|
||||
return "Daytime";
|
||||
case EnumEffectivePeriodOptions.night:
|
||||
return "Night";
|
||||
case EnumEffectivePeriodOptions.custom:
|
||||
return "Custom";
|
||||
case EnumEffectivePeriodOptions.none:
|
||||
return "None";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
271
lib/features/scene/helper/functions_per_device/ac_functions.dart
Normal file
@ -0,0 +1,271 @@
|
||||
import 'package:syncrow_app/features/scene/enum/ac_values.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
||||
|
||||
class ACFunctionsHelper {
|
||||
static List<SceneStaticFunction> tabToRunAcFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Power',
|
||||
code: 'switch',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: "ON",
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: "OFF",
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsFreezing,
|
||||
operationName: 'Mode',
|
||||
code: 'mode',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcCooling,
|
||||
description: AcValuesEnums.Cooling.name,
|
||||
value: TempModes.cold.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcHeating,
|
||||
description: AcValuesEnums.Heating.name,
|
||||
value: TempModes.hot.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFanSpeed,
|
||||
description: AcValuesEnums.Ventilation.name,
|
||||
value: TempModes.wind.name,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsTempreture,
|
||||
operationName: 'Set Temperature',
|
||||
code: 'temp_set',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.temperature,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsCelsiusDegrees,
|
||||
value: 0,
|
||||
description: 'COOL TO',
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsFanSpeed,
|
||||
operationName: 'Fan Speed',
|
||||
code: 'level',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanLow,
|
||||
description: ValueACRange.LOW.name,
|
||||
value: FanSpeeds.low.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanMiddle,
|
||||
description: ValueACRange.MIDDLE.name,
|
||||
value: FanSpeeds.middle.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanHigh,
|
||||
description: ValueACRange.HIGH.name,
|
||||
value: FanSpeeds.high.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanAuto,
|
||||
description: ValueACRange.AUTO.name,
|
||||
value: FanSpeeds.auto.name,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsChildLock,
|
||||
operationName: 'Child Lock',
|
||||
code: 'child_lock',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSceneChildLock,
|
||||
description: 'Lock',
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSceneChildUnlock,
|
||||
description: 'Unlock',
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
static List<SceneStaticFunction> automationAcFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Power',
|
||||
code: 'switch',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: "ON",
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: "OFF",
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsFreezing,
|
||||
operationName: 'Mode',
|
||||
code: 'mode',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcCooling,
|
||||
description: AcValuesEnums.Cooling.name,
|
||||
value: TempModes.cold.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcHeating,
|
||||
description: AcValuesEnums.Heating.name,
|
||||
value: TempModes.hot.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFanSpeed,
|
||||
description: AcValuesEnums.Ventilation.name,
|
||||
value: TempModes.wind.name,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsTempreture,
|
||||
operationName: 'Set Temperature',
|
||||
code: 'temp_set',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsCelsiusDegrees,
|
||||
value: 0.0,
|
||||
description: '°C',
|
||||
minValue: 20,
|
||||
maxValue: 30,
|
||||
stepValue: 0.5,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsCurrentTemp,
|
||||
operationName: 'Current Temperature',
|
||||
code: 'temp_current',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsCelsiusDegrees,
|
||||
value: 0.0,
|
||||
description: '°C',
|
||||
minValue: -9.9,
|
||||
maxValue: 99.9,
|
||||
stepValue: 0.1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsFanSpeed,
|
||||
operationName: 'Fan Speed',
|
||||
code: 'level',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanLow,
|
||||
description: ValueACRange.LOW.name,
|
||||
value: FanSpeeds.low.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanMiddle,
|
||||
description: ValueACRange.MIDDLE.name,
|
||||
value: FanSpeeds.middle.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanHigh,
|
||||
description: ValueACRange.HIGH.name,
|
||||
value: FanSpeeds.high.name,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcFanAuto,
|
||||
description: ValueACRange.AUTO.name,
|
||||
value: FanSpeeds.auto.name,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsChildLock,
|
||||
operationName: 'Child Lock',
|
||||
code: 'child_lock',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSceneChildLock,
|
||||
description: 'Lock',
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSceneChildUnlock,
|
||||
description: 'Unlock',
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,267 @@
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
class DoorLockHelperFunctions {
|
||||
/// tab to run functions
|
||||
static List<SceneStaticFunction> doorLockTapToRunFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsIconsDoorLock,
|
||||
operationName: 'Set Door lock Normal Open',
|
||||
functionValue: functionValue,
|
||||
code: 'normal_open_switch',
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
//// automation functions
|
||||
static List<SceneStaticFunction> doorLockAutomationFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsFingerprintUnlock,
|
||||
operationName: 'Fingerprint Unlock',
|
||||
functionValue: functionValue,
|
||||
code: 'unlock_fingerprint',
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0.0,
|
||||
maxValue: 999,
|
||||
stepValue: 1.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsPasswordUnlock,
|
||||
operationName: 'Password Unlock',
|
||||
functionValue: functionValue,
|
||||
code: 'unlock_password',
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0.0,
|
||||
maxValue: 999,
|
||||
stepValue: 1.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsCardUnlock,
|
||||
operationName: 'Card Unlock',
|
||||
functionValue: functionValue,
|
||||
code: 'unlock_card',
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0.0,
|
||||
maxValue: 999,
|
||||
stepValue: 1.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsLockAlarm,
|
||||
operationName: 'Lock Alarm',
|
||||
functionValue: functionValue,
|
||||
code: 'alarm_lock',
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFingerprintUnlock,
|
||||
description: "Fingerprint Mismatch",
|
||||
value: 0,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsRemoteUnlockReq,
|
||||
operationName: 'Remote Unlock Request',
|
||||
functionValue: functionValue,
|
||||
code: 'unlock_request',
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 90,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsResidualElectricity,
|
||||
operationName: 'Residual Electricity',
|
||||
functionValue: functionValue,
|
||||
code: 'residual_electricity',
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 100,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsDoubleLock,
|
||||
operationName: 'Double Lock',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
code: 'reverse_lock',
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: "ON",
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: "OFF",
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsRemoteUnlockViaApp,
|
||||
operationName: 'Remote Unlock Via App',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
code: 'unlock_app',
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 999,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsHijackAlarm,
|
||||
operationName: 'Hijack Alarm',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
code: 'hijack',
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: "ON",
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: "OFF",
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsDoorlockNormalOpen,
|
||||
operationName: 'Set Door Lock Normal Open',
|
||||
functionValue: functionValue,
|
||||
code: 'normal_open_switch',
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: "ON",
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: "OFF",
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsDoorlockNormalOpen,
|
||||
operationName: 'Doorbell',
|
||||
functionValue: functionValue,
|
||||
code: 'doorbell',
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: "ON",
|
||||
value: true,
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: "OFF",
|
||||
value: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsTempPasswordUnlock,
|
||||
operationName: 'Temporary Password Unlock',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
code: 'unlock_temporary',
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 999,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
class GatewayHelperFunctions {
|
||||
static List<SceneStaticFunction> tabToRunGatewayFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsSwitchAlarmSound,
|
||||
operationName: 'Switch Alarm Sound',
|
||||
code: 'switch_alarm_sound',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsMasterState,
|
||||
operationName: 'Master State',
|
||||
code: 'master_state',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: "Alarm",
|
||||
value: 'alarm',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: "Normal",
|
||||
value: 'normal',
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsFactoryReset,
|
||||
operationName: 'Factory Reset',
|
||||
code: 'factory_reset',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSceneRefresh, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsResetOff, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,260 @@
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
class HumanPresenceHelperFunctions {
|
||||
static List<SceneStaticFunction> tabToRunHumanPresenceFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsFarDetection,
|
||||
operationName: 'Far Detection',
|
||||
code: 'far_detection',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 75,
|
||||
description: '75cm',
|
||||
iconValue: '75',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 150,
|
||||
description: '150cm',
|
||||
iconValue: '150',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 225,
|
||||
description: '225cm',
|
||||
iconValue: '225',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 300,
|
||||
description: '300cm',
|
||||
iconValue: '300',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 375,
|
||||
description: '375cm',
|
||||
iconValue: '375',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 450,
|
||||
description: '450cm',
|
||||
iconValue: '450',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 525,
|
||||
description: '525cm',
|
||||
iconValue: '525',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 600,
|
||||
description: '600cm',
|
||||
iconValue: '600',
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsMotionDetection,
|
||||
operationName: 'Motion Detection Sensitivity',
|
||||
code: 'motion_sensitivity_value',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 1,
|
||||
description: 1.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 2,
|
||||
description: 2.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 3,
|
||||
description: 3.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 4,
|
||||
description: 4.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 5,
|
||||
description: 5.toString(),
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsMotionlessDetection,
|
||||
operationName: 'Motionless Detection Sensitivity',
|
||||
code: 'motionless_sensitivity',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
iconValue: '1',
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 1,
|
||||
description: '1',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 2,
|
||||
description: '2',
|
||||
iconValue: '2',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 3,
|
||||
description: '3',
|
||||
iconValue: '3',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 4,
|
||||
description: '4',
|
||||
iconValue: '4',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsFarDetectionFunction,
|
||||
value: 5,
|
||||
description: '5',
|
||||
iconValue: '5',
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsIndicator,
|
||||
operationName: 'Indicator',
|
||||
code: 'indicator',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
static List<SceneStaticFunction> automationHumanPresenceFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsPresenceState,
|
||||
operationName: 'Presence State',
|
||||
code: 'presence_state',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsIconsPresenceSensorAssetsEmpty,
|
||||
value: 'none',
|
||||
description: 'None',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsPresence,
|
||||
value: 'presence',
|
||||
description: 'Presence',
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsIconsPresenceSensorAssetsDistance,
|
||||
operationName: 'Current Distance',
|
||||
code: 'dis_current',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
value: 0.0,
|
||||
description: "CM",
|
||||
minValue: 1,
|
||||
maxValue: 600,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsIconsPresenceSensorAssetsIlluminanceValue,
|
||||
operationName: 'Illuminance Value',
|
||||
code: 'illuminance_value',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
value: 0.0,
|
||||
description: "Lux",
|
||||
minValue: 0,
|
||||
maxValue: 10000,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsIndicator,
|
||||
operationName: 'Indicator',
|
||||
code: 'indicator',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsIconsPresenceSensorAssetsTime,
|
||||
operationName: 'Presence Time',
|
||||
code: 'presence_time',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
value: 0.0,
|
||||
minValue: 0.0,
|
||||
maxValue: 65535,
|
||||
stepValue: 1,
|
||||
description: 'min'),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
class PresenceSensorHelperFunctions {
|
||||
static List<SceneStaticFunction> tabToRunPresenceSensorFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsSensitivityFunction,
|
||||
operationName: 'Sensitivity',
|
||||
code: 'sensitivity',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 1,
|
||||
description: 1.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 2,
|
||||
description: 2.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 3,
|
||||
description: 3.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 4,
|
||||
description: 4.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 5,
|
||||
description: 5.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 6,
|
||||
description: 6.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 7,
|
||||
description: 7.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 8,
|
||||
description: 8.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 9,
|
||||
description: 9.toString(),
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSensitivityOperationIcon,
|
||||
value: 10,
|
||||
description: 10.toString(),
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
static List<SceneStaticFunction> automationPresenceSensorFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsIconsSensors,
|
||||
operationName: 'Presence Status',
|
||||
code: 'presence_state',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsIconsPresenceSensorAssetsEmpty,
|
||||
value: 'none',
|
||||
description: 'None',
|
||||
),
|
||||
// SceneOperationalValue(
|
||||
// icon: Assets.assetsPresence,
|
||||
// value: 'presence',
|
||||
// description: 'Presence',
|
||||
// ),
|
||||
// SceneOperationalValue(
|
||||
// icon: Assets.assetsMotion,
|
||||
// value: 'motion',
|
||||
// description: 'Motion',
|
||||
// ),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsSensitivityFunction,
|
||||
operationName: 'Sensitivity',
|
||||
code: 'sensitivity',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 10,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsSelfTestResult,
|
||||
operationName: 'Self-Test Result',
|
||||
code: 'checking_result',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.listOfOptions,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsSelfTestResult,
|
||||
value: 'check_success',
|
||||
description: 'Self Testing Success',
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,200 @@
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
class ThreeGangHelperFunctions {
|
||||
static List<SceneStaticFunction> threeGangHelperFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Light 1 Switch',
|
||||
code: 'switch_1',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Light 2 Switch',
|
||||
code: 'switch_2',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Light 3 Switch',
|
||||
code: 'switch_3',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsLightCountdown,
|
||||
operationName: 'Light 1 CountDown',
|
||||
code: 'countdown_1',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.countdown,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(icon: '', value: 0),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsLightCountdown,
|
||||
operationName: 'Light 2 CountDown',
|
||||
code: 'countdown_2',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.countdown,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(icon: '', value: 0),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsLightCountdown,
|
||||
operationName: 'Light 3 CountDown',
|
||||
code: 'countdown_3',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.countdown,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(icon: '', value: 0),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
static List<SceneStaticFunction> threeGangAutomationFunctions(
|
||||
String deviceId, String deviceName, functionValue) {
|
||||
return [
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Light 1 Switch',
|
||||
code: 'switch_1',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Light 2 Switch',
|
||||
code: 'switch_2',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsAcPower,
|
||||
operationName: 'Light 3 Switch',
|
||||
code: 'switch_3',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.onOff,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsLightCountdown,
|
||||
operationName: 'Light 1 CountDown',
|
||||
code: 'countdown_1',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "sec",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 43200,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsLightCountdown,
|
||||
operationName: 'Light 2 CountDown',
|
||||
code: 'countdown_2',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "sec",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 43200,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
SceneStaticFunction(
|
||||
deviceId: deviceId,
|
||||
deviceName: deviceName,
|
||||
icon: Assets.assetsLightCountdown,
|
||||
operationName: 'Light 3 CountDown',
|
||||
code: 'countdown_3',
|
||||
functionValue: functionValue,
|
||||
operationDialogType: OperationDialogType.integerSteps,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(
|
||||
icon: '',
|
||||
description: "sec",
|
||||
value: 0.0,
|
||||
minValue: 0,
|
||||
maxValue: 43200,
|
||||
stepValue: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
@ -2,13 +2,14 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
|
||||
import 'package:syncrow_app/features/scene/bloc/smart_scene/smart_scene_select_dart_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/create_automation_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/create_scene_model.dart';
|
||||
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_countdown.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_functions_body.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_slider_steps.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_temperature_body.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
@ -20,84 +21,185 @@ mixin SceneLogicHelper {
|
||||
}
|
||||
|
||||
void handleSaveButtonPress(
|
||||
BuildContext context,
|
||||
TextEditingController sceneNameController,
|
||||
List<SceneStaticFunction> tasks, {
|
||||
BuildContext context, {
|
||||
required bool updateScene,
|
||||
required String sceneId,
|
||||
required bool isAutomation,
|
||||
required TextEditingController sceneName,
|
||||
required List<SceneStaticFunction> actions,
|
||||
required List<SceneStaticFunction> conditions,
|
||||
}) {
|
||||
if (isOnlyDelayOrDelayLast(tasks)) {
|
||||
// Show snackbar indicating restriction
|
||||
Navigator.pop(context);
|
||||
context.showCustomSnackbar(
|
||||
message: 'A single delay or delay-last operations are NOT allowed.',
|
||||
icon: const Icon(
|
||||
Icons.error,
|
||||
color: Colors.red,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
final createSceneModel = CreateSceneModel(
|
||||
unitUuid: HomeCubit.getInstance().selectedSpace!.id ?? '',
|
||||
sceneName: sceneNameController.text,
|
||||
decisionExpr: 'and',
|
||||
actions: List.generate(
|
||||
tasks.length,
|
||||
(index) {
|
||||
final task = tasks[index];
|
||||
if (task.deviceId == 'delay') {
|
||||
return CreateSceneAction(
|
||||
entityId: tasks[index].deviceId,
|
||||
actionExecutor: 'delay',
|
||||
executorProperty: CreateSceneExecutorProperty(
|
||||
functionCode: '',
|
||||
functionValue: '',
|
||||
delaySeconds: task.functionValue,
|
||||
final sceneBloc = context.read<CreateSceneBloc>();
|
||||
final smartSceneBloc = context.read<SmartSceneSelectBloc>();
|
||||
|
||||
if (isAutomation) {
|
||||
// Handle Automation Creation
|
||||
if (isOnlyDelayOrDelayLast(actions)) {
|
||||
Navigator.pop(context);
|
||||
context.showCustomSnackbar(
|
||||
message: 'A single delay or delay-last operations are NOT allowed.',
|
||||
icon: const Icon(
|
||||
Icons.error,
|
||||
color: Colors.red,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
final createAutomationModel = CreateAutomationModel(
|
||||
unitUuid: HomeCubit.getInstance().selectedSpace!.id ?? '',
|
||||
automationName: sceneName.text,
|
||||
decisionExpr: sceneBloc.conditionRule,
|
||||
effectiveTime: sceneBloc.effectiveTime ??
|
||||
EffectiveTime(start: '00:00', end: '23:59', loops: '1111111'),
|
||||
conditions: List.generate(
|
||||
conditions.length,
|
||||
(index) {
|
||||
final task = conditions[index];
|
||||
return CreateCondition(
|
||||
code: index + 1,
|
||||
entityId: task.deviceId,
|
||||
entityType: 'device_report',
|
||||
expr: ConditionExpr(
|
||||
statusCode: task.code,
|
||||
comparator: task.comparator ?? '==',
|
||||
statusValue: task.functionValue,
|
||||
),
|
||||
);
|
||||
}
|
||||
return CreateSceneAction(
|
||||
entityId: task.deviceId,
|
||||
actionExecutor: 'device_issue',
|
||||
executorProperty: CreateSceneExecutorProperty(
|
||||
functionCode: task.code,
|
||||
functionValue: task.functionValue,
|
||||
delaySeconds: 0,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
context.read<CreateSceneBloc>().add(CreateSceneWithTasksEvent(
|
||||
createSceneModel: createSceneModel,
|
||||
updateScene: updateScene,
|
||||
sceneId: sceneId,
|
||||
));
|
||||
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
...List.generate(
|
||||
actions.length,
|
||||
(index) {
|
||||
final task = actions[index];
|
||||
if (task.deviceId == 'delay') {
|
||||
return CreateSceneAction(
|
||||
entityId: actions[index].deviceId,
|
||||
actionExecutor: 'delay',
|
||||
executorProperty: CreateSceneExecutorProperty(
|
||||
functionCode: '',
|
||||
functionValue: '',
|
||||
delaySeconds: task.functionValue,
|
||||
),
|
||||
);
|
||||
}
|
||||
return CreateSceneAction(
|
||||
entityId: task.deviceId,
|
||||
actionExecutor: 'device_issue',
|
||||
executorProperty: CreateSceneExecutorProperty(
|
||||
functionCode: task.code,
|
||||
functionValue: task.functionValue,
|
||||
delaySeconds: 0,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (smartSceneBloc.smartSceneEnable != null)
|
||||
CreateSceneAction(
|
||||
entityId: smartSceneBloc.smartSceneEnable?.entityId ?? '',
|
||||
actionExecutor:
|
||||
smartSceneBloc.smartSceneEnable?.actionExecutor ?? '',
|
||||
executorProperty: null)
|
||||
],
|
||||
);
|
||||
sceneBloc.add(CreateSceneWithTasksEvent(
|
||||
createSceneModel: null,
|
||||
updateScene: updateScene,
|
||||
sceneId: sceneId,
|
||||
createAutomationModel: createAutomationModel,
|
||||
));
|
||||
Navigator.pop(context);
|
||||
}
|
||||
} else {
|
||||
if (isOnlyDelayOrDelayLast(actions)) {
|
||||
Navigator.pop(context);
|
||||
context.showCustomSnackbar(
|
||||
message: 'A single delay or delay-last operations are NOT allowed.',
|
||||
icon: const Icon(
|
||||
Icons.error,
|
||||
color: Colors.red,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Handle Scene Creation
|
||||
final createSceneModel = CreateSceneModel(
|
||||
unitUuid: HomeCubit.getInstance().selectedSpace!.id ?? '',
|
||||
sceneName: sceneName.text,
|
||||
decisionExpr: 'and',
|
||||
actions: [
|
||||
...List.generate(
|
||||
actions.length,
|
||||
(index) {
|
||||
final task = actions[index];
|
||||
if (task.deviceId == 'delay') {
|
||||
return CreateSceneAction(
|
||||
entityId: actions[index].deviceId,
|
||||
actionExecutor: 'delay',
|
||||
executorProperty: CreateSceneExecutorProperty(
|
||||
functionCode: '',
|
||||
functionValue: '',
|
||||
delaySeconds: task.functionValue,
|
||||
),
|
||||
);
|
||||
}
|
||||
return CreateSceneAction(
|
||||
entityId: task.deviceId,
|
||||
actionExecutor: 'device_issue',
|
||||
executorProperty: CreateSceneExecutorProperty(
|
||||
functionCode: task.code,
|
||||
functionValue: task.functionValue,
|
||||
delaySeconds: 0,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (smartSceneBloc.smartSceneEnable != null)
|
||||
CreateSceneAction(
|
||||
entityId: smartSceneBloc.smartSceneEnable?.entityId ?? '',
|
||||
actionExecutor:
|
||||
smartSceneBloc.smartSceneEnable?.actionExecutor ?? '',
|
||||
executorProperty: null)
|
||||
],
|
||||
);
|
||||
sceneBloc.add(CreateSceneWithTasksEvent(
|
||||
createSceneModel: createSceneModel,
|
||||
createAutomationModel: null,
|
||||
updateScene: updateScene,
|
||||
sceneId: sceneId,
|
||||
));
|
||||
Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Widget getTheCorrectDialogBody(
|
||||
SceneStaticFunction taskItem,
|
||||
) {
|
||||
if (taskItem.code.contains('temp_set')) {
|
||||
SceneStaticFunction taskItem, dynamic functionValue,
|
||||
{required bool isAutomation}) {
|
||||
if (taskItem.operationDialogType == OperationDialogType.temperature) {
|
||||
return AlertDialogTemperatureBody(
|
||||
taskItem: taskItem,
|
||||
functionValue: taskItem.functionValue,
|
||||
functionValue: functionValue ?? taskItem.functionValue,
|
||||
);
|
||||
} else if (taskItem.code.contains('countdown') ||
|
||||
taskItem.deviceId.contains('delay')) {
|
||||
} else if ((taskItem.operationDialogType ==
|
||||
OperationDialogType.countdown) ||
|
||||
(taskItem.operationDialogType == OperationDialogType.delay)) {
|
||||
return AlertDialogCountdown(
|
||||
durationValue: taskItem.functionValue,
|
||||
functionValue: taskItem.functionValue,
|
||||
durationValue: taskItem.functionValue ?? 0,
|
||||
functionValue: functionValue ?? taskItem.functionValue,
|
||||
function: taskItem,
|
||||
);
|
||||
} else if (taskItem.operationDialogType ==
|
||||
OperationDialogType.integerSteps) {
|
||||
return AlertDialogSliderSteps(
|
||||
taskItem: taskItem,
|
||||
functionValue: functionValue ?? taskItem.functionValue,
|
||||
isAutomation: isAutomation,
|
||||
);
|
||||
}
|
||||
|
||||
return AlertDialogFunctionsOperationsBody(
|
||||
taskItem: taskItem,
|
||||
functionValue: taskItem.functionValue,
|
||||
functionValue: functionValue ?? taskItem.functionValue,
|
||||
isAutomation: isAutomation,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
172
lib/features/scene/model/create_automation_model.dart
Normal file
@ -0,0 +1,172 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:syncrow_app/features/scene/model/create_scene_model.dart';
|
||||
|
||||
class CreateAutomationModel {
|
||||
String unitUuid;
|
||||
String automationName;
|
||||
String decisionExpr;
|
||||
EffectiveTime effectiveTime;
|
||||
List<CreateCondition> conditions;
|
||||
List<CreateSceneAction> actions;
|
||||
|
||||
CreateAutomationModel({
|
||||
required this.unitUuid,
|
||||
required this.automationName,
|
||||
required this.decisionExpr,
|
||||
required this.effectiveTime,
|
||||
required this.conditions,
|
||||
required this.actions,
|
||||
});
|
||||
|
||||
CreateAutomationModel copyWith({
|
||||
String? unitUuid,
|
||||
String? automationName,
|
||||
String? decisionExpr,
|
||||
EffectiveTime? effectiveTime,
|
||||
List<CreateCondition>? conditions,
|
||||
List<CreateSceneAction>? actions,
|
||||
}) {
|
||||
return CreateAutomationModel(
|
||||
unitUuid: unitUuid ?? this.unitUuid,
|
||||
automationName: automationName ?? this.automationName,
|
||||
decisionExpr: decisionExpr ?? this.decisionExpr,
|
||||
effectiveTime: effectiveTime ?? this.effectiveTime,
|
||||
conditions: conditions ?? this.conditions,
|
||||
actions: actions ?? this.actions,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap([String? automationId]) {
|
||||
return {
|
||||
if (automationId == null) 'unitUuid': unitUuid,
|
||||
'automationName': automationName,
|
||||
'decisionExpr': decisionExpr,
|
||||
'effectiveTime': effectiveTime.toMap(),
|
||||
'conditions': conditions.map((x) => x.toMap()).toList(),
|
||||
'actions': actions.map((x) => x.toMap()).toList(),
|
||||
};
|
||||
}
|
||||
|
||||
factory CreateAutomationModel.fromMap(Map<String, dynamic> map) {
|
||||
return CreateAutomationModel(
|
||||
unitUuid: map['unitUuid'] ?? '',
|
||||
automationName: map['automationName'] ?? '',
|
||||
decisionExpr: map['decisionExpr'] ?? '',
|
||||
effectiveTime: EffectiveTime.fromMap(map['effectiveTime']),
|
||||
conditions: List<CreateCondition>.from(
|
||||
map['conditions']?.map((x) => CreateCondition.fromMap(x))),
|
||||
actions: List<CreateSceneAction>.from(
|
||||
map['actions']?.map((x) => CreateSceneAction.fromMap(x))),
|
||||
);
|
||||
}
|
||||
|
||||
String toJson([String? automationId]) => json.encode(toMap(automationId));
|
||||
|
||||
factory CreateAutomationModel.fromJson(String source) =>
|
||||
CreateAutomationModel.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateAutomationModel(unitUuid: $unitUuid, automationName: $automationName, decisionExpr: $decisionExpr, effectiveTime: $effectiveTime, conditions: $conditions, actions: $actions)';
|
||||
}
|
||||
}
|
||||
|
||||
class EffectiveTime {
|
||||
String start;
|
||||
String end;
|
||||
String loops;
|
||||
|
||||
EffectiveTime({
|
||||
required this.start,
|
||||
required this.end,
|
||||
required this.loops,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'start': start,
|
||||
'end': end,
|
||||
'loops': loops,
|
||||
};
|
||||
}
|
||||
|
||||
factory EffectiveTime.fromMap(Map<String, dynamic> map) {
|
||||
return EffectiveTime(
|
||||
start: map['start'] ?? '',
|
||||
end: map['end'] ?? '',
|
||||
loops: map['loops'] ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'EffectiveTime(start: $start, end: $end, loops: $loops)';
|
||||
}
|
||||
|
||||
class CreateCondition {
|
||||
int code;
|
||||
String entityId;
|
||||
String entityType;
|
||||
ConditionExpr expr;
|
||||
|
||||
CreateCondition({
|
||||
required this.code,
|
||||
required this.entityId,
|
||||
required this.entityType,
|
||||
required this.expr,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'code': code,
|
||||
'entityId': entityId,
|
||||
'entityType': entityType,
|
||||
'expr': expr.toMap(),
|
||||
};
|
||||
}
|
||||
|
||||
factory CreateCondition.fromMap(Map<String, dynamic> map) {
|
||||
return CreateCondition(
|
||||
code: map['code'] ?? 0,
|
||||
entityId: map['entityId'] ?? '',
|
||||
entityType: map['entityType'] ?? '',
|
||||
expr: ConditionExpr.fromMap(map['expr']),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'CreateCondition(code: $code, entityId: $entityId, entityType: $entityType, expr: $expr)';
|
||||
}
|
||||
|
||||
class ConditionExpr {
|
||||
String statusCode;
|
||||
String comparator;
|
||||
dynamic statusValue;
|
||||
|
||||
ConditionExpr({
|
||||
required this.statusCode,
|
||||
required this.comparator,
|
||||
required this.statusValue,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'statusCode': statusCode,
|
||||
'comparator': comparator,
|
||||
'statusValue': statusValue,
|
||||
};
|
||||
}
|
||||
|
||||
factory ConditionExpr.fromMap(Map<String, dynamic> map) {
|
||||
return ConditionExpr(
|
||||
statusCode: map['statusCode'] ?? '',
|
||||
comparator: map['comparator'] ?? '',
|
||||
statusValue: map['statusValue'],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'ConditionExpr(statusCode: $statusCode, comparator: $comparator, statusValue: $statusValue)';
|
||||
}
|
@ -3,29 +3,11 @@ import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class CreateSceneModel {
|
||||
/*
|
||||
{
|
||||
"unitUuid": "string",
|
||||
"sceneName": "string",
|
||||
"decisionExpr": "string",
|
||||
"actions": [
|
||||
{
|
||||
"entityId": "string",
|
||||
"actionExecutor": "string",
|
||||
"executorProperty": {
|
||||
"functionCode": "string",
|
||||
"functionValue": {},
|
||||
"delaySeconds": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
*/
|
||||
|
||||
String unitUuid;
|
||||
String sceneName;
|
||||
String decisionExpr;
|
||||
List<CreateSceneAction> actions;
|
||||
|
||||
CreateSceneModel({
|
||||
required this.unitUuid,
|
||||
required this.sceneName,
|
||||
@ -99,7 +81,8 @@ class CreateSceneModel {
|
||||
class CreateSceneAction {
|
||||
String entityId;
|
||||
String actionExecutor;
|
||||
CreateSceneExecutorProperty executorProperty;
|
||||
CreateSceneExecutorProperty? executorProperty;
|
||||
|
||||
CreateSceneAction({
|
||||
required this.entityId,
|
||||
required this.actionExecutor,
|
||||
@ -122,7 +105,8 @@ class CreateSceneAction {
|
||||
return {
|
||||
'entityId': entityId,
|
||||
'actionExecutor': actionExecutor,
|
||||
'executorProperty': executorProperty.toMap(),
|
||||
if (executorProperty != null)
|
||||
'executorProperty': executorProperty?.toMap(actionExecutor),
|
||||
};
|
||||
}
|
||||
|
||||
@ -163,6 +147,7 @@ class CreateSceneExecutorProperty {
|
||||
String functionCode;
|
||||
dynamic functionValue;
|
||||
int delaySeconds;
|
||||
|
||||
CreateSceneExecutorProperty({
|
||||
required this.functionCode,
|
||||
required this.functionValue,
|
||||
@ -181,12 +166,14 @@ class CreateSceneExecutorProperty {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
if (functionCode.isNotEmpty == true) 'functionCode': functionCode,
|
||||
if (functionValue != '') 'functionValue': functionValue,
|
||||
if (delaySeconds > 0) 'delaySeconds': delaySeconds,
|
||||
};
|
||||
Map<String, dynamic> toMap(String actionExecutor) {
|
||||
final map = <String, dynamic>{};
|
||||
if (functionCode.isNotEmpty) map['functionCode'] = functionCode;
|
||||
if (functionValue != null) map['functionValue'] = functionValue;
|
||||
if (actionExecutor == 'delay' && delaySeconds > 0) {
|
||||
map['delaySeconds'] = delaySeconds;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
factory CreateSceneExecutorProperty.fromMap(Map<String, dynamic> map) {
|
||||
@ -197,7 +184,7 @@ class CreateSceneExecutorProperty {
|
||||
);
|
||||
}
|
||||
|
||||
String toJson() => json.encode(toMap());
|
||||
String toJson(String actionExecutor) => json.encode(toMap(actionExecutor));
|
||||
|
||||
factory CreateSceneExecutorProperty.fromJson(String source) =>
|
||||
CreateSceneExecutorProperty.fromMap(json.decode(source));
|
||||
|
@ -6,6 +6,9 @@ class SceneDetailsModel {
|
||||
final String status;
|
||||
final String type;
|
||||
final List<Action> actions;
|
||||
final List<Condition>? conditions;
|
||||
final String? decisionExpr;
|
||||
final EffectiveTime? effectiveTime;
|
||||
|
||||
SceneDetailsModel({
|
||||
required this.id,
|
||||
@ -13,6 +16,9 @@ class SceneDetailsModel {
|
||||
required this.status,
|
||||
required this.type,
|
||||
required this.actions,
|
||||
this.conditions,
|
||||
this.decisionExpr,
|
||||
this.effectiveTime,
|
||||
});
|
||||
|
||||
factory SceneDetailsModel.fromRawJson(String str) =>
|
||||
@ -26,8 +32,20 @@ class SceneDetailsModel {
|
||||
name: json["name"],
|
||||
status: json["status"],
|
||||
type: json["type"],
|
||||
actions:
|
||||
List<Action>.from(json["actions"].map((x) => Action.fromJson(x))),
|
||||
actions: (json["actions"] as List)
|
||||
.map((x) => Action.fromJson(x))
|
||||
.where((x) => x != null)
|
||||
.toList()
|
||||
.cast<Action>(),
|
||||
conditions: json["conditions"] != null
|
||||
? (json["conditions"] as List)
|
||||
.map((x) => Condition.fromJson(x))
|
||||
.toList()
|
||||
: null,
|
||||
decisionExpr: json["decisionExpr"],
|
||||
effectiveTime: json["effectiveTime"] != null
|
||||
? EffectiveTime.fromJson(json["effectiveTime"])
|
||||
: null,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
@ -36,6 +54,11 @@ class SceneDetailsModel {
|
||||
"status": status,
|
||||
"type": type,
|
||||
"actions": List<dynamic>.from(actions.map((x) => x.toJson())),
|
||||
"conditions": conditions != null
|
||||
? List<dynamic>.from(conditions!.map((x) => x.toJson()))
|
||||
: null,
|
||||
"decisionExpr": decisionExpr,
|
||||
"effectiveTime": effectiveTime?.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
@ -50,15 +73,19 @@ class Action {
|
||||
required this.executorProperty,
|
||||
});
|
||||
|
||||
factory Action.fromRawJson(String str) => Action.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory Action.fromJson(Map<String, dynamic> json) => Action(
|
||||
actionExecutor: json["actionExecutor"],
|
||||
entityId: json["entityId"],
|
||||
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
|
||||
);
|
||||
static Action? fromJson(Map<String, dynamic> json) {
|
||||
if (json["executorProperty"] == null) {
|
||||
return null; // Return null if executorProperty is not present
|
||||
}
|
||||
|
||||
return Action(
|
||||
actionExecutor: json["actionExecutor"],
|
||||
entityId: json["entityId"],
|
||||
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"actionExecutor": actionExecutor,
|
||||
@ -91,3 +118,93 @@ class ExecutorProperty {
|
||||
"delaySeconds": delaySeconds,
|
||||
};
|
||||
}
|
||||
|
||||
class Condition {
|
||||
final int code;
|
||||
final String entityId;
|
||||
final String entityType;
|
||||
final Expr expr;
|
||||
|
||||
Condition({
|
||||
required this.code,
|
||||
required this.entityId,
|
||||
required this.entityType,
|
||||
required this.expr,
|
||||
});
|
||||
|
||||
factory Condition.fromRawJson(String str) =>
|
||||
Condition.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory Condition.fromJson(Map<String, dynamic> json) => Condition(
|
||||
code: json["code"],
|
||||
entityId: json["entityId"],
|
||||
entityType: json["entityType"],
|
||||
expr: Expr.fromJson(json["expr"]),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"code": code,
|
||||
"entityId": entityId,
|
||||
"entityType": entityType,
|
||||
"expr": expr.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
class Expr {
|
||||
final String comparator;
|
||||
final String statusCode;
|
||||
final dynamic statusValue;
|
||||
|
||||
Expr({
|
||||
required this.comparator,
|
||||
required this.statusCode,
|
||||
required this.statusValue,
|
||||
});
|
||||
|
||||
factory Expr.fromRawJson(String str) => Expr.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory Expr.fromJson(Map<String, dynamic> json) => Expr(
|
||||
comparator: json["comparator"],
|
||||
statusCode: json["statusCode"],
|
||||
statusValue: json["statusValue"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"comparator": comparator,
|
||||
"statusCode": statusCode,
|
||||
"statusValue": statusValue,
|
||||
};
|
||||
}
|
||||
|
||||
class EffectiveTime {
|
||||
final String start;
|
||||
final String end;
|
||||
final String loops;
|
||||
|
||||
EffectiveTime({
|
||||
required this.start,
|
||||
required this.end,
|
||||
required this.loops,
|
||||
});
|
||||
|
||||
factory EffectiveTime.fromRawJson(String str) =>
|
||||
EffectiveTime.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory EffectiveTime.fromJson(Map<String, dynamic> json) => EffectiveTime(
|
||||
start: json["start"],
|
||||
end: json["end"],
|
||||
loops: json["loops"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"start": start,
|
||||
"end": end,
|
||||
"loops": loops,
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class SceneStaticFunction {
|
||||
@ -13,6 +14,8 @@ class SceneStaticFunction {
|
||||
final String uniqueCustomId;
|
||||
final dynamic functionValue;
|
||||
final String? deviceIcon;
|
||||
final OperationDialogType operationDialogType;
|
||||
final String? comparator;
|
||||
|
||||
SceneStaticFunction({
|
||||
required this.icon,
|
||||
@ -23,6 +26,8 @@ class SceneStaticFunction {
|
||||
required this.operationName,
|
||||
required this.functionValue,
|
||||
this.deviceIcon,
|
||||
required this.operationDialogType,
|
||||
this.comparator,
|
||||
}) : uniqueCustomId = const Uuid().v4();
|
||||
|
||||
SceneStaticFunction copyWith({
|
||||
@ -35,6 +40,8 @@ class SceneStaticFunction {
|
||||
dynamic functionValue,
|
||||
String? deviceIcon,
|
||||
String? deviceName,
|
||||
OperationDialogType? operationDialogType,
|
||||
String? comparator,
|
||||
}) {
|
||||
return SceneStaticFunction(
|
||||
icon: icon ?? this.icon,
|
||||
@ -45,6 +52,8 @@ class SceneStaticFunction {
|
||||
operationName: operationName ?? this.operationName,
|
||||
functionValue: functionValue ?? this.functionValue,
|
||||
deviceIcon: deviceIcon ?? this.deviceIcon,
|
||||
operationDialogType: operationDialogType ?? this.operationDialogType,
|
||||
comparator: comparator ?? this.comparator,
|
||||
);
|
||||
}
|
||||
|
||||
@ -57,8 +66,9 @@ class SceneStaticFunction {
|
||||
'deviceId': deviceId,
|
||||
'operationName': operationName,
|
||||
'functionValue': functionValue,
|
||||
'deviceIcon': deviceIcon
|
||||
|
||||
'deviceIcon': deviceIcon,
|
||||
'operationDialogType': operationDialogType.name,
|
||||
'comparator': comparator
|
||||
};
|
||||
}
|
||||
|
||||
@ -74,6 +84,10 @@ class SceneStaticFunction {
|
||||
operationName: map['operationName'] ?? '',
|
||||
functionValue: map['functionValue'] ?? '',
|
||||
deviceIcon: map['deviceIcon'] ?? '',
|
||||
operationDialogType: map['operationDialogType'] != null
|
||||
? OperationDialogType.values.byName(map['operationDialogType'])
|
||||
: OperationDialogType.none,
|
||||
comparator: map['comparator'],
|
||||
);
|
||||
}
|
||||
|
||||
@ -84,7 +98,7 @@ class SceneStaticFunction {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon)';
|
||||
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon, operationDialogType: $operationDialogType, comparator: $comparator)';
|
||||
}
|
||||
|
||||
@override
|
||||
@ -98,6 +112,8 @@ class SceneStaticFunction {
|
||||
other.operationName == operationName &&
|
||||
other.functionValue == functionValue &&
|
||||
other.deviceIcon == deviceIcon &&
|
||||
other.comparator == comparator &&
|
||||
other.operationDialogType == operationDialogType &&
|
||||
listEquals(other.operationalValues, operationalValues) &&
|
||||
other.deviceId == deviceId;
|
||||
}
|
||||
@ -111,6 +127,8 @@ class SceneStaticFunction {
|
||||
operationName.hashCode ^
|
||||
functionValue.hashCode ^
|
||||
deviceIcon.hashCode ^
|
||||
comparator.hashCode ^
|
||||
operationDialogType.hashCode ^
|
||||
operationalValues.hashCode;
|
||||
}
|
||||
}
|
||||
@ -120,12 +138,18 @@ class SceneOperationalValue {
|
||||
final dynamic value;
|
||||
final String? description;
|
||||
final String? iconValue;
|
||||
final double? minValue;
|
||||
final double? maxValue;
|
||||
final double? stepValue;
|
||||
|
||||
SceneOperationalValue({
|
||||
required this.icon,
|
||||
required this.value,
|
||||
this.description,
|
||||
this.iconValue,
|
||||
this.minValue,
|
||||
this.maxValue,
|
||||
this.stepValue,
|
||||
});
|
||||
|
||||
SceneOperationalValue copyWith({
|
||||
@ -133,12 +157,18 @@ class SceneOperationalValue {
|
||||
dynamic value,
|
||||
String? description,
|
||||
String? iconValue,
|
||||
double? minValue,
|
||||
double? maxValue,
|
||||
double? stepValue,
|
||||
}) {
|
||||
return SceneOperationalValue(
|
||||
icon: icon ?? this.icon,
|
||||
value: value ?? this.value,
|
||||
description: description ?? this.description,
|
||||
iconValue: iconValue ?? this.iconValue,
|
||||
minValue: minValue ?? this.minValue,
|
||||
maxValue: maxValue ?? this.maxValue,
|
||||
stepValue: stepValue ?? this.stepValue,
|
||||
);
|
||||
}
|
||||
|
||||
@ -147,7 +177,10 @@ class SceneOperationalValue {
|
||||
'icon': icon,
|
||||
'value': value,
|
||||
'description': description,
|
||||
'iconValue': iconValue
|
||||
'iconValue': iconValue,
|
||||
'minValue': minValue,
|
||||
'maxValue': maxValue,
|
||||
'stepValue': stepValue
|
||||
};
|
||||
}
|
||||
|
||||
@ -157,6 +190,9 @@ class SceneOperationalValue {
|
||||
value: map['value'],
|
||||
description: map['description'],
|
||||
iconValue: map['iconValue'] ?? '',
|
||||
minValue: map['minValue'],
|
||||
maxValue: map['maxValue'],
|
||||
stepValue: map['stepValue'],
|
||||
);
|
||||
}
|
||||
|
||||
@ -167,7 +203,7 @@ class SceneOperationalValue {
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'StaticFunctionOperationHelper(icon: $icon, value: $value, description: $description, iconValue: $iconValue)';
|
||||
'StaticFunctionOperationHelper(icon: $icon, value: $value, description: $description, iconValue: $iconValue, minValue: $minValue, maxValue: $maxValue, stepValue: $stepValue)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
@ -177,6 +213,9 @@ class SceneOperationalValue {
|
||||
other.icon == icon &&
|
||||
other.description == description &&
|
||||
other.iconValue == iconValue &&
|
||||
other.minValue == minValue &&
|
||||
other.maxValue == maxValue &&
|
||||
other.stepValue == stepValue &&
|
||||
other.value == value;
|
||||
}
|
||||
|
||||
@ -186,5 +225,8 @@ class SceneOperationalValue {
|
||||
value.hashCode ^
|
||||
description.hashCode ^
|
||||
iconValue.hashCode ^
|
||||
minValue.hashCode ^
|
||||
maxValue.hashCode ^
|
||||
stepValue.hashCode ^
|
||||
description.hashCode;
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ import 'dart:convert';
|
||||
class ScenesModel {
|
||||
final String id;
|
||||
final String name;
|
||||
final Status status;
|
||||
final Type type;
|
||||
final String status;
|
||||
final String type;
|
||||
|
||||
ScenesModel({
|
||||
required this.id,
|
||||
@ -20,35 +20,15 @@ class ScenesModel {
|
||||
|
||||
factory ScenesModel.fromJson(Map<String, dynamic> json) => ScenesModel(
|
||||
id: json["id"],
|
||||
name: json["name"],
|
||||
status: statusValues.map[json["status"]]!,
|
||||
type: typeValues.map[json["type"]]!,
|
||||
name: json["name"] ?? '',
|
||||
status: json["status"] ?? '',
|
||||
type: json["type"] ?? '',
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"name": name,
|
||||
"status": statusValues.reverse[status],
|
||||
"type": typeValues.reverse[type],
|
||||
"status": status,
|
||||
"type": type,
|
||||
};
|
||||
}
|
||||
|
||||
enum Status { ENABLE }
|
||||
|
||||
final statusValues = EnumValues({"enable": Status.ENABLE});
|
||||
|
||||
enum Type { TAP_TO_RUN }
|
||||
|
||||
final typeValues = EnumValues({"tap_to_run": Type.TAP_TO_RUN});
|
||||
|
||||
class EnumValues<T> {
|
||||
Map<String, T> map;
|
||||
late Map<T, String> reverseMap;
|
||||
|
||||
EnumValues(this.map);
|
||||
|
||||
Map<T, String> get reverse {
|
||||
reverseMap = map.map((k, v) => MapEntry(v, k));
|
||||
return reverseMap;
|
||||
}
|
||||
}
|
||||
|
23
lib/features/scene/model/smart_scene_enable.dart
Normal file
@ -0,0 +1,23 @@
|
||||
class SmartSceneEnable {
|
||||
final String entityId;
|
||||
final String actionExecutor;
|
||||
|
||||
SmartSceneEnable({
|
||||
required this.entityId,
|
||||
required this.actionExecutor,
|
||||
});
|
||||
|
||||
factory SmartSceneEnable.fromJson(Map<String, dynamic> json) {
|
||||
return SmartSceneEnable(
|
||||
entityId: json['entityId'],
|
||||
actionExecutor: json['actionExecutor'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'entityId': entityId,
|
||||
'actionExecutor': actionExecutor,
|
||||
};
|
||||
}
|
||||
}
|
38
lib/features/scene/model/update_automation.dart
Normal file
@ -0,0 +1,38 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class AutomationStatusUpdate {
|
||||
final String unitUuid;
|
||||
final bool isEnable;
|
||||
|
||||
AutomationStatusUpdate({
|
||||
required this.unitUuid,
|
||||
required this.isEnable,
|
||||
});
|
||||
|
||||
factory AutomationStatusUpdate.fromRawJson(String str) =>
|
||||
AutomationStatusUpdate.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory AutomationStatusUpdate.fromJson(Map<String, dynamic> json) =>
|
||||
AutomationStatusUpdate(
|
||||
unitUuid: json["unitUuid"],
|
||||
isEnable: json["isEnable"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"unitUuid": unitUuid,
|
||||
"isEnable": isEnable,
|
||||
};
|
||||
|
||||
factory AutomationStatusUpdate.fromMap(Map<String, dynamic> map) =>
|
||||
AutomationStatusUpdate(
|
||||
unitUuid: map["unitUuid"],
|
||||
isEnable: map["isEnable"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toMap() => {
|
||||
"unitUuid": unitUuid,
|
||||
"isEnable": isEnable,
|
||||
};
|
||||
}
|
@ -6,10 +6,9 @@ import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/navigate_to_route.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
|
||||
class CreateSceneView extends StatelessWidget {
|
||||
@ -22,7 +21,7 @@ class CreateSceneView extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(top: 24),
|
||||
leading: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
navigateToRoute(context, Routes.sceneTasksRoute);
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios,
|
||||
@ -48,6 +47,9 @@ class CreateSceneView extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
context.read<CreateSceneBloc>().add(const ClearTaskListEvent());
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(const SceneTypeEvent(CreateSceneEnum.tabToRun));
|
||||
},
|
||||
),
|
||||
DefaultContainer(
|
||||
@ -58,7 +60,22 @@ class CreateSceneView extends StatelessWidget {
|
||||
titleString: StringsManager.whenDeviceStatusChanges,
|
||||
subtitleString: StringsManager.whenUnusualActivityIsDetected,
|
||||
),
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
Routes.sceneControlDevicesRoute,
|
||||
arguments: SceneSettingsRouteArguments(
|
||||
sceneType: CreateSceneEnum.deviceStatusChanges.name,
|
||||
sceneId: '',
|
||||
sceneName: '',
|
||||
),
|
||||
);
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(const ClearTaskListEvent(isAutomation: true));
|
||||
context.read<CreateSceneBloc>().add(
|
||||
const SceneTypeEvent(CreateSceneEnum.deviceStatusChanges));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -1,33 +1,37 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/scene_logic_helper.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/scene_operations_data_helper.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_countdown.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_functions_body.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_temperature_body.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/light_divider.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/navigation/navigate_to_route.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class DeviceFunctionsView extends StatelessWidget
|
||||
with SceneOperationsDataHelper {
|
||||
const DeviceFunctionsView({super.key});
|
||||
with SceneOperationsDataHelper, SceneLogicHelper {
|
||||
DeviceFunctionsView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
/// this whole widget needs a refactor later
|
||||
///
|
||||
/// static functions based on type
|
||||
final device = ModalRoute.of(context)?.settings.arguments as DeviceModel;
|
||||
final device = (ModalRoute.of(context)?.settings.arguments as Map)['device']
|
||||
as DeviceModel;
|
||||
|
||||
final isAutomation = (ModalRoute.of(context)?.settings.arguments
|
||||
as Map)['isAutomationDeviceStatus'] as bool;
|
||||
|
||||
/// static custom functions based on type
|
||||
/// used for now until later backend fixes
|
||||
@ -38,6 +42,7 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
functions: device.functions,
|
||||
deviceId: device.uuid ?? '',
|
||||
deviceName: device.name ?? '',
|
||||
isAutomation: isAutomation,
|
||||
);
|
||||
}
|
||||
|
||||
@ -46,10 +51,10 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.read<CreateSceneBloc>().add(AddTaskEvent());
|
||||
Navigator.popUntil(context, (route) {
|
||||
return route.settings.name == Routes.sceneTasksRoute;
|
||||
});
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(AddTaskEvent(isAutomation: isAutomation));
|
||||
navigateToRoute(context, Routes.sceneTasksRoute);
|
||||
},
|
||||
child: BodyMedium(
|
||||
text: 'Save',
|
||||
@ -60,6 +65,16 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
],
|
||||
leading: TextButton(
|
||||
onPressed: () {
|
||||
final automationSelectedValue =
|
||||
context.read<CreateSceneBloc>().automationSelectedValues;
|
||||
for (var element in device.functions) {
|
||||
if (automationSelectedValue.containsKey(element.code)) {
|
||||
context.read<CreateSceneBloc>().add(RemoveTempTaskByIdEvent(
|
||||
code: element.code!, isAutomation: true));
|
||||
context.read<CreateSceneBloc>().add(RemoveFromSelectedValueById(
|
||||
code: element.code!, isAutomation: true));
|
||||
}
|
||||
}
|
||||
final selectedValue =
|
||||
context.read<CreateSceneBloc>().selectedValues;
|
||||
for (var element in device.functions) {
|
||||
@ -83,136 +98,180 @@ class DeviceFunctionsView extends StatelessWidget
|
||||
),
|
||||
leadingWidth: 80,
|
||||
padding: EdgeInsets.zero,
|
||||
child: Padding(
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: functions.length,
|
||||
padding: const EdgeInsets.only(top: 24.0),
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: functions.length,
|
||||
padding: EdgeInsets.zero,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
return DefaultContainer(
|
||||
padding: index == 0
|
||||
? const EdgeInsets.only(top: 8)
|
||||
: index == functions.length - 1
|
||||
? const EdgeInsets.only(bottom: 8)
|
||||
: EdgeInsets.zero,
|
||||
margin: EdgeInsets.zero,
|
||||
borderRadius: index == 0
|
||||
? const BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20))
|
||||
: index == functions.length - 1
|
||||
? const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(20),
|
||||
bottomRight: Radius.circular(20))
|
||||
: BorderRadius.zero,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
return SceneListTile(
|
||||
iconsSize: 22,
|
||||
minLeadingWidth: 20,
|
||||
assetPath: functions[index].icon,
|
||||
titleString: functions[index].operationName,
|
||||
trailingWidget: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
/// selected value or the default value
|
||||
// BodyMedium(text: ),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios_rounded,
|
||||
color: ColorsManager.greyColor,
|
||||
size: 16,
|
||||
),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
final functionValues = context
|
||||
.read<CreateSceneBloc>()
|
||||
.selectedValues[functions[index].code];
|
||||
|
||||
context.customAlertDialog(
|
||||
alertBody: functions[index].code == 'temp_set'
|
||||
? AlertDialogTemperatureBody(
|
||||
taskItem: functions[index],
|
||||
functionValue: functionValues,
|
||||
)
|
||||
: (functions[index]
|
||||
.code
|
||||
.contains('countdown') ||
|
||||
functions[index]
|
||||
.code
|
||||
.contains('presence_time'))
|
||||
? AlertDialogCountdown(
|
||||
durationValue: functions[index]
|
||||
.operationalValues
|
||||
.first
|
||||
.value,
|
||||
function: functions[index],
|
||||
functionValue: functionValues,
|
||||
)
|
||||
: AlertDialogFunctionsOperationsBody(
|
||||
taskItem: functions[index],
|
||||
functionValue: functionValues,
|
||||
),
|
||||
title: functions[index].operationName,
|
||||
onConfirm: () {
|
||||
final selectedValue = context
|
||||
.read<CreateSceneBloc>()
|
||||
.selectedValues[functions[index].code];
|
||||
if (selectedValue == null) {
|
||||
return;
|
||||
}
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(TempHoldSceneTasksEvent(
|
||||
deviceControlModel: DeviceControlModel(
|
||||
deviceId: device.uuid,
|
||||
code: functions[index].code,
|
||||
value: selectedValue,
|
||||
),
|
||||
deviceId: device.uuid ?? '',
|
||||
operation: functions[index].operationName,
|
||||
icon: device.icon ?? '',
|
||||
deviceName: device.name ?? '',
|
||||
uniqueId: functions[index].uniqueCustomId,
|
||||
));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
onDismiss: () {
|
||||
final tempTaskList = context
|
||||
.read<CreateSceneBloc>()
|
||||
.tempTasksList;
|
||||
for (var element in tempTaskList) {
|
||||
if (element.code == functions[index].code) {
|
||||
context.read<CreateSceneBloc>().add(
|
||||
RemoveTempTaskByIdEvent(
|
||||
code: functions[index].code));
|
||||
context.read<CreateSceneBloc>().add(
|
||||
RemoveFromSelectedValueById(
|
||||
code: functions[index].code));
|
||||
}
|
||||
}
|
||||
Navigator.pop(context);
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
return DefaultContainer(
|
||||
padding: index == 0
|
||||
? const EdgeInsets.only(top: 8)
|
||||
: index == functions.length - 1
|
||||
? const EdgeInsets.only(bottom: 8)
|
||||
: EdgeInsets.zero,
|
||||
margin: EdgeInsets.zero,
|
||||
borderRadius: index == 0
|
||||
? const BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20))
|
||||
: index == functions.length - 1
|
||||
? const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(20),
|
||||
bottomRight: Radius.circular(20))
|
||||
: BorderRadius.zero,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
return SceneListTile(
|
||||
iconsSize: 22,
|
||||
minLeadingWidth: 20,
|
||||
assetPath: functions[index].icon,
|
||||
titleString: functions[index].operationName,
|
||||
trailingWidget: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
/// selected value or the default value
|
||||
// BodyMedium(text: ),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios_rounded,
|
||||
color: ColorsManager.greyColor,
|
||||
size: 16,
|
||||
),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
if (isAutomation) {
|
||||
_showAutomationDialog(
|
||||
context,
|
||||
functions[index],
|
||||
device,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
index != functions.length - 1
|
||||
? SizedBox(
|
||||
width: context.width * 0.8,
|
||||
child: const LightDivider())
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
} else {
|
||||
_showTabToRunDialog(
|
||||
context,
|
||||
functions[index],
|
||||
device,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
index != functions.length - 1
|
||||
? SizedBox(
|
||||
width: context.width * 0.8,
|
||||
child: const LightDivider())
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
void _showTabToRunDialog(
|
||||
BuildContext context,
|
||||
SceneStaticFunction function,
|
||||
DeviceModel device,
|
||||
) {
|
||||
final functionValues =
|
||||
context.read<CreateSceneBloc>().selectedValues[function.code];
|
||||
|
||||
context.customAlertDialog(
|
||||
alertBody: getTheCorrectDialogBody(
|
||||
function,
|
||||
functionValues,
|
||||
isAutomation: false,
|
||||
),
|
||||
title: function.operationName,
|
||||
onConfirm: () {
|
||||
final selectedValue =
|
||||
context.read<CreateSceneBloc>().selectedValues[function.code];
|
||||
if (selectedValue == null) {
|
||||
return;
|
||||
}
|
||||
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
|
||||
deviceControlModel: DeviceControlModel(
|
||||
deviceId: device.uuid,
|
||||
code: function.code,
|
||||
value: selectedValue,
|
||||
),
|
||||
deviceId: device.uuid ?? '',
|
||||
operation: function.operationName,
|
||||
icon: device.icon ?? '',
|
||||
deviceName: device.name ?? '',
|
||||
uniqueId: function.uniqueCustomId,
|
||||
operationType: function.operationDialogType,
|
||||
));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
onDismiss: () {
|
||||
final tempTaskList = context.read<CreateSceneBloc>().tempTasksList;
|
||||
for (var element in tempTaskList) {
|
||||
if (element.code == function.code) {
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(RemoveTempTaskByIdEvent(code: function.code));
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(RemoveFromSelectedValueById(code: function.code));
|
||||
}
|
||||
}
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _showAutomationDialog(
|
||||
BuildContext context, SceneStaticFunction function, DeviceModel device) {
|
||||
final automationFunctionValues =
|
||||
context.read<CreateSceneBloc>().automationSelectedValues[function.code];
|
||||
|
||||
context.customAlertDialog(
|
||||
alertBody: getTheCorrectDialogBody(
|
||||
function,
|
||||
automationFunctionValues,
|
||||
isAutomation: true,
|
||||
),
|
||||
title: function.operationName,
|
||||
onConfirm: () {
|
||||
final automationFunctionValues = context
|
||||
.read<CreateSceneBloc>()
|
||||
.automationSelectedValues[function.code];
|
||||
if (automationFunctionValues == null) {
|
||||
return;
|
||||
}
|
||||
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
|
||||
deviceControlModel: DeviceControlModel(
|
||||
deviceId: device.uuid,
|
||||
code: function.code,
|
||||
value: automationFunctionValues,
|
||||
),
|
||||
deviceId: device.uuid ?? '',
|
||||
operation: function.operationName,
|
||||
icon: device.icon ?? '',
|
||||
deviceName: device.name ?? '',
|
||||
uniqueId: function.uniqueCustomId,
|
||||
operationType: function.operationDialogType,
|
||||
isAutomation: true,
|
||||
));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
onDismiss: () {
|
||||
final automationTempTaskList =
|
||||
context.read<CreateSceneBloc>().automationTempTasksList;
|
||||
for (var element in automationTempTaskList) {
|
||||
if (element.code == function.code) {
|
||||
context.read<CreateSceneBloc>().add(RemoveTempTaskByIdEvent(
|
||||
code: function.code, isAutomation: true));
|
||||
context.read<CreateSceneBloc>().add(RemoveFromSelectedValueById(
|
||||
code: function.code, isAutomation: true));
|
||||
}
|
||||
}
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
66
lib/features/scene/view/scene_auto_settings.dart
Normal file
@ -0,0 +1,66 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_tasks_view.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/effective_period_setting/effective_period_bottom_sheet.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
||||
|
||||
class SceneAutoSettings extends StatelessWidget {
|
||||
const SceneAutoSettings({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final sceneSettings =
|
||||
ModalRoute.of(context)!.settings.arguments as Map<String, dynamic>? ??
|
||||
{};
|
||||
final sceneId = sceneSettings['sceneId'] as String? ?? '';
|
||||
final isAutomation = sceneSettings['isAutomation'] as bool? ?? false;
|
||||
final sceneName = sceneSettings['sceneName'] as String? ?? '';
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: ColorsManager.backgroundColor,
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
backgroundColor: ColorsManager.backgroundColor,
|
||||
title: const BodyLarge(
|
||||
text: "Settings",
|
||||
fontColor: ColorsManager.secondaryColor,
|
||||
fontWeight: FontsManager.bold,
|
||||
),
|
||||
),
|
||||
body: DefaultContainer(
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Visibility(
|
||||
visible: isAutomation == true,
|
||||
child: SceneListTile(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
titleString: "Effective Period",
|
||||
trailingWidget: const Icon(Icons.arrow_forward_ios_rounded),
|
||||
onPressed: () {
|
||||
context.customBottomSheet(
|
||||
child: const EffectPeriodBottomSheetContent(),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: sceneName.isNotEmpty,
|
||||
child: DeleteBottomSheetContent(
|
||||
isAutomation: isAutomation,
|
||||
sceneId: sceneId,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -8,6 +8,8 @@ import 'package:syncrow_app/features/scene/bloc/tab_change/tab_change_event.dart
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_devices/scene_devices_body.dart';
|
||||
|
||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||
import 'package:syncrow_app/navigation/navigate_to_route.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
|
||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
@ -16,10 +18,12 @@ class SceneRoomsTabBarDevicesView extends StatefulWidget {
|
||||
const SceneRoomsTabBarDevicesView({super.key});
|
||||
|
||||
@override
|
||||
State<SceneRoomsTabBarDevicesView> createState() => _SceneRoomsTabBarDevicesViewState();
|
||||
State<SceneRoomsTabBarDevicesView> createState() =>
|
||||
_SceneRoomsTabBarDevicesViewState();
|
||||
}
|
||||
|
||||
class _SceneRoomsTabBarDevicesViewState extends State<SceneRoomsTabBarDevicesView>
|
||||
class _SceneRoomsTabBarDevicesViewState
|
||||
extends State<SceneRoomsTabBarDevicesView>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late final TabController _tabController;
|
||||
List<RoomModel>? rooms = [];
|
||||
@ -41,7 +45,8 @@ class _SceneRoomsTabBarDevicesViewState extends State<SceneRoomsTabBarDevicesVie
|
||||
}
|
||||
}
|
||||
|
||||
_tabController = TabController(length: rooms!.length, vsync: this, initialIndex: 0);
|
||||
_tabController =
|
||||
TabController(length: rooms!.length, vsync: this, initialIndex: 0);
|
||||
_tabController.addListener(_handleTabSwitched);
|
||||
super.initState();
|
||||
}
|
||||
@ -51,9 +56,8 @@ class _SceneRoomsTabBarDevicesViewState extends State<SceneRoomsTabBarDevicesVie
|
||||
final value = _tabController.index;
|
||||
|
||||
/// select tab
|
||||
context
|
||||
.read<TabBarBloc>()
|
||||
.add(TabChanged(selectedIndex: value, roomId: rooms?[value].id ?? ''));
|
||||
context.read<TabBarBloc>().add(
|
||||
TabChanged(selectedIndex: value, roomId: rooms?[value].id ?? ''));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -72,8 +76,7 @@ class _SceneRoomsTabBarDevicesViewState extends State<SceneRoomsTabBarDevicesVie
|
||||
padding: EdgeInsets.zero,
|
||||
leading: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
navigateToRoute(context, Routes.sceneTasksRoute);
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios,
|
||||
|
@ -5,6 +5,7 @@ import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_event.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/create_scene_save_button.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/if_then_containers/if_container.dart';
|
||||
@ -13,6 +14,8 @@ import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/navigate_to_route.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
@ -24,28 +27,38 @@ class SceneTasksView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final sceneSettings = ModalRoute.of(context)!.settings.arguments
|
||||
as SceneSettingsRouteArguments;
|
||||
|
||||
final isAutomation =
|
||||
sceneSettings.sceneType == CreateSceneEnum.deviceStatusChanges.name;
|
||||
|
||||
return DefaultScaffold(
|
||||
title: sceneSettings.sceneName.isNotEmpty
|
||||
? sceneSettings.sceneName
|
||||
: StringsManager.createScene,
|
||||
padding: EdgeInsets.zero,
|
||||
actions: [
|
||||
SizedBox(
|
||||
width: 40,
|
||||
child: GestureDetector(
|
||||
onTap: sceneSettings.sceneName.isEmpty
|
||||
? null
|
||||
: () {
|
||||
context.customBottomSheet(
|
||||
child: DeleteBottomSheetContent(
|
||||
sceneId: sceneSettings.sceneId),
|
||||
);
|
||||
Visibility(
|
||||
visible: sceneSettings.sceneType.isNotEmpty,
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
Routes.sceneAutoSettingsRoute,
|
||||
arguments: {
|
||||
"sceneId": sceneSettings.sceneId,
|
||||
"isAutomation": isAutomation,
|
||||
"sceneName": sceneSettings.sceneName,
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
Assets.assetsIconsSettings,
|
||||
colorFilter: const ColorFilter.mode(
|
||||
ColorsManager.textPrimaryColor,
|
||||
BlendMode.srcIn,
|
||||
);
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
Assets.assetsIconsSettings,
|
||||
colorFilter: const ColorFilter.mode(
|
||||
ColorsManager.textPrimaryColor,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -92,52 +105,52 @@ class SceneTasksView extends StatelessWidget {
|
||||
}
|
||||
|
||||
class DeleteBottomSheetContent extends StatelessWidget {
|
||||
const DeleteBottomSheetContent({super.key, required this.sceneId});
|
||||
const DeleteBottomSheetContent(
|
||||
{super.key, required this.sceneId, required this.isAutomation});
|
||||
|
||||
final String sceneId;
|
||||
final bool isAutomation;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultContainer(
|
||||
height: context.height * 0.2,
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
BlocConsumer<CreateSceneBloc, CreateSceneState>(
|
||||
listener: (context, state) {
|
||||
if (state is DeleteSceneSuccess) {
|
||||
if (state.success) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
BlocProvider.of<SceneBloc>(context).add(
|
||||
LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
}
|
||||
}
|
||||
},
|
||||
builder: (context, state) {
|
||||
return DefaultContainer(
|
||||
onTap: () {
|
||||
context.read<CreateSceneBloc>().add(DeleteSceneEvent(
|
||||
sceneId: sceneId,
|
||||
unitUuid:
|
||||
HomeCubit.getInstance().selectedSpace!.id!,
|
||||
));
|
||||
},
|
||||
child: SceneListTile(
|
||||
titleString: StringsManager.deleteScene,
|
||||
leadingWidget: (state is DeleteSceneLoading)
|
||||
? const SizedBox(
|
||||
height: 24,
|
||||
width: 24,
|
||||
child: CircularProgressIndicator())
|
||||
: SvgPicture.asset(
|
||||
Assets.assetsDeleteIcon,
|
||||
color: ColorsManager.red,
|
||||
),
|
||||
));
|
||||
},
|
||||
),
|
||||
],
|
||||
padding: EdgeInsets.zero,
|
||||
child: BlocConsumer<CreateSceneBloc, CreateSceneState>(
|
||||
listener: (context, state) {
|
||||
if (state is DeleteSceneSuccess) {
|
||||
if (state.success) {
|
||||
navigateToRoute(context, Routes.homeRoute);
|
||||
BlocProvider.of<SceneBloc>(context).add(
|
||||
LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
BlocProvider.of<SceneBloc>(context).add(
|
||||
LoadAutomation(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
}
|
||||
}
|
||||
},
|
||||
builder: (context, state) {
|
||||
return DefaultContainer(
|
||||
onTap: () {
|
||||
context.read<CreateSceneBloc>().add(DeleteSceneEvent(
|
||||
sceneId: sceneId,
|
||||
unitUuid: HomeCubit.getInstance().selectedSpace!.id!,
|
||||
));
|
||||
},
|
||||
child: SceneListTile(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
titleString: isAutomation
|
||||
? StringsManager.deleteAutomation
|
||||
: StringsManager.deleteScene,
|
||||
leadingWidget: (state is DeleteSceneLoading)
|
||||
? const SizedBox(
|
||||
height: 24,
|
||||
width: 24,
|
||||
child: CircularProgressIndicator())
|
||||
: SvgPicture.asset(
|
||||
Assets.assetsDeleteIcon,
|
||||
color: ColorsManager.red,
|
||||
),
|
||||
));
|
||||
},
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -5,11 +5,13 @@ import 'package:syncrow_app/features/devices/view/widgets/scene_listview.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_event.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/smart_scene/smart_scene_select_dart_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_view_widget/scene_grid_view.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_view_widget/scene_header.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/create_unit.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class SceneView extends StatelessWidget {
|
||||
final bool pageType;
|
||||
@ -19,19 +21,27 @@ class SceneView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
create: (BuildContext context) => SceneBloc()
|
||||
..add(LoadScenes(HomeCubit.getInstance().selectedSpace?.id ?? '')),
|
||||
..add(LoadScenes(HomeCubit.getInstance().selectedSpace?.id ?? ''))
|
||||
..add(LoadAutomation(HomeCubit.getInstance().selectedSpace?.id ?? '')),
|
||||
child: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
if (state is DeleteSceneSuccess) {
|
||||
if (state.success) {
|
||||
BlocProvider.of<SceneBloc>(context)
|
||||
.add(LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
BlocProvider.of<SceneBloc>(context).add(
|
||||
LoadAutomation(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
}
|
||||
}
|
||||
if (state is CreateSceneWithTasks) {
|
||||
if (state.success == true) {
|
||||
BlocProvider.of<SceneBloc>(context)
|
||||
.add(LoadScenes(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
BlocProvider.of<SceneBloc>(context).add(
|
||||
LoadAutomation(HomeCubit.getInstance().selectedSpace!.id!));
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(const SmartSceneClearEvent());
|
||||
}
|
||||
}
|
||||
return BlocListener<SceneBloc, SceneState>(
|
||||
@ -63,29 +73,90 @@ class SceneView extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
if (state is SceneLoaded) {
|
||||
if (state.scenes.isNotEmpty) {
|
||||
return pageType == false
|
||||
? Expanded(
|
||||
child: SceneGrid(
|
||||
scenes: state.scenes,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
),
|
||||
)
|
||||
: Expanded(
|
||||
final scenes = state.scenes;
|
||||
final automationList = state.automationList;
|
||||
|
||||
return pageType
|
||||
? Expanded(
|
||||
child: SceneListview(
|
||||
scenes: state.scenes,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
)
|
||||
);
|
||||
} else {
|
||||
return const Expanded(
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'No scenes have been added yet',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
scenes: scenes,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
))
|
||||
: Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
Theme(
|
||||
data: ThemeData().copyWith(
|
||||
dividerColor: Colors.transparent),
|
||||
child: ExpansionTile(
|
||||
tilePadding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 6),
|
||||
initiallyExpanded: true,
|
||||
iconColor: ColorsManager.grayColor,
|
||||
title: const BodyMedium(
|
||||
text: 'Tap to run routines'),
|
||||
children: [
|
||||
scenes.isNotEmpty
|
||||
? SceneGrid(
|
||||
scenes: scenes,
|
||||
loadingSceneId:
|
||||
state.loadingSceneId,
|
||||
disablePlayButton: false,
|
||||
loadingStates: state
|
||||
.loadingStates, // Add this line
|
||||
)
|
||||
: const Center(
|
||||
child: BodyMedium(
|
||||
text:
|
||||
'No scenes have been added yet',
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Theme(
|
||||
data: ThemeData().copyWith(
|
||||
dividerColor: Colors.transparent),
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: true,
|
||||
iconColor: ColorsManager.grayColor,
|
||||
tilePadding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 6),
|
||||
title: const BodyMedium(
|
||||
text: 'Automation'),
|
||||
children: [
|
||||
automationList.isNotEmpty
|
||||
? SceneGrid(
|
||||
scenes: automationList,
|
||||
loadingSceneId:
|
||||
state.loadingSceneId,
|
||||
disablePlayButton: true,
|
||||
loadingStates: state
|
||||
.loadingStates, // Add this line
|
||||
)
|
||||
: const Center(
|
||||
child: BodyMedium(
|
||||
text:
|
||||
'No automations have been added yet',
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
return const SizedBox();
|
||||
},
|
||||
|
70
lib/features/scene/view/smart_automation_select_route.dart
Normal file
@ -0,0 +1,70 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/select_smart_scene/smart_enable_autoamtion.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/select_smart_scene/smart_enable_tab_run.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/navigate_to_route.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class SmartAutomationSelectView extends StatelessWidget {
|
||||
const SmartAutomationSelectView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultScaffold(
|
||||
title: "Select Smart Scene",
|
||||
padding: const EdgeInsets.only(top: 24),
|
||||
leading: IconButton(
|
||||
onPressed: () {
|
||||
navigateToRoute(context, Routes.sceneTasksRoute);
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios,
|
||||
)),
|
||||
height: 260,
|
||||
child: DefaultContainer(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SceneListTile(
|
||||
assetPath: Assets.handClickIcon,
|
||||
titleString: "Tap To Run",
|
||||
subtitleString: '',
|
||||
trailingWidget: const Icon(
|
||||
Icons.arrow_forward_ios_rounded,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
onPressed: () {
|
||||
context.customBottomSheet(
|
||||
child: const SmartEnableTabRun(),
|
||||
);
|
||||
},
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.dividerColor,
|
||||
),
|
||||
SceneListTile(
|
||||
assetPath: Assets.refreshIcon,
|
||||
titleString: "Automation",
|
||||
subtitleString: '',
|
||||
trailingWidget: const Icon(
|
||||
Icons.arrow_forward_ios_rounded,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
onPressed: () {
|
||||
context.customBottomSheet(
|
||||
child: const SmartEnableAutomation(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@ class _AlertDialogCountdownState extends State<AlertDialogCountdown> {
|
||||
@override
|
||||
didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
|
||||
final tempTaskList = context.read<CreateSceneBloc>().tempTasksList;
|
||||
|
||||
for (var element in tempTaskList) {
|
||||
|
@ -11,10 +11,12 @@ class AlertDialogFunctionsOperationsBody extends StatefulWidget {
|
||||
super.key,
|
||||
this.functionValue,
|
||||
required this.taskItem,
|
||||
required this.isAutomation,
|
||||
});
|
||||
|
||||
dynamic functionValue;
|
||||
final SceneStaticFunction taskItem;
|
||||
final bool isAutomation;
|
||||
|
||||
@override
|
||||
State<AlertDialogFunctionsOperationsBody> createState() =>
|
||||
@ -26,24 +28,46 @@ class _AlertDialogFunctionsOperationsBodyState
|
||||
@override
|
||||
didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
final tempTaskList = context.read<CreateSceneBloc>().tempTasksList;
|
||||
if (widget.isAutomation) {
|
||||
final automationTempTasksList =
|
||||
context.read<CreateSceneBloc>().automationTempTasksList;
|
||||
|
||||
if (tempTaskList.isNotEmpty) {
|
||||
for (var element in tempTaskList) {
|
||||
if (element.code == widget.taskItem.code) {
|
||||
groupValue = element.functionValue;
|
||||
} else {
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(RemoveFromSelectedValueById(code: widget.taskItem.code));
|
||||
if (automationTempTasksList.isNotEmpty) {
|
||||
for (var element in automationTempTasksList) {
|
||||
if (element.code == widget.taskItem.code) {
|
||||
groupValue = element.functionValue;
|
||||
} else {
|
||||
context.read<CreateSceneBloc>().add(RemoveFromSelectedValueById(
|
||||
code: widget.taskItem.code, isAutomation: widget.isAutomation));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (widget.functionValue != null) {
|
||||
setState(() {
|
||||
groupValue = widget.functionValue;
|
||||
});
|
||||
if (widget.functionValue != null) {
|
||||
setState(() {
|
||||
groupValue = widget.functionValue;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
final tempTaskList = context.read<CreateSceneBloc>().tempTasksList;
|
||||
|
||||
if (tempTaskList.isNotEmpty) {
|
||||
for (var element in tempTaskList) {
|
||||
if (element.code == widget.taskItem.code) {
|
||||
groupValue = element.functionValue;
|
||||
} else {
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(RemoveFromSelectedValueById(code: widget.taskItem.code));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (widget.functionValue != null) {
|
||||
setState(() {
|
||||
groupValue = widget.functionValue;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +100,9 @@ class _AlertDialogFunctionsOperationsBodyState
|
||||
groupValue = value;
|
||||
});
|
||||
context.read<CreateSceneBloc>().add(SelectedValueEvent(
|
||||
value: value!, code: widget.taskItem.code));
|
||||
value: value!,
|
||||
code: widget.taskItem.code,
|
||||
isAutomation: widget.isAutomation));
|
||||
},
|
||||
),
|
||||
onPressed: () {
|
||||
@ -84,7 +110,9 @@ class _AlertDialogFunctionsOperationsBodyState
|
||||
groupValue = operation.value;
|
||||
});
|
||||
context.read<CreateSceneBloc>().add(SelectedValueEvent(
|
||||
value: groupValue, code: widget.taskItem.code));
|
||||
value: groupValue,
|
||||
code: widget.taskItem.code,
|
||||
isAutomation: widget.isAutomation));
|
||||
},
|
||||
);
|
||||
},
|
||||
|
@ -0,0 +1,242 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class AlertDialogSliderSteps extends StatefulWidget {
|
||||
const AlertDialogSliderSteps({
|
||||
super.key,
|
||||
this.functionValue,
|
||||
required this.taskItem,
|
||||
required this.isAutomation,
|
||||
});
|
||||
|
||||
final dynamic functionValue;
|
||||
final SceneStaticFunction taskItem;
|
||||
final bool isAutomation;
|
||||
|
||||
@override
|
||||
State<AlertDialogSliderSteps> createState() => _AlertDialogSliderStepsState();
|
||||
}
|
||||
|
||||
class _AlertDialogSliderStepsState extends State<AlertDialogSliderSteps> {
|
||||
double? groupValue;
|
||||
int selectedToggleIndex = 1;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
final createSceneBloc = context.read<CreateSceneBloc>();
|
||||
|
||||
if (widget.isAutomation) {
|
||||
final automationTempTaskList = createSceneBloc.automationTempTasksList;
|
||||
final automationComparatorValues =
|
||||
createSceneBloc.automationComparatorValues;
|
||||
|
||||
for (var element in automationTempTaskList) {
|
||||
if (element.code == widget.taskItem.code) {
|
||||
groupValue = element.functionValue;
|
||||
selectedToggleIndex =
|
||||
_comparatorToIndex(automationComparatorValues[element.code]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (widget.functionValue != null) {
|
||||
groupValue = _normalizeValue(widget.functionValue);
|
||||
} else {
|
||||
groupValue =
|
||||
_normalizeValue(widget.taskItem.operationalValues[0].minValue);
|
||||
}
|
||||
|
||||
if (widget.taskItem.comparator != null) {
|
||||
selectedToggleIndex = _comparatorToIndex(widget.taskItem.comparator);
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
double _normalizeValue(dynamic value) {
|
||||
if (((widget.taskItem.code == "temp_set" && value > 200) ||
|
||||
widget.taskItem.code == "temp_current")) {
|
||||
return (value) / 10;
|
||||
}
|
||||
return value.toDouble();
|
||||
}
|
||||
|
||||
int _comparatorToIndex(String? comparator) {
|
||||
switch (comparator) {
|
||||
case "<":
|
||||
return 0;
|
||||
case "==":
|
||||
return 1;
|
||||
case ">":
|
||||
return 2;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
String _indexToComparator(int index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
return "<";
|
||||
case 1:
|
||||
return "==";
|
||||
case 2:
|
||||
return ">";
|
||||
default:
|
||||
return "==";
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ToggleButtons(
|
||||
isSelected: [
|
||||
selectedToggleIndex == 0,
|
||||
selectedToggleIndex == 1,
|
||||
selectedToggleIndex == 2
|
||||
],
|
||||
onPressed: (index) {
|
||||
setState(() {
|
||||
selectedToggleIndex = index;
|
||||
});
|
||||
context.read<CreateSceneBloc>().add(
|
||||
SelectedValueEvent(
|
||||
value: _deNormalizeValue(groupValue),
|
||||
code: widget.taskItem.code,
|
||||
isAutomation: widget.isAutomation,
|
||||
comparator: _indexToComparator(selectedToggleIndex),
|
||||
),
|
||||
);
|
||||
},
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
selectedColor: Colors.white,
|
||||
color: ColorsManager.blackColor,
|
||||
fillColor: ColorsManager.primaryColorWithOpacity,
|
||||
borderColor: ColorsManager.greyColor,
|
||||
constraints: BoxConstraints.tight(const Size(70, 30)),
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 70,
|
||||
height: 30,
|
||||
child: Container(
|
||||
color: selectedToggleIndex == 0
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: ColorsManager.greyColor,
|
||||
alignment: Alignment.center,
|
||||
child: const Text("<"),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 70,
|
||||
height: 30,
|
||||
child: Container(
|
||||
color: selectedToggleIndex == 1
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: ColorsManager.greyColor,
|
||||
alignment: Alignment.center,
|
||||
child: const Text("="),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 70,
|
||||
height: 30,
|
||||
child: Container(
|
||||
color: selectedToggleIndex == 2
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: ColorsManager.greyColor,
|
||||
alignment: Alignment.center,
|
||||
child: const Text(">"),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
...widget.taskItem.operationalValues.map(
|
||||
(operation) => BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
TitleMedium(
|
||||
text: groupValue != null
|
||||
? (groupValue! % 1 == 0
|
||||
? groupValue!.toStringAsFixed(0)
|
||||
: groupValue!.toStringAsFixed(1))
|
||||
: "0",
|
||||
style: context.titleMedium.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity,
|
||||
fontSize: 30,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
TitleMedium(
|
||||
text: operation.description.toString(),
|
||||
style: context.titleMedium.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity,
|
||||
fontSize: 30,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Slider(
|
||||
value: groupValue ?? 0,
|
||||
min: operation.minValue ?? 0,
|
||||
max: operation.maxValue ?? 0,
|
||||
inactiveColor: ColorsManager.primaryColorWithOpacity
|
||||
.withOpacity(0.2),
|
||||
divisions: operation.stepValue != null
|
||||
? ((operation.maxValue!.toDouble() -
|
||||
operation.minValue!.toDouble()) /
|
||||
operation.stepValue!.toDouble())
|
||||
.round()
|
||||
: null,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
groupValue = normalizeValue(value);
|
||||
});
|
||||
context.read<CreateSceneBloc>().add(SelectedValueEvent(
|
||||
value: _deNormalizeValue(groupValue),
|
||||
code: widget.taskItem.code,
|
||||
isAutomation: widget.isAutomation,
|
||||
comparator:
|
||||
_indexToComparator(selectedToggleIndex)));
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
double normalizeValue(double value) {
|
||||
return double.parse(value.toStringAsFixed(1));
|
||||
}
|
||||
|
||||
double _deNormalizeValue(double? value) {
|
||||
if (widget.taskItem.code == "temp_set" ||
|
||||
widget.taskItem.code == "temp_current") {
|
||||
return (value ?? 0) * 10;
|
||||
}
|
||||
return value ?? 0;
|
||||
}
|
||||
}
|
@ -14,14 +14,10 @@ import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
class AlertDialogTemperatureBody extends StatefulWidget {
|
||||
AlertDialogTemperatureBody({
|
||||
super.key,
|
||||
//required this.index,
|
||||
// required this.functions,
|
||||
this.functionValue,
|
||||
required this.taskItem,
|
||||
});
|
||||
|
||||
//final List<SceneStaticFunction> functions;
|
||||
// final int index;
|
||||
final SceneStaticFunction taskItem;
|
||||
dynamic functionValue;
|
||||
|
||||
@ -32,14 +28,16 @@ class AlertDialogTemperatureBody extends StatefulWidget {
|
||||
|
||||
class _AlertDialogTemperatureBodyState
|
||||
extends State<AlertDialogTemperatureBody> {
|
||||
int temperature = 24;
|
||||
|
||||
@override
|
||||
didChangeDependencies() {
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
final tempTaskList = context.read<CreateSceneBloc>().tempTasksList;
|
||||
|
||||
for (var element in tempTaskList) {
|
||||
if (element.code == widget.taskItem.code) {
|
||||
temperature = element.functionValue;
|
||||
temperature = _normalizeTemperature(element.functionValue);
|
||||
} else {
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
@ -48,12 +46,18 @@ class _AlertDialogTemperatureBodyState
|
||||
}
|
||||
if (widget.functionValue != null) {
|
||||
setState(() {
|
||||
temperature = widget.functionValue;
|
||||
temperature = _normalizeTemperature(widget.functionValue);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
int temperature = 24;
|
||||
int _normalizeTemperature(dynamic value) {
|
||||
if (value is int && value >= 100) {
|
||||
return value ~/ 10;
|
||||
}
|
||||
return value as int? ?? 24;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
@ -98,8 +102,7 @@ class _AlertDialogTemperatureBodyState
|
||||
],
|
||||
),
|
||||
subtitle: BodyLarge(
|
||||
text: widget.taskItem.operationalValues[0].description
|
||||
.toString(),
|
||||
text: widget.taskItem.operationalValues[0].description.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
trailing: IconButton(
|
||||
@ -110,8 +113,7 @@ class _AlertDialogTemperatureBodyState
|
||||
}
|
||||
});
|
||||
context.read<CreateSceneBloc>().add(SelectedValueEvent(
|
||||
value: temperature * 10,
|
||||
code: widget.taskItem.code));
|
||||
value: temperature * 10, code: widget.taskItem.code));
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.add,
|
||||
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_countdown.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
@ -66,7 +67,9 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
||||
size: 16,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, Routes.smartAutomationSelectRoute);
|
||||
},
|
||||
),
|
||||
SceneListTile(
|
||||
assetPath: Assets.delay,
|
||||
@ -97,6 +100,7 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
||||
operationName: 'Delay The Action',
|
||||
code: '',
|
||||
functionValue: 0,
|
||||
operationDialogType: OperationDialogType.delay,
|
||||
operationalValues: [
|
||||
SceneOperationalValue(icon: '', value: 0),
|
||||
],
|
||||
@ -123,8 +127,9 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
||||
icon: Assets.delay,
|
||||
deviceName: 'Delay The Action',
|
||||
uniqueId: functions[0].uniqueCustomId,
|
||||
operationType: functions[0].operationDialogType,
|
||||
));
|
||||
context.read<CreateSceneBloc>().add(AddTaskEvent());
|
||||
context.read<CreateSceneBloc>().add(const AddTaskEvent());
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
@ -1,9 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/scene_logic_helper.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_button.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/navigation/navigate_to_route.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
@ -43,8 +46,7 @@ class _CreateSceneSaveButtonState extends State<CreateSceneSaveButton>
|
||||
listener: (context, state) {
|
||||
if (state is CreateSceneWithTasks) {
|
||||
if (state.success == true) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
navigateToRoute(context, Routes.homeRoute);
|
||||
context.showCustomSnackbar(
|
||||
message: 'Scene created successfully',
|
||||
icon: const Icon(
|
||||
@ -66,55 +68,59 @@ class _CreateSceneSaveButtonState extends State<CreateSceneSaveButton>
|
||||
},
|
||||
builder: (context, state) {
|
||||
return DefaultButton(
|
||||
onPressed: widget.sceneName.isNotEmpty
|
||||
? () {
|
||||
final tasks = context.read<CreateSceneBloc>().tasksList;
|
||||
handleSaveButtonPress(
|
||||
context,
|
||||
sceneNameController,
|
||||
tasks,
|
||||
updateScene: true,
|
||||
sceneId: widget.sceneId,
|
||||
);
|
||||
}
|
||||
: () {
|
||||
context.customAlertDialog(
|
||||
alertBody: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 8, right: 8, bottom: 8),
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: SearchBar(
|
||||
controller: sceneNameController,
|
||||
elevation: WidgetStateProperty.all(0),
|
||||
textStyle:
|
||||
WidgetStateProperty.all(context.bodyMedium),
|
||||
hintStyle: WidgetStateProperty.all(
|
||||
context.bodyMedium.copyWith(
|
||||
fontSize: 14,
|
||||
color: ColorsManager.secondaryTextColor),
|
||||
),
|
||||
hintText: 'Enter scene name',
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
ColorsManager.backgroundColor),
|
||||
),
|
||||
onPressed: () {
|
||||
final sceneBloc = context.read<CreateSceneBloc>();
|
||||
final isAutomation =
|
||||
sceneBloc.sceneType == CreateSceneEnum.deviceStatusChanges;
|
||||
|
||||
if (widget.sceneName.isNotEmpty) {
|
||||
handleSaveButtonPress(
|
||||
context,
|
||||
sceneName: sceneNameController,
|
||||
actions: sceneBloc.tasksList,
|
||||
updateScene: true,
|
||||
sceneId: widget.sceneId,
|
||||
isAutomation: isAutomation,
|
||||
conditions: sceneBloc.automationTasksList,
|
||||
);
|
||||
} else {
|
||||
context.customAlertDialog(
|
||||
alertBody: Padding(
|
||||
padding: const EdgeInsets.only(left: 8, right: 8, bottom: 8),
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: SearchBar(
|
||||
controller: sceneNameController,
|
||||
elevation: WidgetStateProperty.all(0),
|
||||
textStyle: WidgetStateProperty.all(context.bodyMedium),
|
||||
hintStyle: WidgetStateProperty.all(
|
||||
context.bodyMedium.copyWith(
|
||||
fontSize: 14,
|
||||
color: ColorsManager.secondaryTextColor),
|
||||
),
|
||||
hintText: 'Enter scene name',
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
ColorsManager.backgroundColor),
|
||||
),
|
||||
title: 'Scene Name',
|
||||
onConfirm: () {
|
||||
if (sceneNameController.text.isNotEmpty) {
|
||||
final tasks = context.read<CreateSceneBloc>().tasksList;
|
||||
handleSaveButtonPress(
|
||||
context,
|
||||
sceneNameController,
|
||||
tasks,
|
||||
updateScene: false,
|
||||
sceneId: widget.sceneId,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
),
|
||||
),
|
||||
title: 'Scene Name',
|
||||
onConfirm: () {
|
||||
if (sceneNameController.text.isNotEmpty) {
|
||||
handleSaveButtonPress(
|
||||
context,
|
||||
sceneName: sceneNameController,
|
||||
actions: sceneBloc.tasksList,
|
||||
updateScene: false,
|
||||
sceneId: widget.sceneId,
|
||||
isAutomation: isAutomation,
|
||||
conditions: sceneBloc.automationTasksList,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
customButtonStyle: ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all<Color>(
|
||||
ColorsManager.primaryColor,
|
||||
|
@ -0,0 +1,59 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/effective_period_setting/period_options.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/effective_period_setting/repeat_days.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
||||
|
||||
import '../../helper/effect_period_helper.dart';
|
||||
|
||||
class EffectPeriodBottomSheetContent extends StatelessWidget {
|
||||
const EffectPeriodBottomSheetContent({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: BodySmall(
|
||||
text: 'Save',
|
||||
style: context.bodySmall.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity),
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: BodyMedium(
|
||||
text: 'Effective Period',
|
||||
fontColor: ColorsManager.primaryColorWithOpacity,
|
||||
fontWeight: FontsManager.bold,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.backgroundColor,
|
||||
),
|
||||
const PeriodOptions(
|
||||
showCustomTimePicker: EffectPeriodHelper.showCustomTimePicker,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const RepeatDays(),
|
||||
const SizedBox(height: 24),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_event.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_state.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/effective_period_options.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/effect_period_helper.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
|
||||
class PeriodOptions extends StatelessWidget {
|
||||
final Future<List<String>?> Function(BuildContext) showCustomTimePicker;
|
||||
|
||||
const PeriodOptions({
|
||||
required this.showCustomTimePicker,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<EffectPeriodBloc, EffectPeriodState>(
|
||||
builder: (context, state) {
|
||||
return Column(
|
||||
children: [
|
||||
_buildRadioOption(
|
||||
context, EnumEffectivePeriodOptions.allDay, '24 Hours'),
|
||||
_buildRadioOption(context, EnumEffectivePeriodOptions.daytime,
|
||||
'Sunrise to Sunset'),
|
||||
_buildRadioOption(
|
||||
context, EnumEffectivePeriodOptions.night, 'Sunset to Sunrise'),
|
||||
ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
onTap: () => showCustomTimePicker(context),
|
||||
title: const BodyMedium(
|
||||
text: 'Custom',
|
||||
),
|
||||
subtitle:
|
||||
state.customStartTime != null && state.customEndTime != null
|
||||
? BodySmall(
|
||||
text:
|
||||
'${"${state.customStartTime} AM"} - ${"${state.customEndTime} PM"}',
|
||||
style: context.bodySmall.copyWith(fontSize: 10),
|
||||
)
|
||||
: BodySmall(
|
||||
text: '00:00 AM - 11:59 PM',
|
||||
style: context.bodySmall.copyWith(fontSize: 10),
|
||||
),
|
||||
trailing: Radio<EnumEffectivePeriodOptions>(
|
||||
value: EnumEffectivePeriodOptions.custom,
|
||||
groupValue: state.selectedPeriod,
|
||||
onChanged: (value) async {
|
||||
if (value != null) {
|
||||
context.read<EffectPeriodBloc>().add(SetPeriod(value));
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildRadioOption(
|
||||
BuildContext context, EnumEffectivePeriodOptions value, String subtitle) {
|
||||
return BlocBuilder<EffectPeriodBloc, EffectPeriodState>(
|
||||
builder: (context, state) {
|
||||
return ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
onTap: () {
|
||||
context.read<EffectPeriodBloc>().add(SetPeriod(value));
|
||||
},
|
||||
title: BodyMedium(text: EffectPeriodHelper.formatEnumValue(value)),
|
||||
subtitle: BodySmall(
|
||||
text: subtitle,
|
||||
style: context.bodySmall.copyWith(fontSize: 10),
|
||||
),
|
||||
trailing: Radio<EnumEffectivePeriodOptions>(
|
||||
value: value,
|
||||
groupValue: state.selectedPeriod,
|
||||
onChanged: (value) {
|
||||
if (value != null) {
|
||||
context.read<EffectPeriodBloc>().add(SetPeriod(value));
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_event.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_state.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
|
||||
class RepeatDays extends StatelessWidget {
|
||||
const RepeatDays({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final daysMap = {
|
||||
'Mon': 'M',
|
||||
'Tue': 'T',
|
||||
'Wed': 'W',
|
||||
'Thu': 'T',
|
||||
'Fri': 'F',
|
||||
'Sat': 'S',
|
||||
'Sun': 'S',
|
||||
};
|
||||
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const BodyMedium(text: 'Repeat'),
|
||||
const SizedBox(width: 8),
|
||||
BlocBuilder<EffectPeriodBloc, EffectPeriodState>(
|
||||
builder: (context, state) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: daysMap.entries.map((entry) {
|
||||
final day = entry.key;
|
||||
final abbreviation = entry.value;
|
||||
final dayIndex = _getDayIndex(day);
|
||||
final isSelected = state.selectedDaysBinary[dayIndex] == '1';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 3.0),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
context.read<EffectPeriodBloc>().add(ToggleDay(day));
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color:
|
||||
isSelected ? Colors.grey : Colors.grey.shade300,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: CircleAvatar(
|
||||
radius: 15,
|
||||
backgroundColor: Colors.white,
|
||||
child: Text(
|
||||
abbreviation,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
isSelected ? Colors.grey : Colors.grey.shade300,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
int _getDayIndex(String day) {
|
||||
const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
||||
return days.indexOf(day);
|
||||
}
|
||||
}
|
@ -1,11 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.dart';
|
||||
import 'package:syncrow_app/features/scene/view/create_scene_view.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/if_then_containers/then_added_tasks.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/light_divider.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/helpers/custom_page_route.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
|
||||
@ -16,32 +27,173 @@ class IFDefaultContainer extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final sceneType = context.read<CreateSceneBloc>().sceneType;
|
||||
return DefaultContainer(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 2),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SceneListTile(
|
||||
leadingWidget: BodyLarge(
|
||||
text: 'IF',
|
||||
style: context.bodyLarge.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: ColorsManager.primaryTextColor,
|
||||
leadingWidget: InkWell(
|
||||
onTap: () {
|
||||
if (sceneType.name ==
|
||||
CreateSceneEnum.deviceStatusChanges.name) {
|
||||
context.customAlertDialog(
|
||||
hideConfirmButton: true,
|
||||
alertBody: Column(
|
||||
children: [
|
||||
ListTile(
|
||||
title: const BodyMedium(
|
||||
text: "When all conditions are met"),
|
||||
onTap: () {
|
||||
context.read<CreateSceneBloc>().add(
|
||||
const SelectConditionEvent(
|
||||
"When all conditions are met"));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const BodyMedium(
|
||||
text: "When any condition is met"),
|
||||
onTap: () {
|
||||
context.read<CreateSceneBloc>().add(
|
||||
const SelectConditionEvent(
|
||||
"When any condition is met"));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
title: 'Conditions Rule',
|
||||
onConfirm: () {},
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
BodyLarge(
|
||||
text: 'IF',
|
||||
style: context.bodyLarge.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: ColorsManager.primaryTextColor,
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: sceneType.name ==
|
||||
CreateSceneEnum.deviceStatusChanges.name,
|
||||
child: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
String conditionText = "When any condition is met";
|
||||
if (state is AddSceneTask) {
|
||||
if (state.condition == 'or') {
|
||||
conditionText = "When any condition is met";
|
||||
} else {
|
||||
conditionText = "When all conditions are met";
|
||||
}
|
||||
}
|
||||
return SizedBox(
|
||||
width: context.width * 0.6,
|
||||
child: Row(children: [
|
||||
BodySmall(text: conditionText),
|
||||
const Icon(Icons.keyboard_arrow_down)
|
||||
]),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
trailingWidget: SvgPicture.asset(Assets.addIcon),
|
||||
trailingWidget: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
bool isClickable = false;
|
||||
if (state is AddSceneTask) {
|
||||
isClickable = state.automationTasksList?.isNotEmpty ?? false;
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: isClickable
|
||||
? () => Navigator.pushNamed(
|
||||
context,
|
||||
Routes.sceneControlDevicesRoute,
|
||||
arguments: SceneSettingsRouteArguments(
|
||||
sceneType:
|
||||
CreateSceneEnum.deviceStatusChanges.name,
|
||||
sceneId: '',
|
||||
sceneName: '',
|
||||
),
|
||||
)
|
||||
: null,
|
||||
child: SvgPicture.asset(
|
||||
Assets.addIcon,
|
||||
colorFilter: ColorFilter.mode(
|
||||
isClickable
|
||||
? ColorsManager.primaryColor
|
||||
: ColorsManager.greyColor,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
const LightDivider(),
|
||||
const SceneListTile(
|
||||
assetPath: Assets.handClickIcon,
|
||||
titleString: StringsManager.tapToRun,
|
||||
padding: EdgeInsets.zero,
|
||||
BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
if (state is AddSceneTask) {
|
||||
final automationTasksList = state.automationTasksList;
|
||||
if (automationTasksList?.isNotEmpty == true) {
|
||||
return ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: automationTasksList?.length,
|
||||
reverse: true,
|
||||
itemBuilder: (context, index) {
|
||||
return ThenAddedTasksContainer(
|
||||
taskItem: automationTasksList![index],
|
||||
isAutomation: true,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
final sceneType = context.read<CreateSceneBloc>().sceneType;
|
||||
if (sceneType.name == CreateSceneEnum.tabToRun.name) {
|
||||
return const SceneListTile(
|
||||
padding: EdgeInsets.symmetric(horizontal: 2),
|
||||
assetPath: Assets.handClickIcon,
|
||||
titleString: StringsManager.tapToRun,
|
||||
subtitleString: '',
|
||||
);
|
||||
}
|
||||
return SceneListTile(
|
||||
titleString: '+ Add Condition',
|
||||
textAlign: TextAlign.center,
|
||||
onPressed: () {
|
||||
final sceneType = context.read<CreateSceneBloc>().sceneType;
|
||||
if (sceneType.name == CreateSceneEnum.none.name) {
|
||||
Navigator.push(
|
||||
context,
|
||||
CustomPageRoute(
|
||||
builder: (context) => const CreateSceneView()));
|
||||
} else {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
Routes.sceneControlDevicesRoute,
|
||||
arguments: SceneSettingsRouteArguments(
|
||||
sceneType: CreateSceneEnum.deviceStatusChanges.name,
|
||||
sceneId: '',
|
||||
sceneName: '',
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,6 +13,7 @@ import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/helpers/snack_bar.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class ThenAddedTasksContainer extends StatelessWidget
|
||||
@ -22,17 +23,19 @@ class ThenAddedTasksContainer extends StatelessWidget
|
||||
required this.taskItem,
|
||||
this.sceneId,
|
||||
this.index,
|
||||
this.isAutomation,
|
||||
});
|
||||
|
||||
final SceneStaticFunction taskItem;
|
||||
String? sceneId;
|
||||
int? index;
|
||||
bool? isAutomation;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final createSceneBloc = context.read<CreateSceneBloc>();
|
||||
String operationValue = '';
|
||||
if (taskItem.code.contains('countdown') ||
|
||||
if ((taskItem.code.contains('countdown') && isAutomation != true) ||
|
||||
taskItem.deviceId.contains('delay')) {
|
||||
final functionValue =
|
||||
taskItem.functionValue ?? taskItem.operationalValues.first.value;
|
||||
@ -40,7 +43,8 @@ class ThenAddedTasksContainer extends StatelessWidget
|
||||
Duration(seconds: int.tryParse(functionValue.toString()) ?? 0);
|
||||
operationValue =
|
||||
"${duration.inHours}h ${duration.inMinutes.remainder(60)}m ";
|
||||
} else if (taskItem.code.contains('temp_set')) {
|
||||
} else if (taskItem.code.contains('temp_set') ||
|
||||
taskItem.code.contains('temp_current')) {
|
||||
if (taskItem.functionValue != null || taskItem.functionValue != 0) {
|
||||
operationValue =
|
||||
'${((taskItem.functionValue / 10) as double).round().toString()}°C';
|
||||
@ -48,8 +52,13 @@ class ThenAddedTasksContainer extends StatelessWidget
|
||||
operationValue = '0°C';
|
||||
}
|
||||
} else {
|
||||
final functionValue =
|
||||
var functionValue =
|
||||
taskItem.functionValue ?? taskItem.operationalValues.first.value;
|
||||
|
||||
if (functionValue is double) {
|
||||
functionValue = double.parse(functionValue.toStringAsFixed(1));
|
||||
}
|
||||
|
||||
operationValue = functionValue.toString();
|
||||
}
|
||||
return DefaultContainer(
|
||||
@ -58,28 +67,49 @@ class ThenAddedTasksContainer extends StatelessWidget
|
||||
|
||||
/// get the task functions
|
||||
functionOperation = List.from(getOperationsForOneFunction(
|
||||
taskItem: taskItem, deviceId: taskItem.deviceId));
|
||||
taskItem: taskItem,
|
||||
deviceId: taskItem.deviceId,
|
||||
isAutomation: isAutomation ?? false));
|
||||
|
||||
/// show alert dialog based on type
|
||||
context.customAlertDialog(
|
||||
alertBody: getTheCorrectDialogBody(functionOperation.first),
|
||||
alertBody: getTheCorrectDialogBody(functionOperation.first, null,
|
||||
isAutomation: isAutomation ?? false),
|
||||
title: functionOperation.first.operationName,
|
||||
onConfirm: () {
|
||||
final savedCode = functionOperation.first.deviceId.contains('delay')
|
||||
? 'delay'
|
||||
: functionOperation.first.code;
|
||||
final selectedValue = createSceneBloc.selectedValues[savedCode];
|
||||
if (isAutomation == true) {
|
||||
final automationSelectedValue =
|
||||
createSceneBloc.automationSelectedValues[savedCode];
|
||||
|
||||
try {
|
||||
createSceneBloc.add(
|
||||
UpdateTaskEvent(
|
||||
newValue: selectedValue,
|
||||
taskId: taskItem.uniqueCustomId,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('Error adding UpdateTaskEvent: $e');
|
||||
try {
|
||||
createSceneBloc.add(
|
||||
UpdateTaskEvent(
|
||||
newValue: automationSelectedValue,
|
||||
taskId: taskItem.uniqueCustomId,
|
||||
isAutomation: true,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('Error adding UpdateTaskEvent: $e');
|
||||
}
|
||||
} else {
|
||||
final selectedValue = createSceneBloc.selectedValues[savedCode];
|
||||
|
||||
try {
|
||||
createSceneBloc.add(
|
||||
UpdateTaskEvent(
|
||||
newValue: selectedValue,
|
||||
taskId: taskItem.uniqueCustomId,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('Error adding UpdateTaskEvent: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
@ -109,16 +139,21 @@ class ThenAddedTasksContainer extends StatelessWidget
|
||||
onDismissed: (direction) {
|
||||
String removeFunctionById = taskItem.uniqueCustomId;
|
||||
|
||||
context
|
||||
.read<CreateSceneBloc>()
|
||||
.add(RemoveTaskByIdEvent(taskId: removeFunctionById));
|
||||
if (isAutomation == true) {
|
||||
context.read<CreateSceneBloc>().add(RemoveTaskByIdEvent(
|
||||
taskId: removeFunctionById,
|
||||
isAutomation: true,
|
||||
));
|
||||
} else {
|
||||
context.read<CreateSceneBloc>().add(RemoveTaskByIdEvent(
|
||||
taskId: removeFunctionById,
|
||||
));
|
||||
}
|
||||
|
||||
String removeFunction =
|
||||
"${taskItem.operationName} with value ${taskItem.operationalValues.first.value}";
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('$removeFunction removed')),
|
||||
);
|
||||
CustomSnackBar.displaySnackBar('$removeFunction removed');
|
||||
},
|
||||
child: SceneListTile(
|
||||
padding: EdgeInsets.zero,
|
||||
|
@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/view/create_scene_view.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/if_then_containers/then_added_tasks.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/bottom_sheet_widget.dart';
|
||||
@ -10,6 +12,7 @@ import 'package:syncrow_app/features/shared_widgets/light_divider.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/helpers/custom_page_route.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class ThenDefaultContainer extends StatelessWidget {
|
||||
@ -35,17 +38,29 @@ class ThenDefaultContainer extends StatelessWidget {
|
||||
color: ColorsManager.primaryTextColor,
|
||||
),
|
||||
),
|
||||
trailingWidget: GestureDetector(
|
||||
onTap: () => context.customBottomSheet(
|
||||
child: const CustomBottomSheetWidget(),
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
Assets.addIcon,
|
||||
colorFilter: const ColorFilter.mode(
|
||||
ColorsManager.primaryColor,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
trailingWidget: BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||
builder: (context, state) {
|
||||
bool isClickable = false;
|
||||
if (state is AddSceneTask) {
|
||||
isClickable = state.tasksList.isNotEmpty;
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: isClickable
|
||||
? () => context.customBottomSheet(
|
||||
child: const CustomBottomSheetWidget(),
|
||||
)
|
||||
: null,
|
||||
child: SvgPicture.asset(
|
||||
Assets.addIcon,
|
||||
colorFilter: ColorFilter.mode(
|
||||
isClickable
|
||||
? ColorsManager.primaryColor
|
||||
: ColorsManager.greyColor,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
@ -71,20 +86,23 @@ class ThenDefaultContainer extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
}
|
||||
return SceneListTile(
|
||||
titleString: '+ Add Task',
|
||||
textAlign: TextAlign.center,
|
||||
onPressed: () => context.customBottomSheet(
|
||||
child: const CustomBottomSheetWidget(),
|
||||
),
|
||||
);
|
||||
}
|
||||
return SceneListTile(
|
||||
titleString: '+ Add Task',
|
||||
textAlign: TextAlign.center,
|
||||
onPressed: () => context.customBottomSheet(
|
||||
child: const CustomBottomSheetWidget(),
|
||||
),
|
||||
onPressed: () {
|
||||
final sceneType = context.read<CreateSceneBloc>().sceneType;
|
||||
if (sceneType.name == CreateSceneEnum.none.name) {
|
||||
Navigator.push(
|
||||
context,
|
||||
CustomPageRoute(
|
||||
builder: (context) => const CreateSceneView()));
|
||||
} else {
|
||||
context.customBottomSheet(
|
||||
child: const CustomBottomSheetWidget(),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
|
@ -6,6 +6,8 @@ import 'package:syncrow_app/features/devices/bloc/device_manager_bloc/device_man
|
||||
import 'package:syncrow_app/features/devices/model/room_model.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/tab_change/tab_change_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/tab_change/tab_change_state.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
@ -26,6 +28,11 @@ class SceneDevicesBody extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isAutomationDeviceStatus = ((ModalRoute.of(context)
|
||||
?.settings
|
||||
.arguments as SceneSettingsRouteArguments?)
|
||||
?.sceneType ==
|
||||
CreateSceneEnum.deviceStatusChanges.name);
|
||||
return BlocBuilder<TabBarBloc, TabBarState>(
|
||||
builder: (context, tabState) {
|
||||
return Column(
|
||||
@ -56,7 +63,10 @@ class SceneDevicesBody extends StatelessWidget {
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: rooms!.map((e) => _buildRoomTab(e, context)).toList(),
|
||||
children: rooms!
|
||||
.map((e) =>
|
||||
_buildRoomTab(e, context, isAutomationDeviceStatus))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -65,7 +75,8 @@ class SceneDevicesBody extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildRoomTab(RoomModel room, BuildContext context) {
|
||||
Widget _buildRoomTab(
|
||||
RoomModel room, BuildContext context, bool isAutomationDeviceStatus) {
|
||||
return BlocBuilder<DeviceManagerBloc, DeviceManagerState>(
|
||||
builder: (context, state) {
|
||||
if (state.loading && state.devices == null) {
|
||||
@ -96,7 +107,10 @@ class SceneDevicesBody extends StatelessWidget {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
Routes.deviceFunctionsRoute,
|
||||
arguments: device,
|
||||
arguments: {
|
||||
"device": device,
|
||||
"isAutomationDeviceStatus": isAutomationDeviceStatus
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -1,21 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scenes_model.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_view_widget/scene_item.dart';
|
||||
|
||||
class SceneGrid extends StatelessWidget {
|
||||
final List<ScenesModel> scenes;
|
||||
final List<dynamic> scenes;
|
||||
final String? loadingSceneId;
|
||||
final bool disablePlayButton;
|
||||
final Map<String, bool> loadingStates;
|
||||
|
||||
const SceneGrid({
|
||||
required this.scenes,
|
||||
required this.loadingSceneId,
|
||||
required this.disablePlayButton,
|
||||
required this.loadingStates,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return
|
||||
GridView.builder(
|
||||
return GridView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 12,
|
||||
@ -26,7 +30,14 @@ class SceneGrid extends StatelessWidget {
|
||||
itemBuilder: (context, index) {
|
||||
final scene = scenes[index];
|
||||
final isLoading = loadingSceneId == scene.id;
|
||||
return SceneItem(scene: scene, isLoading: isLoading);
|
||||
final isSwitchLoading = loadingStates[scene.id] ?? false;
|
||||
|
||||
return SceneItem(
|
||||
scene: scene,
|
||||
isLoading: isLoading,
|
||||
disablePlayButton: disablePlayButton,
|
||||
isSwitchLoading: isSwitchLoading,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart';
|
||||
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
@ -20,10 +19,10 @@ class SceneHeader extends StatelessWidget {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
BodySmall(
|
||||
text: StringsManager.tapToRunRoutine,
|
||||
),
|
||||
// SizedBox(height: 20),
|
||||
// BodySmall(
|
||||
// text: StringsManager.tapToRunRoutine,
|
||||
// ),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_event.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scenes_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.dart';
|
||||
import 'package:syncrow_app/features/scene/model/update_automation.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
|
||||
@ -16,11 +19,15 @@ import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
class SceneItem extends StatelessWidget {
|
||||
final ScenesModel scene;
|
||||
final bool isLoading;
|
||||
final bool isSwitchLoading;
|
||||
final bool disablePlayButton;
|
||||
|
||||
const SceneItem({
|
||||
required this.scene,
|
||||
required this.isLoading,
|
||||
super.key,
|
||||
required this.disablePlayButton,
|
||||
required this.isSwitchLoading,
|
||||
});
|
||||
|
||||
@override
|
||||
@ -31,16 +38,28 @@ class SceneItem extends StatelessWidget {
|
||||
context,
|
||||
Routes.sceneTasksRoute,
|
||||
arguments: SceneSettingsRouteArguments(
|
||||
sceneType: CreateSceneEnum.tabToRun.name,
|
||||
sceneType: disablePlayButton == false
|
||||
? CreateSceneEnum.tabToRun.name
|
||||
: CreateSceneEnum.deviceStatusChanges.name,
|
||||
sceneId: scene.id,
|
||||
sceneName: scene.name,
|
||||
),
|
||||
);
|
||||
BlocProvider.of<CreateSceneBloc>(context)
|
||||
.add(FetchSceneTasksEvent(sceneId: scene.id));
|
||||
if (disablePlayButton == false) {
|
||||
BlocProvider.of<CreateSceneBloc>(context)
|
||||
.add(const SceneTypeEvent(CreateSceneEnum.tabToRun));
|
||||
BlocProvider.of<CreateSceneBloc>(context).add(
|
||||
FetchSceneTasksEvent(sceneId: scene.id, isAutomation: false));
|
||||
} else {
|
||||
BlocProvider.of<CreateSceneBloc>(context)
|
||||
.add(const SceneTypeEvent(CreateSceneEnum.deviceStatusChanges));
|
||||
BlocProvider.of<CreateSceneBloc>(context)
|
||||
.add(FetchSceneTasksEvent(sceneId: scene.id, isAutomation: true));
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -52,23 +71,45 @@ class SceneItem extends StatelessWidget {
|
||||
Assets.assetsIconsLogo,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: () {
|
||||
context
|
||||
.read<SceneBloc>()
|
||||
.add(SceneTrigger(scene.id, scene.name));
|
||||
},
|
||||
icon: isLoading
|
||||
? const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
)
|
||||
: const Icon(
|
||||
Icons.play_circle,
|
||||
size: 40,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
),
|
||||
disablePlayButton == false
|
||||
? IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: () {
|
||||
context
|
||||
.read<SceneBloc>()
|
||||
.add(SceneTrigger(scene.id, scene.name));
|
||||
},
|
||||
icon: isLoading
|
||||
? const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
)
|
||||
: const Icon(
|
||||
Icons.play_circle,
|
||||
size: 40,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
)
|
||||
: isSwitchLoading
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: ColorsManager.primaryColorWithOpacity,
|
||||
),
|
||||
)
|
||||
: CupertinoSwitch(
|
||||
activeColor: ColorsManager.primaryColor,
|
||||
value: scene.status == 'enable' ? true : false,
|
||||
onChanged: (value) {
|
||||
context.read<SceneBloc>().add(
|
||||
UpdateAutomationStatus(
|
||||
automationStatusUpdate:
|
||||
AutomationStatusUpdate(
|
||||
isEnable: value,
|
||||
unitUuid: HomeCubit.getInstance()
|
||||
.selectedSpace!
|
||||
.id!),
|
||||
automationId: scene.id));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
|
@ -0,0 +1,280 @@
|
||||
import 'dart:math';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/smart_scene/smart_scene_select_dart_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scenes_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/smart_scene_enable.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class SmartSceneSelectAutomationList extends StatefulWidget {
|
||||
const SmartSceneSelectAutomationList({
|
||||
super.key,
|
||||
required this.automationList,
|
||||
});
|
||||
|
||||
final List<ScenesModel> automationList;
|
||||
|
||||
@override
|
||||
State<SmartSceneSelectAutomationList> createState() =>
|
||||
_SmartSceneSelectAutomationListState();
|
||||
}
|
||||
|
||||
class _SmartSceneSelectAutomationListState
|
||||
extends State<SmartSceneSelectAutomationList> {
|
||||
final List<Color> colorList = _generateDarkColors(100);
|
||||
|
||||
static List<Color> _generateDarkColors(int count) {
|
||||
final random = Random();
|
||||
final colors = <Color>[];
|
||||
|
||||
while (colors.length < count) {
|
||||
final color =
|
||||
Color((random.nextDouble() * 0xFFFFFF).toInt()).withOpacity(1.0);
|
||||
if (_isDark(color)) {
|
||||
colors.add(color);
|
||||
}
|
||||
}
|
||||
return colors;
|
||||
}
|
||||
|
||||
static bool _isDark(Color color) {
|
||||
final brightness =
|
||||
((color.red * 299) + (color.green * 587) + (color.blue * 114)) / 1000;
|
||||
return brightness < 128;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: BodySmall(
|
||||
text: 'Save',
|
||||
style: context.bodySmall
|
||||
.copyWith(color: ColorsManager.primaryColorWithOpacity),
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: BodyMedium(
|
||||
text: 'Automation',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.bodyMedium.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.dividerColor,
|
||||
),
|
||||
Expanded(
|
||||
child: BlocBuilder<SmartSceneSelectBloc, SmartSceneSelectState>(
|
||||
builder: (context, state) {
|
||||
final smartSceneEnable = ((state is SmartSceneSelected))
|
||||
? state.smartSceneEnable
|
||||
: context.read<SmartSceneSelectBloc>().smartSceneEnable;
|
||||
|
||||
return ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: widget.automationList.length,
|
||||
itemBuilder: (context, index) {
|
||||
final automation = widget.automationList[index];
|
||||
final isSelected =
|
||||
smartSceneEnable?.entityId == automation.id;
|
||||
final descriptionSelected = isSelected
|
||||
? (smartSceneEnable?.actionExecutor == 'rule_enable'
|
||||
? 'Enable'
|
||||
: 'Disable')
|
||||
: automation.status == 'enable'
|
||||
? 'Enable'
|
||||
: 'Disable';
|
||||
|
||||
return SceneListTile(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
leadingWidget: CircleAvatar(
|
||||
backgroundColor: colorList[index % colorList.length],
|
||||
radius: 15,
|
||||
child: Text(
|
||||
index.toString(),
|
||||
style: context.bodyMedium.copyWith(color: Colors.white),
|
||||
),
|
||||
),
|
||||
titleString: automation.name,
|
||||
trailingWidget: TextButton.icon(
|
||||
iconAlignment: IconAlignment.end,
|
||||
onPressed: () {
|
||||
context.customAlertDialog(
|
||||
alertBody: EnableDisableAutomationDialog(
|
||||
automationId: automation.id,
|
||||
descriptionSelected: descriptionSelected,
|
||||
),
|
||||
title: automation.name,
|
||||
onConfirm: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
onDismiss: () {
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(const SmartSceneClearEvent());
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
},
|
||||
label: BodyMedium(
|
||||
text: _capitalizeFirst(descriptionSelected),
|
||||
style: context.bodyMedium
|
||||
.copyWith(color: ColorsManager.greyColor),
|
||||
),
|
||||
icon: const Icon(
|
||||
Icons.arrow_forward_ios_rounded,
|
||||
color: ColorsManager.greyColor,
|
||||
size: 14,
|
||||
),
|
||||
style: const ButtonStyle(
|
||||
padding: WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
context.customAlertDialog(
|
||||
alertBody: EnableDisableAutomationDialog(
|
||||
automationId: automation.id,
|
||||
descriptionSelected: descriptionSelected,
|
||||
),
|
||||
title: automation.name,
|
||||
onConfirm: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
onDismiss: () {
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(const SmartSceneClearEvent());
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
String _capitalizeFirst(String description) {
|
||||
if (description.isEmpty) return description;
|
||||
return '${description[0].toUpperCase()}${description.substring(1)}';
|
||||
}
|
||||
}
|
||||
|
||||
class EnableDisableAutomationDialog extends StatefulWidget {
|
||||
const EnableDisableAutomationDialog({
|
||||
super.key,
|
||||
required this.automationId,
|
||||
required this.descriptionSelected,
|
||||
});
|
||||
|
||||
final String automationId;
|
||||
final String descriptionSelected;
|
||||
|
||||
@override
|
||||
State<EnableDisableAutomationDialog> createState() =>
|
||||
_EnableDisableAutomationDialogState();
|
||||
}
|
||||
|
||||
class _EnableDisableAutomationDialogState
|
||||
extends State<EnableDisableAutomationDialog> {
|
||||
String? groupValue;
|
||||
final List<SceneOperationalValue> values = [
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPower,
|
||||
description: 'Enable',
|
||||
value: 'rule_enable',
|
||||
),
|
||||
SceneOperationalValue(
|
||||
icon: Assets.assetsAcPowerOFF,
|
||||
description: 'Disable',
|
||||
value: 'rule_disable',
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
groupValue =
|
||||
widget.descriptionSelected == 'Enable' ? 'rule_enable' : 'rule_disable';
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<SmartSceneSelectBloc, SmartSceneSelectState>(
|
||||
builder: (context, state) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
...values.map(
|
||||
(operation) => SceneListTile(
|
||||
iconsSize: 25,
|
||||
minLeadingWidth: 15,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
assetPath: operation.icon,
|
||||
assetHeaderValue: operation.iconValue,
|
||||
titleString: operation.description.toString(),
|
||||
textAlign: TextAlign.start,
|
||||
trailingWidget: Radio(
|
||||
value: operation.value,
|
||||
groupValue: groupValue,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
groupValue = value;
|
||||
});
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(SmartSceneEnableEvent(
|
||||
SmartSceneEnable(
|
||||
entityId: widget.automationId,
|
||||
actionExecutor: value!,
|
||||
),
|
||||
));
|
||||
},
|
||||
),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupValue = operation.value;
|
||||
});
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(SmartSceneEnableEvent(
|
||||
SmartSceneEnable(
|
||||
entityId: widget.automationId,
|
||||
actionExecutor: operation.value,
|
||||
),
|
||||
));
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_event.dart';
|
||||
|
||||
import 'package:syncrow_app/features/scene/widgets/select_smart_scene/smart_automation_list.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
class SmartEnableAutomation extends StatelessWidget {
|
||||
const SmartEnableAutomation({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultContainer(
|
||||
height: context.height * 0.5,
|
||||
width: double.infinity,
|
||||
child: BlocBuilder<SceneBloc, SceneState>(
|
||||
bloc: context.read<SceneBloc>()
|
||||
..add(
|
||||
LoadAutomation(HomeCubit.getInstance().selectedSpace?.id ?? '')),
|
||||
builder: (context, state) {
|
||||
if (state is SceneLoading) {
|
||||
return const Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: LinearProgressIndicator());
|
||||
}
|
||||
if (state is SceneLoaded) {
|
||||
return SmartSceneSelectAutomationList(
|
||||
automationList: state.automationList);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_event.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/select_smart_scene/smart_tab_run_list.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
class SmartEnableTabRun extends StatelessWidget {
|
||||
const SmartEnableTabRun({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultContainer(
|
||||
height: context.height * 0.5,
|
||||
width: double.infinity,
|
||||
child: BlocBuilder<SceneBloc, SceneState>(
|
||||
bloc: context.read<SceneBloc>()
|
||||
..add(LoadScenes(HomeCubit.getInstance().selectedSpace?.id ?? '')),
|
||||
builder: (context, state) {
|
||||
if (state is SceneLoading) {
|
||||
return const Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: LinearProgressIndicator());
|
||||
}
|
||||
if (state is SceneLoaded) {
|
||||
return SmartSceneSelectTabToRunList(scenes: state.scenes);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,112 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/smart_scene/smart_scene_select_dart_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scenes_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/smart_scene_enable.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class SmartSceneSelectTabToRunList extends StatefulWidget {
|
||||
const SmartSceneSelectTabToRunList({
|
||||
super.key,
|
||||
required this.scenes,
|
||||
});
|
||||
final List<ScenesModel> scenes;
|
||||
|
||||
@override
|
||||
State<SmartSceneSelectTabToRunList> createState() =>
|
||||
_SmartSceneSelectTabToRunListState();
|
||||
}
|
||||
|
||||
class _SmartSceneSelectTabToRunListState
|
||||
extends State<SmartSceneSelectTabToRunList> {
|
||||
String groupValue = '';
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: BodySmall(
|
||||
text: 'Save',
|
||||
style: context.bodySmall
|
||||
.copyWith(color: ColorsManager.primaryColorWithOpacity),
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: BodyMedium(
|
||||
text: 'Tab To Run',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.bodyMedium.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.dividerColor,
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: widget.scenes.length,
|
||||
itemBuilder: (context, index) {
|
||||
final scene = widget.scenes[index];
|
||||
return SceneListTile(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
leadingWidget: Image.asset(
|
||||
height: 32,
|
||||
width: 32,
|
||||
Assets.assetsIconsLogo,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
titleString: scene.name,
|
||||
trailingWidget: Radio(
|
||||
value: scene.id,
|
||||
groupValue: groupValue,
|
||||
onChanged: (String? value) {
|
||||
if (value != null) {
|
||||
setState(() {
|
||||
groupValue = value;
|
||||
});
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(SmartSceneEnableEvent(SmartSceneEnable(
|
||||
entityId: scene.id,
|
||||
actionExecutor: 'rule_enable',
|
||||
)));
|
||||
}
|
||||
}),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupValue = scene.id;
|
||||
});
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(SmartSceneEnableEvent(SmartSceneEnable(
|
||||
entityId: scene.id,
|
||||
actionExecutor: 'rule_enable',
|
||||
)));
|
||||
},
|
||||
);
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
@ -17,6 +17,7 @@ class DefaultScaffold extends StatelessWidget {
|
||||
this.padding,
|
||||
this.leading,
|
||||
this.leadingWidth,
|
||||
this.height,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
@ -27,6 +28,7 @@ class DefaultScaffold extends StatelessWidget {
|
||||
final EdgeInsetsGeometry? padding;
|
||||
final Widget? leading;
|
||||
final double? leadingWidth;
|
||||
final double? height;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnnotatedRegion(
|
||||
@ -54,8 +56,9 @@ class DefaultScaffold extends StatelessWidget {
|
||||
),
|
||||
body: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
padding: padding ?? const EdgeInsets.symmetric(horizontal: Constants.defaultPadding),
|
||||
height: height ?? MediaQuery.sizeOf(context).height,
|
||||
padding: padding ??
|
||||
const EdgeInsets.symmetric(horizontal: Constants.defaultPadding),
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
|
@ -3,7 +3,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsFontsAftikaRegular
|
||||
/// assets/fonts/AftikaRegular.ttf
|
||||
static const String assetsFontsAftikaRegular = "assets/fonts/AftikaRegular.ttf";
|
||||
static const String assetsFontsAftikaRegular =
|
||||
"assets/fonts/AftikaRegular.ttf";
|
||||
|
||||
/// Assets for assetsIcons3GangSwitch
|
||||
/// assets/icons/3GangSwitch.svg
|
||||
@ -19,82 +20,98 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsAutomatedClock
|
||||
/// assets/icons/automated_clock.svg
|
||||
static const String assetsIconsAutomatedClock = "assets/icons/automated_clock.svg";
|
||||
static const String assetsIconsAutomatedClock =
|
||||
"assets/icons/automated_clock.svg";
|
||||
static const String acSwitchIcon = "assets/icons/ac_switch_ic.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstChargeddmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstChargeddmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstChargeddmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstChargeddmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstChargeddmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstDefaultdmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstDefaultdmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstDefaultdmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstDefaultdmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstDefaultdmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOnstChargeddmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOnstChargeddmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOfflowOffpmOnstChargeddmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOfflowOffpmOnstChargeddmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOnstChargeddmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOnpmOffstDefaultdmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOfflowOnpmOffstDefaultdmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOfflowOnpmOffstDefaultdmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOfflowOnpmOffstDefaultdmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOfflowOnpmOffstDefaultdmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOnpmOnstDefaultdmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOfflowOnpmOnstDefaultdmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOfflowOnpmOnstDefaultdmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOfflowOnpmOnstDefaultdmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOfflowOnpmOnstDefaultdmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOffpmOffstChargeddmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOnlowOffpmOffstChargeddmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOnlowOffpmOffstChargeddmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOnlowOffpmOffstChargeddmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOnlowOffpmOffstChargeddmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOnpmOffstlowBatterydmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOnlowOnpmOffstlowBatterydmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOnlowOnpmOffstlowBatterydmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOnlowOnpmOffstlowBatterydmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOnlowOnpmOffstlowBatterydmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOnpmOnstlowpmdmOff
|
||||
/// assets/icons/battery/dmOff/perOffchargOnlowOnpmOnstlowpmdmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOffchargOnlowOnpmOnstlowpmdmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOffchargOnlowOnpmOnstlowpmdmOff =
|
||||
"assets/icons/battery/dmOff/perOffchargOnlowOnpmOnstlowpmdmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstChargeddmOff
|
||||
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstChargeddmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstChargeddmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstChargeddmOff =
|
||||
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstChargeddmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstDefaultdmOff
|
||||
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstDefaultdmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstDefaultdmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstDefaultdmOff =
|
||||
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstDefaultdmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOnstChargeddmOff
|
||||
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOnstChargeddmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOnchargOfflowOffpmOnstChargeddmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOnchargOfflowOffpmOnstChargeddmOff =
|
||||
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOnstChargeddmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOnpmOffstDefaultdmOff
|
||||
/// assets/icons/battery/dmOff/perOnchargOfflowOnpmOffstDefaultdmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOnchargOfflowOnpmOffstDefaultdmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOnchargOfflowOnpmOffstDefaultdmOff =
|
||||
"assets/icons/battery/dmOff/perOnchargOfflowOnpmOffstDefaultdmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOnpmOnstDefaultdmOff
|
||||
/// assets/icons/battery/dmOff/perOnchargOfflowOnpmOnstDefaultdmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOnchargOfflowOnpmOnstDefaultdmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOnchargOfflowOnpmOnstDefaultdmOff =
|
||||
"assets/icons/battery/dmOff/perOnchargOfflowOnpmOnstDefaultdmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOffpmOffstChargeddmOff
|
||||
/// assets/icons/battery/dmOff/perOnchargOnlowOffpmOffstChargeddmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOnchargOnlowOffpmOffstChargeddmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOnchargOnlowOffpmOffstChargeddmOff =
|
||||
"assets/icons/battery/dmOff/perOnchargOnlowOffpmOffstChargeddmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOnpmOffstlowBatterydmOff
|
||||
/// assets/icons/battery/dmOff/perOnchargOnlowOnpmOffstlowBatterydmOff.svg
|
||||
static const String assetsIconsBatteryDmOffPerOnchargOnlowOnpmOffstlowBatterydmOff =
|
||||
static const String
|
||||
assetsIconsBatteryDmOffPerOnchargOnlowOnpmOffstlowBatterydmOff =
|
||||
"assets/icons/battery/dmOff/perOnchargOnlowOnpmOffstlowBatterydmOff.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOnpmOnstlowpmdmOff
|
||||
@ -104,37 +121,44 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstChargeddmOn
|
||||
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstChargeddmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstChargeddmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstChargeddmOn =
|
||||
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstChargeddmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstDefaultdmOn
|
||||
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstDefaultdmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstDefaultdmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstDefaultdmOn =
|
||||
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstDefaultdmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOnstChargeddmOn
|
||||
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOnstChargeddmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOffchargOfflowOffpmOnstChargeddmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOffchargOfflowOffpmOnstChargeddmOn =
|
||||
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOnstChargeddmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOnpmOffstDefaultdmOn
|
||||
/// assets/icons/battery/dmOn/perOffchargOfflowOnpmOffstDefaultdmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOffchargOfflowOnpmOffstDefaultdmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOffchargOfflowOnpmOffstDefaultdmOn =
|
||||
"assets/icons/battery/dmOn/perOffchargOfflowOnpmOffstDefaultdmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOnpmOnstDefaultdmOn
|
||||
/// assets/icons/battery/dmOn/perOffchargOfflowOnpmOnstDefaultdmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOffchargOfflowOnpmOnstDefaultdmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOffchargOfflowOnpmOnstDefaultdmOn =
|
||||
"assets/icons/battery/dmOn/perOffchargOfflowOnpmOnstDefaultdmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOffpmOffstChargeddmOn
|
||||
/// assets/icons/battery/dmOn/perOffchargOnlowOffpmOffstChargeddmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOffchargOnlowOffpmOffstChargeddmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOffchargOnlowOffpmOffstChargeddmOn =
|
||||
"assets/icons/battery/dmOn/perOffchargOnlowOffpmOffstChargeddmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOnpmOffstlowBatterydmOn
|
||||
/// assets/icons/battery/dmOn/perOffchargOnlowOnpmOffstlowBatterydmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOffchargOnlowOnpmOffstlowBatterydmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOffchargOnlowOnpmOffstlowBatterydmOn =
|
||||
"assets/icons/battery/dmOn/perOffchargOnlowOnpmOffstlowBatterydmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOnpmOnstlowpmdmOn
|
||||
@ -144,37 +168,44 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstChargeddmOn
|
||||
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstChargeddmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstChargeddmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstChargeddmOn =
|
||||
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstChargeddmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstDefaultdmOn
|
||||
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstDefaultdmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstDefaultdmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstDefaultdmOn =
|
||||
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstDefaultdmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOnstChargeddmOn
|
||||
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOnstChargeddmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOnchargOfflowOffpmOnstChargeddmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOnchargOfflowOffpmOnstChargeddmOn =
|
||||
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOnstChargeddmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOnpmOffstDefaultdmOn
|
||||
/// assets/icons/battery/dmOn/perOnchargOfflowOnpmOffstDefaultdmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOnchargOfflowOnpmOffstDefaultdmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOnchargOfflowOnpmOffstDefaultdmOn =
|
||||
"assets/icons/battery/dmOn/perOnchargOfflowOnpmOffstDefaultdmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOnpmOnstDefaultdmOn
|
||||
/// assets/icons/battery/dmOn/perOnchargOfflowOnpmOnstDefaultdmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOnchargOfflowOnpmOnstDefaultdmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOnchargOfflowOnpmOnstDefaultdmOn =
|
||||
"assets/icons/battery/dmOn/perOnchargOfflowOnpmOnstDefaultdmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOffpmOffstChargeddmOn
|
||||
/// assets/icons/battery/dmOn/perOnchargOnlowOffpmOffstChargeddmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOnchargOnlowOffpmOffstChargeddmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOnchargOnlowOffpmOffstChargeddmOn =
|
||||
"assets/icons/battery/dmOn/perOnchargOnlowOffpmOffstChargeddmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOnpmOffstlowBatterydmOn
|
||||
/// assets/icons/battery/dmOn/perOnchargOnlowOnpmOffstlowBatterydmOn.svg
|
||||
static const String assetsIconsBatteryDmOnPerOnchargOnlowOnpmOffstlowBatterydmOn =
|
||||
static const String
|
||||
assetsIconsBatteryDmOnPerOnchargOnlowOnpmOffstlowBatterydmOn =
|
||||
"assets/icons/battery/dmOn/perOnchargOnlowOnpmOffstlowBatterydmOn.svg";
|
||||
|
||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOnpmOnstlowpmdmOn
|
||||
@ -226,7 +257,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsDashboardFill
|
||||
/// assets/icons/dashboard-fill.svg
|
||||
static const String assetsIconsDashboardFill = "assets/icons/dashboard-fill.svg";
|
||||
static const String assetsIconsDashboardFill =
|
||||
"assets/icons/dashboard-fill.svg";
|
||||
|
||||
/// Assets for assetsIconsDevices
|
||||
/// assets/icons/Devices.svg
|
||||
@ -242,7 +274,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsDoorLockLinkage
|
||||
/// assets/icons/DoorLockLinkage.svg
|
||||
static const String assetsIconsDoorLockLinkage = "assets/icons/DoorLockLinkage.svg";
|
||||
static const String assetsIconsDoorLockLinkage =
|
||||
"assets/icons/DoorLockLinkage.svg";
|
||||
|
||||
/// Assets for assetsIconsDoorLockLock
|
||||
/// assets/icons/DoorLockLock.svg
|
||||
@ -250,15 +283,18 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsDoorLockMembers
|
||||
/// assets/icons/DoorLockMembers.svg
|
||||
static const String assetsIconsDoorLockMembers = "assets/icons/DoorLockMembers.svg";
|
||||
static const String assetsIconsDoorLockMembers =
|
||||
"assets/icons/DoorLockMembers.svg";
|
||||
|
||||
/// Assets for assetsIconsDoorLockPassword
|
||||
/// assets/icons/DoorLockPassword.svg
|
||||
static const String assetsIconsDoorLockPassword = "assets/icons/DoorLockPassword.svg";
|
||||
static const String assetsIconsDoorLockPassword =
|
||||
"assets/icons/DoorLockPassword.svg";
|
||||
|
||||
/// Assets for assetsIconsDoorLockRecords
|
||||
/// assets/icons/DoorLockRecords.svg
|
||||
static const String assetsIconsDoorLockRecords = "assets/icons/DoorLockRecords.svg";
|
||||
static const String assetsIconsDoorLockRecords =
|
||||
"assets/icons/DoorLockRecords.svg";
|
||||
|
||||
/// Assets for assetsIconsDoorlockAssetsBatteryIndicator
|
||||
/// assets/icons/doorlock-assets/BatteryIndicator.svg
|
||||
@ -279,7 +315,8 @@ class Assets {
|
||||
/// assets/icons/doorlock-assets/lockIcon.svg
|
||||
static const String assetsIconsDoorlockAssetsLockIcon =
|
||||
"assets/icons/doorlock-assets/lockIcon.svg";
|
||||
static const String doorUnlockIcon = "assets/icons/doorlock-assets/door_un_look_ic.svg";
|
||||
static const String doorUnlockIcon =
|
||||
"assets/icons/doorlock-assets/door_un_look_ic.svg";
|
||||
|
||||
/// Assets for assetsIconsDoorlockAssetsMembersManagement
|
||||
/// assets/icons/doorlock-assets/members-management.svg
|
||||
@ -367,11 +404,13 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsLightSwitchOff
|
||||
/// assets/icons/lightSwitchOff.svg
|
||||
static const String assetsIconsLightSwitchOff = "assets/icons/lightSwitchOff.svg";
|
||||
static const String assetsIconsLightSwitchOff =
|
||||
"assets/icons/lightSwitchOff.svg";
|
||||
|
||||
/// Assets for assetsIconsLightSwitchOn
|
||||
/// assets/icons/lightSwitchOn.svg
|
||||
static const String assetsIconsLightSwitchOn = "assets/icons/lightSwitchOn.svg";
|
||||
static const String assetsIconsLightSwitchOn =
|
||||
"assets/icons/lightSwitchOn.svg";
|
||||
|
||||
/// Assets for assetsIconsLinkageIconsDoorLockAlarm
|
||||
/// assets/icons/linkageIcons/doorLockAlarm.svg
|
||||
@ -380,7 +419,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsLinkTimeLimitedPasswordIcon
|
||||
/// assets/icons/timeLimitedPasswordIcon.svg
|
||||
static const String timeLimitedPasswordIcon = "assets/icons/timeLimitedPasswordIcon.svg";
|
||||
static const String timeLimitedPasswordIcon =
|
||||
"assets/icons/timeLimitedPasswordIcon.svg";
|
||||
|
||||
/// Assets for assetsIconsoneTimePassword
|
||||
/// assets/icons/oneTimePassword.svg
|
||||
@ -388,7 +428,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsTimeLimitedPassword
|
||||
/// assets/icons/timeLimitedPassword.svg
|
||||
static const String timeLimitedPassword = "assets/icons/timeLimitedPassword.svg";
|
||||
static const String timeLimitedPassword =
|
||||
"assets/icons/timeLimitedPassword.svg";
|
||||
|
||||
/// Assets for assetsIconsNoValidPasswords
|
||||
/// assets/icons/noValidPasswords.svg
|
||||
@ -557,11 +598,13 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsPresenceSensorAssetsParameterSettings
|
||||
/// assets/icons/presence-sensor-assets/space_type_icon.svg
|
||||
static const String spaceTypeIcon = "assets/icons/presence-sensor-assets/space_type_icon.svg";
|
||||
static const String spaceTypeIcon =
|
||||
"assets/icons/presence-sensor-assets/space_type_icon.svg";
|
||||
|
||||
/// Assets for assetsIconsPresenceSensorAssetsParameterSettings
|
||||
/// assets/icons/presence-sensor-assets/space_type_icon.svg
|
||||
static const String sensitivityIcon = "assets/icons/presence-sensor-assets/Sensitivity.svg";
|
||||
static const String sensitivityIcon =
|
||||
"assets/icons/presence-sensor-assets/Sensitivity.svg";
|
||||
|
||||
/// Assets for assetsIconsPresenceSensorAssetsParameterSettings
|
||||
/// assets/icons/presence-sensor-assets/maximum_distance.svg
|
||||
@ -594,7 +637,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsRoutinesFill
|
||||
/// assets/icons/Routines-fill.svg
|
||||
static const String assetsIconsRoutinesFill = "assets/icons/Routines-fill.svg";
|
||||
static const String assetsIconsRoutinesFill =
|
||||
"assets/icons/Routines-fill.svg";
|
||||
|
||||
/// Assets for assetsIconsScan
|
||||
/// assets/icons/Scan.svg
|
||||
@ -626,7 +670,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsIconsSustainability
|
||||
/// assets/icons/sustainability.svg
|
||||
static const String assetsIconsSustainability = "assets/icons/sustainability.svg";
|
||||
static const String assetsIconsSustainability =
|
||||
"assets/icons/sustainability.svg";
|
||||
|
||||
/// Assets for assetsIconsUnlockingMethodsIconsFace
|
||||
/// assets/icons/unlockingMethodsIcons/face.svg
|
||||
@ -718,7 +763,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsImagesHorizintalBlade
|
||||
/// assets/images/HorizintalBlade.png
|
||||
static const String assetsImagesHorizintalBlade = "assets/images/HorizintalBlade.png";
|
||||
static const String assetsImagesHorizintalBlade =
|
||||
"assets/images/HorizintalBlade.png";
|
||||
|
||||
/// Assets for assetsImagesLogo
|
||||
/// assets/images/Logo.svg
|
||||
@ -726,7 +772,8 @@ class Assets {
|
||||
|
||||
/// Assets for assetsImagesLogoHorizontal
|
||||
/// assets/images/logo_horizontal.png
|
||||
static const String assetsImagesLogoHorizontal = "assets/images/logo_horizontal.png";
|
||||
static const String assetsImagesLogoHorizontal =
|
||||
"assets/images/logo_horizontal.png";
|
||||
|
||||
/// Assets for assetsImagesPause
|
||||
/// assets/images/Pause.png
|
||||
@ -756,7 +803,8 @@ class Assets {
|
||||
/// assets/images/Window.png
|
||||
static const String assetsImagesWindow = "assets/images/Window.png";
|
||||
|
||||
static const String assetsSensitivityFunction = "assets/icons/functions_icons/sensitivity.svg";
|
||||
static const String assetsSensitivityFunction =
|
||||
"assets/icons/functions_icons/sensitivity.svg";
|
||||
|
||||
//assets/icons/functions_icons/sesitivity_operation_icon.svg
|
||||
static const String assetsSensitivityOperationIcon =
|
||||
@ -764,59 +812,73 @@ class Assets {
|
||||
|
||||
//assets/icons/functions_icons/ac_power.svg
|
||||
|
||||
static const String assetsAcPower = "assets/icons/functions_icons/ac_power.svg";
|
||||
static const String assetsAcPower =
|
||||
"assets/icons/functions_icons/ac_power.svg";
|
||||
|
||||
//assets/icons/functions_icons/ac_power_off.svg
|
||||
|
||||
static const String assetsAcPowerOFF = "assets/icons/functions_icons/ac_power_off.svg";
|
||||
static const String assetsAcPowerOFF =
|
||||
"assets/icons/functions_icons/ac_power_off.svg";
|
||||
|
||||
//assets/icons/functions_icons/child_lock.svg
|
||||
|
||||
static const String assetsChildLock = "assets/icons/functions_icons/child_lock.svg";
|
||||
static const String assetsChildLock =
|
||||
"assets/icons/functions_icons/child_lock.svg";
|
||||
|
||||
//assets/icons/functions_icons/cooling.svg
|
||||
|
||||
static const String assetsFreezing = "assets/icons/functions_icons/freezing.svg";
|
||||
static const String assetsFreezing =
|
||||
"assets/icons/functions_icons/freezing.svg";
|
||||
|
||||
//assets/icons/functions_icons/fan_speed.svg
|
||||
|
||||
static const String assetsFanSpeed = "assets/icons/functions_icons/fan_speed.svg";
|
||||
static const String assetsFanSpeed =
|
||||
"assets/icons/functions_icons/fan_speed.svg";
|
||||
|
||||
//assets/icons/functions_icons/ac_cooling.svg
|
||||
|
||||
static const String assetsAcCooling = "assets/icons/functions_icons/ac_cooling.svg";
|
||||
static const String assetsAcCooling =
|
||||
"assets/icons/functions_icons/ac_cooling.svg";
|
||||
|
||||
//assets/icons/functions_icons/ac_heating.svg
|
||||
|
||||
static const String assetsAcHeating = "assets/icons/functions_icons/ac_heating.svg";
|
||||
static const String assetsAcHeating =
|
||||
"assets/icons/functions_icons/ac_heating.svg";
|
||||
|
||||
//assets/icons/functions_icons/celsius_degrees.svg
|
||||
|
||||
static const String assetsCelsiusDegrees = "assets/icons/functions_icons/celsius_degrees.svg";
|
||||
static const String assetsCelsiusDegrees =
|
||||
"assets/icons/functions_icons/celsius_degrees.svg";
|
||||
|
||||
//assets/icons/functions_icons/tempreture.svg
|
||||
|
||||
static const String assetsTempreture = "assets/icons/functions_icons/tempreture.svg";
|
||||
static const String assetsTempreture =
|
||||
"assets/icons/functions_icons/tempreture.svg";
|
||||
|
||||
//assets/icons/functions_icons/ac_fan_low.svg
|
||||
|
||||
static const String assetsAcFanLow = "assets/icons/functions_icons/ac_fan_low.svg";
|
||||
static const String assetsAcFanLow =
|
||||
"assets/icons/functions_icons/ac_fan_low.svg";
|
||||
|
||||
//assets/icons/functions_icons/ac_fan_middle.svg
|
||||
|
||||
static const String assetsAcFanMiddle = "assets/icons/functions_icons/ac_fan_middle.svg";
|
||||
static const String assetsAcFanMiddle =
|
||||
"assets/icons/functions_icons/ac_fan_middle.svg";
|
||||
|
||||
//assets/icons/functions_icons/ac_fan_high.svg
|
||||
|
||||
static const String assetsAcFanHigh = "assets/icons/functions_icons/ac_fan_high.svg";
|
||||
static const String assetsAcFanHigh =
|
||||
"assets/icons/functions_icons/ac_fan_high.svg";
|
||||
|
||||
//assets/icons/functions_icons/ac_fan_auto.svg
|
||||
|
||||
static const String assetsAcFanAuto = "assets/icons/functions_icons/ac_fan_auto.svg";
|
||||
static const String assetsAcFanAuto =
|
||||
"assets/icons/functions_icons/ac_fan_auto.svg";
|
||||
|
||||
//assets/icons/functions_icons/scene_child_lock.svg
|
||||
|
||||
static const String assetsSceneChildLock = "assets/icons/functions_icons/scene_child_lock.svg";
|
||||
static const String assetsSceneChildLock =
|
||||
"assets/icons/functions_icons/scene_child_lock.svg";
|
||||
|
||||
//assets/icons/functions_icons/scene_child_unlock.svg
|
||||
|
||||
@ -825,15 +887,18 @@ class Assets {
|
||||
|
||||
//assets/icons/functions_icons/scene_refresh.svg
|
||||
|
||||
static const String assetsSceneRefresh = "assets/icons/functions_icons/scene_refresh.svg";
|
||||
static const String assetsSceneRefresh =
|
||||
"assets/icons/functions_icons/scene_refresh.svg";
|
||||
|
||||
//assets/icons/functions_icons/light_countdown.svg
|
||||
|
||||
static const String assetsLightCountdown = "assets/icons/functions_icons/light_countdown.svg";
|
||||
static const String assetsLightCountdown =
|
||||
"assets/icons/functions_icons/light_countdown.svg";
|
||||
|
||||
//assets/icons/functions_icons/far_detection.svg
|
||||
|
||||
static const String assetsFarDetection = "assets/icons/functions_icons/far_detection.svg";
|
||||
static const String assetsFarDetection =
|
||||
"assets/icons/functions_icons/far_detection.svg";
|
||||
|
||||
//assets/icons/functions_icons/far_detection_function.svg
|
||||
|
||||
@ -842,11 +907,13 @@ class Assets {
|
||||
|
||||
//assets/icons/functions_icons/indicator.svg
|
||||
|
||||
static const String assetsIndicator = "assets/icons/functions_icons/indicator.svg";
|
||||
static const String assetsIndicator =
|
||||
"assets/icons/functions_icons/indicator.svg";
|
||||
|
||||
//assets/icons/functions_icons/motion_detection.svg
|
||||
|
||||
static const String assetsMotionDetection = "assets/icons/functions_icons/motion_detection.svg";
|
||||
static const String assetsMotionDetection =
|
||||
"assets/icons/functions_icons/motion_detection.svg";
|
||||
|
||||
//assets/icons/functions_icons/motionless_detection.svg
|
||||
|
||||
@ -855,15 +922,18 @@ class Assets {
|
||||
|
||||
//assets/icons/functions_icons/nobody_time.svg
|
||||
|
||||
static const String assetsNobodyTime = "assets/icons/functions_icons/nobody_time.svg";
|
||||
static const String assetsNobodyTime =
|
||||
"assets/icons/functions_icons/nobody_time.svg";
|
||||
|
||||
//assets/icons/functions_icons/factory_reset.svg
|
||||
|
||||
static const String assetsFactoryReset = "assets/icons/functions_icons/factory_reset.svg";
|
||||
static const String assetsFactoryReset =
|
||||
"assets/icons/functions_icons/factory_reset.svg";
|
||||
|
||||
//assets/icons/functions_icons/master_state.svg
|
||||
|
||||
static const String assetsMasterState = "assets/icons/functions_icons/master_state.svg";
|
||||
static const String assetsMasterState =
|
||||
"assets/icons/functions_icons/master_state.svg";
|
||||
|
||||
//assets/icons/functions_icons/switch_alarm_sound.svg
|
||||
|
||||
@ -872,5 +942,91 @@ class Assets {
|
||||
|
||||
//assets/icons/functions_icons/reset_off.svg
|
||||
|
||||
static const String assetsResetOff = "assets/icons/functions_icons/reset_off.svg";
|
||||
static const String assetsResetOff =
|
||||
"assets/icons/functions_icons/reset_off.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/card_unlock.svg
|
||||
|
||||
static const String assetsCardUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/card_unlock.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/doorbell.svg
|
||||
|
||||
static const String assetsDoorbell =
|
||||
"assets/icons/functions_icons/automation_functions/doorbell.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/doorlock_normal_open.svg
|
||||
|
||||
static const String assetsDoorlockNormalOpen =
|
||||
"assets/icons/functions_icons/automation_functions/doorlock_normal_open.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/double_lock.svg
|
||||
|
||||
static const String assetsDoubleLock =
|
||||
"assets/icons/functions_icons/automation_functions/double_lock.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/fingerprint_unlock.svg
|
||||
|
||||
static const String assetsFingerprintUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/fingerprint_unlock.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/hijack_alarm.svg
|
||||
|
||||
static const String assetsHijackAlarm =
|
||||
"assets/icons/functions_icons/automation_functions/hijack_alarm.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/lock_alarm.svg
|
||||
|
||||
static const String assetsLockAlarm =
|
||||
"assets/icons/functions_icons/automation_functions/lock_alarm.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/password_unlock.svg
|
||||
|
||||
static const String assetsPasswordUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/password_unlock.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/remote_unlock_req.svg
|
||||
|
||||
static const String assetsRemoteUnlockReq =
|
||||
"assets/icons/functions_icons/automation_functions/remote_unlock_req.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/remote_unlock_via_app.svg
|
||||
|
||||
static const String assetsRemoteUnlockViaApp =
|
||||
"assets/icons/functions_icons/automation_functions/remote_unlock_via_app.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/residual_electricity.svg
|
||||
|
||||
static const String assetsResidualElectricity =
|
||||
"assets/icons/functions_icons/automation_functions/residual_electricity.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/temp_password_unlock.svg
|
||||
|
||||
static const String assetsTempPasswordUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/temp_password_unlock.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/self_test_result.svg
|
||||
|
||||
static const String assetsSelfTestResult =
|
||||
"assets/icons/functions_icons/automation_functions/self_test_result.svg";
|
||||
|
||||
///assets/icons/functions_icons/automation_functions/presence.svg
|
||||
|
||||
static const String assetsPresence =
|
||||
"assets/icons/functions_icons/automation_functions/presence.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/motion.svg
|
||||
|
||||
static const String assetsMotion =
|
||||
"assets/icons/functions_icons/automation_functions/motion.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/current_temp.svg
|
||||
|
||||
static const String assetsCurrentTemp =
|
||||
"assets/icons/functions_icons/automation_functions/current_temp.svg";
|
||||
|
||||
//assets/icons/functions_icons/automation_functions/presence_state.svg
|
||||
|
||||
static const String assetsPresenceState =
|
||||
"assets/icons/functions_icons/automation_functions/presence_state.svg";
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/effective_period/effect_period_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/smart_scene/smart_scene_select_dart_bloc.dart';
|
||||
import 'package:syncrow_app/navigation/navigation_service.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
||||
@ -28,7 +30,10 @@ class MyApp extends StatelessWidget {
|
||||
BlocProvider(create: (context) => CreateSceneBloc()),
|
||||
BlocProvider(create: (context) => SceneBloc()),
|
||||
BlocProvider(create: (context) => ProfileBloc()),
|
||||
|
||||
BlocProvider(create: (context) => SmartSceneSelectBloc()),
|
||||
BlocProvider(
|
||||
create: (context) => EffectPeriodBloc(),
|
||||
),
|
||||
],
|
||||
child: MaterialApp(
|
||||
navigatorKey: NavigationService.navigatorKey,
|
||||
|
17
lib/navigation/navigate_to_route.dart
Normal file
@ -0,0 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void navigateToRoute(BuildContext context, String targetRoute) {
|
||||
bool routeFound = false;
|
||||
|
||||
Navigator.popUntil(context, (route) {
|
||||
if (route.settings.name == targetRoute) {
|
||||
routeFound = true;
|
||||
return true;
|
||||
}
|
||||
return route.isFirst;
|
||||
});
|
||||
|
||||
if (!routeFound) {
|
||||
Navigator.pushNamed(context, targetRoute);
|
||||
}
|
||||
}
|
@ -14,9 +14,11 @@ import 'package:syncrow_app/features/menu/view/widgets/profile/profile_view.dart
|
||||
import 'package:syncrow_app/features/scene/bloc/tab_change/tab_change_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/tab_change/tab_change_event.dart';
|
||||
import 'package:syncrow_app/features/scene/view/device_functions_view.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_auto_settings.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_tasks_view.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_rooms_tabbar.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_view.dart';
|
||||
import 'package:syncrow_app/features/scene/view/smart_automation_select_route.dart';
|
||||
import 'package:syncrow_app/features/splash/view/splash_view.dart';
|
||||
import 'routing_constants.dart';
|
||||
|
||||
@ -24,54 +26,67 @@ class Router {
|
||||
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||||
switch (settings.name) {
|
||||
case Routes.splash:
|
||||
return MaterialPageRoute(builder: (_) => const SplashView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const SplashView(), settings: settings);
|
||||
|
||||
// case Routes.devicesRoute:
|
||||
// return MaterialPageRoute(
|
||||
// builder: (_) => const DevicesView(), settings: settings);
|
||||
|
||||
case Routes.profileRoute:
|
||||
return MaterialPageRoute(builder: (_) => const ProfileView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const ProfileView(), settings: settings);
|
||||
|
||||
case Routes.sceneRoute:
|
||||
return MaterialPageRoute(builder: (_) => const SceneView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const SceneView(), settings: settings);
|
||||
|
||||
case Routes.layoutRoute:
|
||||
return MaterialPageRoute(builder: (_) => const LayoutPage(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const LayoutPage(), settings: settings);
|
||||
|
||||
case Routes.authLogin:
|
||||
return MaterialPageRoute(builder: (_) => const LoginView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const LoginView(), settings: settings);
|
||||
|
||||
case Routes.otpRoute:
|
||||
return MaterialPageRoute(builder: (_) => const OtpView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const OtpView(), settings: settings);
|
||||
|
||||
case Routes.authSignUp:
|
||||
return MaterialPageRoute(builder: (_) => const SignUpView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const SignUpView(), settings: settings);
|
||||
|
||||
case Routes.dashboardRoute:
|
||||
return MaterialPageRoute(builder: (_) => const DashboardView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const DashboardView(), settings: settings);
|
||||
|
||||
case Routes.homeRoute:
|
||||
return MaterialPageRoute(builder: (_) => const AppLayout(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const AppLayout(), settings: settings);
|
||||
|
||||
case Routes.menuRoute:
|
||||
return MaterialPageRoute(builder: (_) => const MenuView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const MenuView(), settings: settings);
|
||||
|
||||
case Routes.createUnit:
|
||||
return MaterialPageRoute(builder: (_) => const CreateUnitView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const CreateUnitView(), settings: settings);
|
||||
case Routes.sceneTasksRoute:
|
||||
return MaterialPageRoute(builder: (_) => const SceneTasksView(), settings: settings);
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const SceneTasksView(), settings: settings);
|
||||
case Routes.sceneControlDevicesRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider(
|
||||
create: (BuildContext context) => DeviceManagerBloc()..add(FetchAllDevices()),
|
||||
create: (BuildContext context) =>
|
||||
DeviceManagerBloc()..add(FetchAllDevices()),
|
||||
),
|
||||
BlocProvider(
|
||||
create: (BuildContext context) =>
|
||||
TabBarBloc(context.read<DeviceManagerBloc>())
|
||||
..add(const TabChanged(selectedIndex: 0, roomId: '-1')),
|
||||
create: (BuildContext context) => TabBarBloc(
|
||||
context.read<DeviceManagerBloc>())
|
||||
..add(const TabChanged(selectedIndex: 0, roomId: '-1')),
|
||||
),
|
||||
],
|
||||
child: const SceneRoomsTabBarDevicesView(),
|
||||
@ -79,7 +94,18 @@ class Router {
|
||||
settings: settings);
|
||||
case Routes.deviceFunctionsRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const DeviceFunctionsView(),
|
||||
builder: (_) => DeviceFunctionsView(),
|
||||
settings: settings,
|
||||
);
|
||||
case Routes.sceneAutoSettingsRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const SceneAutoSettings(),
|
||||
settings: settings,
|
||||
);
|
||||
|
||||
case Routes.smartAutomationSelectRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const SmartAutomationSelectView(),
|
||||
settings: settings,
|
||||
);
|
||||
default:
|
||||
|
@ -19,6 +19,7 @@ class Routes {
|
||||
static const String createUnit = '/create-unit';
|
||||
static const String sceneTasksRoute = '/scene-tasks';
|
||||
static const String sceneControlDevicesRoute = '/scene-control-devices';
|
||||
static const String deviceFunctionsRoute = '/device-functions';
|
||||
|
||||
static const String deviceFunctionsRoute = '/device-functions';
|
||||
static const String sceneAutoSettingsRoute = '/scene-automation-settings';
|
||||
static const String smartAutomationSelectRoute = '/smart-automation-select';
|
||||
}
|
||||
|
@ -81,7 +81,8 @@ abstract class ApiEndpoints {
|
||||
static const String controlGroup = '/group/control';
|
||||
//GET
|
||||
static const String groupBySpace = '/group/{unitUuid}';
|
||||
static const String devicesByGroupName = '/group/{unitUuid}/devices/{groupName}';
|
||||
static const String devicesByGroupName =
|
||||
'/group/{unitUuid}/devices/{groupName}';
|
||||
|
||||
static const String groupByUuid = '/group/{groupUuid}';
|
||||
//DELETE
|
||||
@ -93,7 +94,8 @@ abstract class ApiEndpoints {
|
||||
static const String addDeviceToRoom = '/device/room';
|
||||
static const String addDeviceToGroup = '/device/group';
|
||||
static const String controlDevice = '/device/{deviceUuid}/control';
|
||||
static const String firmwareDevice = '/device/{deviceUuid}/firmware/{firmwareVersion}';
|
||||
static const String firmwareDevice =
|
||||
'/device/{deviceUuid}/firmware/{firmwareVersion}';
|
||||
static const String getDevicesByUserId = '/device/user/{userId}';
|
||||
static const String getDevicesByUnitId = '/device/unit/{unitUuid}';
|
||||
|
||||
@ -102,7 +104,8 @@ abstract class ApiEndpoints {
|
||||
static const String deviceByUuid = '/device/{deviceUuid}';
|
||||
static const String deviceFunctions = '/device/{deviceUuid}/functions';
|
||||
static const String gatewayApi = '/device/gateway/{gatewayUuid}/devices';
|
||||
static const String deviceFunctionsStatus = '/device/{deviceUuid}/functions/status';
|
||||
static const String deviceFunctionsStatus =
|
||||
'/device/{deviceUuid}/functions/status';
|
||||
|
||||
///Device Permission Module
|
||||
//POST
|
||||
@ -114,26 +117,42 @@ abstract class ApiEndpoints {
|
||||
|
||||
static const String assignDeviceToRoom = '/device/room';
|
||||
|
||||
/// Scene API ////////////////////
|
||||
/// Scene & Automation API ////////////////////
|
||||
/// POST
|
||||
static const String createScene = '/scene/tap-to-run';
|
||||
static const String triggerScene = '/scene/tap-to-run/trigger/{sceneId}';
|
||||
static const String createAutomation = '/automation';
|
||||
|
||||
/// GET
|
||||
static const String getUnitScenes = '/scene/tap-to-run/{unitUuid}';
|
||||
|
||||
static const String getScene = '/scene/tap-to-run/details/{sceneId}';
|
||||
|
||||
static const String getUnitAutomation = '/automation/{unitUuid}';
|
||||
|
||||
static const String getAutomationDetails =
|
||||
'/automation/details/{automationId}';
|
||||
|
||||
/// PUT
|
||||
static const String updateScene = '/scene/tap-to-run/{sceneId}';
|
||||
|
||||
static const String updateAutomation = '/automation/{automationId}';
|
||||
|
||||
static const String updateAutomationStatus =
|
||||
'/automation/status/{automationId}';
|
||||
|
||||
/// DELETE
|
||||
static const String deleteScene = '/scene/tap-to-run/{unitUuid}/{sceneId}';
|
||||
|
||||
static const String deleteAutomation =
|
||||
'/automation/{unitUuid}/{automationId}';
|
||||
|
||||
//////////////////////Door Lock //////////////////////
|
||||
//online
|
||||
static const String addTemporaryPassword = '/door-lock/temporary-password/online/{doorLockUuid}';
|
||||
static const String getTemporaryPassword = '/door-lock/temporary-password/online/{doorLockUuid}';
|
||||
static const String addTemporaryPassword =
|
||||
'/door-lock/temporary-password/online/{doorLockUuid}';
|
||||
static const String getTemporaryPassword =
|
||||
'/door-lock/temporary-password/online/{doorLockUuid}';
|
||||
|
||||
//one-time offline
|
||||
static const String addOneTimeTemporaryPassword =
|
||||
|
@ -1,18 +1,21 @@
|
||||
import 'package:syncrow_app/features/scene/model/create_automation_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/create_scene_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_details_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scenes_model.dart';
|
||||
import 'package:syncrow_app/features/scene/model/update_automation.dart';
|
||||
import 'package:syncrow_app/services/api/api_links_endpoints.dart';
|
||||
import 'package:syncrow_app/services/api/http_service.dart';
|
||||
|
||||
class SceneApi {
|
||||
static final HTTPService _httpService = HTTPService();
|
||||
|
||||
//create scene
|
||||
static Future<Map<String, dynamic>> createScene(
|
||||
CreateSceneModel createSceneModel) async {
|
||||
try {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.createScene,
|
||||
body: createSceneModel.toJson(),
|
||||
body: createSceneModel.toMap(),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
@ -24,6 +27,26 @@ class SceneApi {
|
||||
}
|
||||
}
|
||||
|
||||
// create automation
|
||||
static Future<Map<String, dynamic>> createAutomation(
|
||||
CreateAutomationModel createAutomationModel) async {
|
||||
try {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.createAutomation,
|
||||
body: createAutomationModel.toMap(),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
//get scene by unit id
|
||||
|
||||
static Future<List<ScenesModel>> getScenesByUnitId(String unitId) async {
|
||||
try {
|
||||
final response = await _httpService.get(
|
||||
@ -43,6 +66,27 @@ class SceneApi {
|
||||
}
|
||||
}
|
||||
|
||||
//getAutomation
|
||||
|
||||
static Future<List<ScenesModel>> getAutomationByUnitId(String unitId) async {
|
||||
try {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.getUnitAutomation.replaceAll('{unitUuid}', unitId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
List<ScenesModel> scenes = [];
|
||||
for (var scene in json) {
|
||||
scenes.add(ScenesModel.fromJson(scene));
|
||||
}
|
||||
return scenes;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
static Future<bool> triggerScene(String sceneId) async {
|
||||
try {
|
||||
final response = await _httpService.post(
|
||||
@ -56,6 +100,38 @@ class SceneApi {
|
||||
}
|
||||
}
|
||||
|
||||
//automation details
|
||||
static Future<SceneDetailsModel> getAutomationDetails(
|
||||
String automationId) async {
|
||||
try {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.getAutomationDetails
|
||||
.replaceAll('{automationId}', automationId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) => SceneDetailsModel.fromJson(json),
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
//updateAutomationStatus
|
||||
static Future<bool> updateAutomationStatus(String automationId,
|
||||
AutomationStatusUpdate createAutomationEnable) async {
|
||||
try {
|
||||
final response = await _httpService.put(
|
||||
path: ApiEndpoints.updateAutomationStatus
|
||||
.replaceAll('{automationId}', automationId),
|
||||
body: createAutomationEnable.toMap(),
|
||||
expectedResponseModel: (json) => json['success'],
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
//getScene
|
||||
|
||||
static Future<SceneDetailsModel> getSceneDetails(String sceneId) async {
|
||||
@ -71,7 +147,7 @@ class SceneApi {
|
||||
}
|
||||
}
|
||||
|
||||
//updateScene
|
||||
//update Scene
|
||||
static updateScene(CreateSceneModel createSceneModel, String sceneId) async {
|
||||
try {
|
||||
final response = await _httpService.put(
|
||||
@ -88,7 +164,26 @@ class SceneApi {
|
||||
}
|
||||
}
|
||||
|
||||
//deleteScene
|
||||
//update automation
|
||||
static updateAutomation(
|
||||
CreateAutomationModel createAutomationModel, String automationId) async {
|
||||
try {
|
||||
final response = await _httpService.put(
|
||||
path: ApiEndpoints.updateAutomation
|
||||
.replaceAll('{automationId}', automationId),
|
||||
body: createAutomationModel
|
||||
.toJson(automationId.isNotEmpty == true ? automationId : null),
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
//delete Scene
|
||||
|
||||
static Future<bool> deleteScene(
|
||||
{required String unitUuid, required String sceneId}) async {
|
||||
@ -105,4 +200,21 @@ class SceneApi {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
// delete automation
|
||||
static Future<bool> deleteAutomation(
|
||||
{required String unitUuid, required String automationId}) async {
|
||||
try {
|
||||
final response = await _httpService.delete(
|
||||
path: ApiEndpoints.deleteAutomation
|
||||
.replaceAll('{automationId}', automationId)
|
||||
.replaceAll('{unitUuid}', unitUuid),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) => json['statusCode'] == 200,
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ extension ContextExtension on BuildContext {
|
||||
required String title,
|
||||
required VoidCallback onConfirm,
|
||||
VoidCallback? onDismiss,
|
||||
bool? hideConfirmButton,
|
||||
}) {
|
||||
showDialog(
|
||||
context: this,
|
||||
@ -110,39 +111,57 @@ extension ContextExtension on BuildContext {
|
||||
width: double.infinity,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'Cancel',
|
||||
style: context.bodyMedium
|
||||
.copyWith(color: ColorsManager.greyColor),
|
||||
hideConfirmButton != true
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'Cancel',
|
||||
style: context.bodyMedium
|
||||
.copyWith(color: ColorsManager.greyColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
width: 1,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: onConfirm,
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'Confirm',
|
||||
style: context.bodyMedium.copyWith(
|
||||
color:
|
||||
ColorsManager.primaryColorWithOpacity),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
child: GestureDetector(
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'Cancel',
|
||||
style: context.bodyMedium
|
||||
.copyWith(color: ColorsManager.greyColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
width: 1,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: onConfirm,
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'Confirm',
|
||||
style: context.bodyMedium.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -40,4 +40,5 @@ class StringsManager {
|
||||
static const String functions = "Functions";
|
||||
static const String firstLaunch = "firstLaunch";
|
||||
static const String deleteScene = 'Delete Scene';
|
||||
static const String deleteAutomation = 'Delete Automation';
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ flutter:
|
||||
- assets/icons/MenuIcons/SecurityAndPrivacyIcons/
|
||||
- assets/icons/curtainsIcon/
|
||||
- assets/icons/functions_icons/
|
||||
- assets/icons/functions_icons/automation_functions/
|
||||
- .env.development
|
||||
- .env.staging
|
||||
- .env.production
|
||||
|