mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
curtain and forget password and select all check box and fix bugs
This commit is contained in:
17
assets/images/curtain.svg
Normal file
17
assets/images/curtain.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<svg width="36" height="35" viewBox="0 0 36 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17.768 0.417969H0.825168C0.825168 0.417969 0.398459 11.6714 1.87939 17.9772V17.98H1.8766C0.705244 20.8163 0.515595 34.4599 0.981349 34.6189C1.76504 34.8866 3.07864 35.3077 4.21932 34.5045C4.77432 35.1292 7.28717 35.238 7.40151 34.393C9.0693 35.1794 10.2909 34.895 10.2602 34.3957C9.71355 25.4488 7.11146 19.0091 7.11146 19.0091C7.11146 19.0091 16.6999 12.2877 17.768 0.417969Z" fill="#448CF2"/>
|
||||
<path d="M33.66 17.98H33.6572V17.9772C35.1381 11.6714 34.7114 0.417969 34.7114 0.417969H17.7686C18.8367 12.2877 28.4251 19.0091 28.4251 19.0091C28.4251 19.0091 25.823 25.4488 25.2764 34.3957C25.2457 34.895 26.4673 35.1794 28.1351 34.393C28.2494 35.238 30.7623 35.1292 31.3173 34.5045C32.458 35.3077 33.7716 34.8866 34.5552 34.6189C35.021 34.4599 34.8314 20.8163 33.66 17.98Z" fill="#448CF2"/>
|
||||
<path d="M6.84854 27.4424C6.7382 27.4534 6.63674 27.5078 6.56646 27.5935C6.49617 27.6793 6.46281 27.7894 6.47371 27.8998C6.85579 31.7307 6.98129 34.3858 6.98269 34.4123C6.98764 34.5199 7.0339 34.6214 7.11182 34.6957C7.18974 34.7701 7.29334 34.8115 7.40103 34.8114H7.42055C7.47546 34.8089 7.52934 34.7956 7.5791 34.7722C7.62887 34.7489 7.67355 34.716 7.71058 34.6754C7.74762 34.6348 7.77629 34.5872 7.79496 34.5355C7.81363 34.4838 7.82192 34.429 7.81937 34.3741C7.81937 34.3476 7.69164 31.6718 7.30732 27.8178C7.30235 27.7628 7.28647 27.7094 7.26061 27.6606C7.23475 27.6119 7.19943 27.5688 7.15671 27.5338C7.114 27.4989 7.06474 27.4728 7.01183 27.4571C6.95892 27.4414 6.90341 27.4364 6.84854 27.4424Z" fill="#2F66D3"/>
|
||||
<path d="M7.62658 18.5951C7.46284 18.6037 7.29874 18.6024 7.13516 18.5912C6.90926 18.579 6.64012 18.5522 6.34171 18.5143C6.32694 18.5126 6.31292 18.5069 6.30125 18.4977C6.28959 18.4885 6.28075 18.4762 6.27575 18.4622C6.27075 18.4482 6.26978 18.4331 6.27296 18.4186C6.27614 18.404 6.28334 18.3907 6.29374 18.3801C6.68022 17.9908 7.04563 17.5812 7.3884 17.153C7.42875 17.1037 7.45704 17.0457 7.47101 16.9836C7.48499 16.9215 7.48428 16.857 7.46892 16.7952C7.45356 16.7334 7.42399 16.6761 7.38256 16.6278C7.34112 16.5794 7.28897 16.5414 7.23027 16.5168L7.22246 16.5137C7.13959 16.4794 7.04788 16.4726 6.96086 16.4943C6.87383 16.5161 6.7961 16.5652 6.73913 16.6345C6.2991 17.1895 5.81303 17.7063 5.28609 18.1796C5.23302 18.2252 5.17036 18.2582 5.10276 18.2763C5.03517 18.2943 4.96437 18.2969 4.89564 18.2839C4.68674 18.2451 4.47311 18.203 4.2578 18.1584C4.24006 18.1548 4.22333 18.1474 4.20888 18.1365C4.19442 18.1256 4.1826 18.1116 4.1743 18.0955C4.16599 18.0794 4.16141 18.0617 4.1609 18.0436C4.16039 18.0255 4.16396 18.0076 4.17135 17.991C4.75396 16.6822 5.38342 14.1217 5.71921 12.0104C5.73663 11.9008 5.70981 11.7888 5.64464 11.699C5.57947 11.6092 5.48129 11.549 5.37171 11.5316C5.26213 11.5141 5.15011 11.541 5.06031 11.6061C4.9705 11.6713 4.91027 11.7695 4.89285 11.8791C4.49319 14.3913 3.82663 16.7726 3.36645 17.7512C3.34087 17.8046 3.29754 17.8474 3.24388 17.8724C3.19021 17.8974 3.12953 17.9029 3.07222 17.8881C2.78831 17.8167 2.22717 17.6182 1.83532 17.4762C1.78303 17.4573 1.7275 17.449 1.67196 17.4517C1.61642 17.4544 1.56198 17.4682 1.5118 17.4921C1.46161 17.5161 1.41669 17.5497 1.37963 17.5912C1.34258 17.6327 1.31413 17.6811 1.29594 17.7336L1.29259 17.7437C1.25559 17.8482 1.26149 17.9632 1.309 18.0634C1.3565 18.1637 1.44175 18.241 1.54611 18.2786C1.9572 18.4261 2.57802 18.628 2.87197 18.7017C2.92612 18.7145 2.9746 18.7447 3.01008 18.7875C3.04556 18.8304 3.0661 18.8837 3.06859 18.9393C3.09648 19.7542 3.05688 20.7602 3.02369 21.5986C3.00054 22.182 2.98046 22.6862 2.99022 22.9841C2.9937 23.0927 3.03931 23.1957 3.11739 23.2713C3.19547 23.3469 3.2999 23.3891 3.40857 23.3891C3.43423 23.3891 3.4557 23.3891 3.52013 23.3428C3.61429 23.2732 3.69082 23.1825 3.74357 23.078C3.79632 22.9734 3.82381 22.858 3.82384 22.7409C3.82607 22.462 3.84169 22.0688 3.85898 21.6301C3.8905 20.838 3.92675 19.9009 3.90835 19.0907C3.90806 19.0724 3.91193 19.0543 3.91967 19.0377C3.92741 19.0212 3.93882 19.0066 3.95303 18.995C3.96724 18.9835 3.98388 18.9754 4.0017 18.9712C4.01952 18.9671 4.03804 18.967 4.05588 18.9711C4.24748 19.011 4.43769 19.0489 4.62511 19.0843C4.70909 19.1002 4.78703 19.139 4.85033 19.1965C4.91362 19.2539 4.9598 19.3277 4.98377 19.4098C5.53161 21.2517 5.89466 23.1436 6.06755 25.0574C6.07779 25.1606 6.126 25.2564 6.20284 25.326C6.27968 25.3957 6.37966 25.4344 6.48338 25.4345C6.52761 25.4356 6.57146 25.426 6.61121 25.4066C6.65096 25.3872 6.68546 25.3585 6.7118 25.3229C6.77645 25.2473 6.8247 25.159 6.8535 25.0638C6.88231 24.9686 6.89104 24.8684 6.87914 24.7696C6.70414 22.9554 6.36102 21.1614 5.8542 19.4106C5.85074 19.3974 5.85055 19.3836 5.85366 19.3703C5.85678 19.357 5.86309 19.3447 5.87206 19.3344C5.88102 19.3241 5.89236 19.3162 5.9051 19.3113C5.91783 19.3064 5.93157 19.3047 5.94512 19.3063C6.38298 19.3682 6.7712 19.4098 7.08859 19.4274C7.22497 19.4343 7.34266 19.438 7.44585 19.438C7.52534 19.438 7.59618 19.4357 7.6606 19.4315C7.75879 19.4277 7.85279 19.3907 7.92725 19.3266C8.00171 19.2625 8.05223 19.175 8.07058 19.0785C8.08056 19.0161 8.07629 18.9523 8.05811 18.8918C8.03993 18.8314 8.00829 18.7758 7.96557 18.7293C7.92286 18.6828 7.87017 18.6466 7.81146 18.6233C7.75275 18.6001 7.68954 18.5905 7.62658 18.5951Z" fill="#2F66D3"/>
|
||||
<path d="M4.50657 31.1913L4.49792 30.8008C4.49671 30.7459 4.48469 30.6917 4.46255 30.6414C4.44041 30.5912 4.40858 30.5457 4.36888 30.5077C4.32918 30.4697 4.28238 30.4399 4.23117 30.42C4.17995 30.4001 4.12531 30.3905 4.07037 30.3917C4.01544 30.3929 3.96127 30.4049 3.91098 30.4271C3.86069 30.4492 3.81525 30.481 3.77726 30.5207C3.73926 30.5604 3.70946 30.6072 3.68956 30.6585C3.66965 30.7097 3.66003 30.7643 3.66123 30.8192L3.66988 31.2097C3.71478 33.3098 3.74797 34.3542 3.81379 34.6105C3.83656 34.6992 3.88832 34.7777 3.96084 34.8335C4.03336 34.8894 4.12248 34.9194 4.214 34.9187C4.24753 34.9187 4.28094 34.9147 4.31357 34.907C4.42056 34.8803 4.5129 34.8129 4.57102 34.7191C4.62913 34.6254 4.64843 34.5127 4.62482 34.405C4.57015 34.1476 4.5286 32.2232 4.50657 31.1913Z" fill="#2F66D3"/>
|
||||
<path d="M3.56385 24.9803C3.4529 24.9803 3.34649 25.0244 3.26804 25.1029C3.18958 25.1813 3.14551 25.2877 3.14551 25.3987C3.14551 25.9565 3.42859 28.2657 3.42719 28.9964C3.42719 29.1074 3.47127 29.2138 3.54972 29.2922C3.62818 29.3707 3.73458 29.4148 3.84553 29.4148C3.95649 29.4148 4.06289 29.3707 4.14135 29.2922C4.2198 29.2138 4.26388 29.1074 4.26388 28.9964C4.26527 28.2155 4.01733 25.9598 3.98219 25.3987C3.97964 25.2885 3.93475 25.1836 3.85684 25.1057C3.77893 25.0278 3.674 24.9829 3.56385 24.9803Z" fill="#2F66D3"/>
|
||||
<path d="M6.19932 5.48148C6.14483 5.4736 6.08931 5.47655 6.03596 5.49017C5.98261 5.50379 5.93248 5.52781 5.88843 5.56084C5.84438 5.59388 5.80729 5.63528 5.77928 5.68269C5.75127 5.73009 5.73289 5.78255 5.7252 5.83707C5.69424 6.05628 5.48925 9.05831 5.2745 9.98145C5.24943 10.0895 5.26828 10.203 5.32691 10.2972C5.38553 10.3913 5.47914 10.4583 5.58714 10.4835C5.61832 10.4908 5.65023 10.4944 5.68225 10.4943C5.77667 10.4943 5.86829 10.4623 5.94222 10.4035C6.01615 10.3448 6.06803 10.2628 6.08943 10.1708C6.31924 9.18214 6.52702 6.1433 6.55351 5.95393C6.56897 5.84434 6.54038 5.7331 6.474 5.64455C6.40761 5.556 6.30884 5.49737 6.19932 5.48148Z" fill="#2F66D3"/>
|
||||
<path d="M28.6861 27.4424C28.7965 27.4534 28.8979 27.5078 28.9682 27.5935C29.0385 27.6793 29.0719 27.7894 29.061 27.8998C28.6789 31.7307 28.5534 34.3858 28.552 34.4123C28.547 34.5199 28.5008 34.6214 28.4228 34.6957C28.3449 34.7701 28.2413 34.8115 28.1336 34.8114H28.1141C28.0592 34.8089 28.0053 34.7956 27.9556 34.7722C27.9058 34.7489 27.8611 34.716 27.8241 34.6754C27.787 34.6348 27.7584 34.5872 27.7397 34.5355C27.721 34.4838 27.7127 34.429 27.7153 34.3741C27.7153 34.3476 27.843 31.6718 28.2273 27.8178C28.2323 27.7628 28.2482 27.7094 28.2741 27.6606C28.2999 27.6119 28.3352 27.5688 28.378 27.5338C28.4207 27.4989 28.4699 27.4728 28.5228 27.4571C28.5758 27.4414 28.6313 27.4364 28.6861 27.4424Z" fill="#2F66D3"/>
|
||||
<path d="M31.0294 31.1913L31.0381 30.8008C31.0393 30.7459 31.0513 30.6917 31.0735 30.6414C31.0956 30.5912 31.1274 30.5457 31.1671 30.5077C31.2068 30.4697 31.2536 30.4399 31.3048 30.42C31.3561 30.4001 31.4107 30.3905 31.4656 30.3917C31.5206 30.3929 31.5747 30.4049 31.625 30.4271C31.6753 30.4492 31.7208 30.481 31.7588 30.5207C31.7967 30.5604 31.8265 30.6072 31.8465 30.6585C31.8664 30.7097 31.876 30.7643 31.8748 30.8192L31.8661 31.2097C31.8212 33.3098 31.788 34.3542 31.7222 34.6105C31.6995 34.6992 31.6477 34.7777 31.5752 34.8335C31.5026 34.8894 31.4135 34.9194 31.322 34.9187C31.2885 34.9187 31.2551 34.9147 31.2224 34.907C31.1155 34.8803 31.0231 34.8129 30.965 34.7191C30.9069 34.6254 30.8876 34.5127 30.9112 34.405C30.9659 34.1476 31.0074 32.2232 31.0294 31.1913Z" fill="#2F66D3"/>
|
||||
<path d="M31.9725 24.9803C32.0834 24.9803 32.1898 25.0244 32.2683 25.1029C32.3468 25.1813 32.3908 25.2877 32.3908 25.3987C32.3908 25.9565 32.1078 28.2657 32.1091 28.9964C32.1091 29.1074 32.0651 29.2138 31.9866 29.2922C31.9082 29.3707 31.8018 29.4148 31.6908 29.4148C31.5799 29.4148 31.4734 29.3707 31.395 29.2922C31.3165 29.2138 31.2725 29.1074 31.2725 28.9964C31.2725 28.2155 31.519 25.9598 31.5541 25.3987C31.5567 25.2885 31.6016 25.1836 31.6795 25.1057C31.7574 25.0278 31.8623 24.9829 31.9725 24.9803Z" fill="#2F66D3"/>
|
||||
<path d="M29.3362 5.48141C29.4461 5.46589 29.5576 5.49464 29.6462 5.56132C29.7349 5.628 29.7934 5.72717 29.809 5.837C29.8399 6.05621 30.0449 9.05824 30.2597 9.98138C30.2847 10.0894 30.2659 10.203 30.2072 10.2971C30.1486 10.3912 30.055 10.4582 29.947 10.4834C29.9158 10.4907 29.8839 10.4943 29.8519 10.4943C29.7575 10.4942 29.6659 10.4622 29.5919 10.4035C29.518 10.3447 29.4661 10.2627 29.4447 10.1707C29.2149 9.18207 29.0071 6.14323 28.9806 5.95386C28.9652 5.84406 28.994 5.73263 29.0607 5.64404C29.1273 5.55546 29.2265 5.49696 29.3362 5.48141Z" fill="#2F66D3"/>
|
||||
<path d="M10.6447 10.2047C10.539 10.1709 10.4242 10.1804 10.3256 10.2312C10.2269 10.282 10.1525 10.3699 10.1187 10.4756C9.63749 11.9296 8.98265 13.3202 8.16836 14.6174C8.10986 14.7117 8.09119 14.8253 8.11648 14.9334C8.14177 15.0414 8.20894 15.135 8.30321 15.1935C8.39748 15.252 8.51113 15.2707 8.61917 15.2454C8.7272 15.2201 8.82076 15.1529 8.87927 15.0586C9.72954 13.7033 10.4131 12.2502 10.9152 10.731C10.932 10.6787 10.9383 10.6236 10.9338 10.5688C10.9293 10.5141 10.9141 10.4607 10.889 10.4118C10.8638 10.363 10.8293 10.3195 10.7874 10.284C10.7455 10.2485 10.697 10.2215 10.6447 10.2047Z" fill="#2F66D3"/>
|
||||
<path d="M27.9102 18.5951C28.0739 18.6037 28.238 18.6024 28.4016 18.5912C28.6275 18.579 28.8966 18.5522 29.1951 18.5143C29.2098 18.5126 29.2239 18.5069 29.2355 18.4977C29.2472 18.4885 29.256 18.4762 29.261 18.4622C29.266 18.4482 29.267 18.4331 29.2638 18.4186C29.2606 18.404 29.2534 18.3907 29.243 18.3801C28.8566 17.9908 28.4911 17.5812 28.1484 17.153C28.108 17.1037 28.0797 17.0457 28.0658 16.9836C28.0518 16.9215 28.0525 16.857 28.0679 16.7952C28.0832 16.7334 28.1128 16.6761 28.1542 16.6278C28.1957 16.5794 28.2478 16.5414 28.3065 16.5168L28.3143 16.5137C28.3972 16.4794 28.4889 16.4726 28.5759 16.4943C28.6629 16.5161 28.7407 16.5652 28.7976 16.6345C29.2377 17.1895 29.7237 17.7063 30.2507 18.1796C30.3038 18.2252 30.3664 18.2582 30.434 18.2763C30.5016 18.2943 30.5724 18.2969 30.6411 18.2839C30.85 18.2451 31.0637 18.203 31.279 18.1584C31.2967 18.1548 31.3134 18.1474 31.3279 18.1365C31.3424 18.1256 31.3542 18.1116 31.3625 18.0955C31.3708 18.0794 31.3754 18.0617 31.3759 18.0436C31.3764 18.0255 31.3728 18.0076 31.3654 17.991C30.7828 16.6822 30.1534 14.1217 29.8176 12.0104C29.8001 11.9008 29.827 11.7888 29.8921 11.699C29.9573 11.6092 30.0555 11.549 30.1651 11.5316C30.2746 11.5141 30.3867 11.541 30.4765 11.6061C30.5663 11.6713 30.6265 11.7695 30.6439 11.8791C31.0436 14.3913 31.7101 16.7726 32.1703 17.7512C32.196 17.8049 32.2395 17.8479 32.2935 17.8729C32.3474 17.8979 32.4084 17.9033 32.4659 17.8881C32.7499 17.8167 33.311 17.6182 33.7028 17.4762C33.7551 17.4573 33.8107 17.449 33.8662 17.4517C33.9217 17.4544 33.9762 17.4682 34.0264 17.4921C34.0766 17.5161 34.1215 17.5497 34.1585 17.5912C34.1956 17.6327 34.224 17.6811 34.2422 17.7336L34.2456 17.7437C34.2822 17.8481 34.2762 17.9628 34.2287 18.0627C34.1812 18.1627 34.0962 18.2399 33.9921 18.2775C33.581 18.425 32.9601 18.6269 32.6662 18.7006C32.6123 18.7137 32.5641 18.7439 32.5289 18.7868C32.4937 18.8296 32.4734 18.8828 32.471 18.9382C32.4431 19.7531 32.4827 20.7591 32.5159 21.5974C32.539 22.1809 32.5591 22.6851 32.5493 22.983C32.5459 23.0916 32.5003 23.1946 32.4222 23.2702C32.3441 23.3458 32.2397 23.388 32.131 23.3879C32.1053 23.3879 32.0839 23.3879 32.0194 23.3416C31.9249 23.2725 31.8479 23.1821 31.7947 23.0777C31.7415 22.9734 31.7135 22.858 31.7129 22.7409C31.7107 22.462 31.6951 22.0688 31.6778 21.6301C31.6463 20.838 31.61 19.9009 31.6284 19.0907C31.6287 19.0724 31.6248 19.0543 31.6171 19.0377C31.6094 19.0212 31.598 19.0066 31.5837 18.995C31.5695 18.9835 31.5529 18.9754 31.5351 18.9712C31.5173 18.9671 31.4987 18.967 31.4809 18.9711C31.2893 19.011 31.0991 19.0489 30.9117 19.0843C30.8277 19.1002 30.7497 19.139 30.6864 19.1965C30.6232 19.2539 30.577 19.3277 30.553 19.4098C30.0052 21.2517 29.6421 23.1436 29.4692 25.0574C29.459 25.1606 29.4108 25.2564 29.3339 25.326C29.2571 25.3957 29.1571 25.4344 29.0534 25.4345C29.0092 25.4356 28.9653 25.426 28.9256 25.4066C28.8858 25.3872 28.8513 25.3585 28.825 25.3229C28.7603 25.2473 28.7121 25.159 28.6833 25.0638C28.6545 24.9686 28.6457 24.8684 28.6576 24.7696C28.8326 22.9554 29.1757 21.1614 29.6826 19.4106C29.686 19.3974 29.6862 19.3836 29.6831 19.3703C29.68 19.357 29.6737 19.3447 29.6647 19.3344C29.6558 19.3241 29.6444 19.3162 29.6317 19.3113C29.6189 19.3064 29.6052 19.3047 29.5917 19.3063C29.1538 19.3682 28.7656 19.4098 28.4482 19.4274C28.3118 19.4343 28.1941 19.438 28.0909 19.438C28.0114 19.438 27.9406 19.4357 27.8762 19.4315C27.778 19.4277 27.684 19.3907 27.6095 19.3266C27.5351 19.2625 27.4845 19.175 27.4662 19.0785C27.4562 19.0161 27.4605 18.9523 27.4787 18.8918C27.4968 18.8314 27.5285 18.7758 27.5712 18.7293C27.6139 18.6828 27.6666 18.6466 27.7253 18.6233C27.784 18.6001 27.8472 18.5905 27.9102 18.5951Z" fill="#2F66D3"/>
|
||||
<path d="M24.8921 10.2047C24.9978 10.1709 25.1126 10.1804 25.2112 10.2312C25.3099 10.282 25.3843 10.3699 25.4181 10.4756C25.8993 11.9296 26.5541 13.3202 27.3684 14.6174C27.4269 14.7117 27.4456 14.8253 27.4203 14.9334C27.395 15.0414 27.3279 15.135 27.2336 15.1935C27.1393 15.252 27.0257 15.2707 26.9176 15.2454C26.8096 15.2201 26.716 15.1529 26.6575 15.0586C25.8073 13.7033 25.1237 12.2502 24.6216 10.731C24.6048 10.6787 24.5985 10.6236 24.603 10.5688C24.6075 10.5141 24.6227 10.4607 24.6478 10.4118C24.673 10.363 24.7075 10.3195 24.7494 10.284C24.7913 10.2485 24.8398 10.2215 24.8921 10.2047Z" fill="#2F66D3"/>
|
||||
<path d="M34.9896 0.836685H0.418342C0.307391 0.836685 0.200984 0.79261 0.12253 0.714155C0.0440752 0.635701 0 0.529294 0 0.418343C0 0.307391 0.0440752 0.200984 0.12253 0.12253C0.200984 0.0440752 0.307391 1.6533e-09 0.418342 0H34.9896C35.1006 1.6533e-09 35.207 0.0440752 35.2854 0.12253C35.3639 0.200984 35.408 0.307391 35.408 0.418343C35.408 0.529294 35.3639 0.635701 35.2854 0.714155C35.207 0.79261 35.1006 0.836685 34.9896 0.836685Z" fill="#2F66D3"/>
|
||||
</svg>
|
After Width: | Height: | Size: 15 KiB |
@ -31,7 +31,8 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
|
||||
////////////////////////////// forget password //////////////////////////////////
|
||||
final TextEditingController forgetEmailController = TextEditingController();
|
||||
final TextEditingController forgetPasswordController = TextEditingController();
|
||||
final TextEditingController forgetPasswordController =
|
||||
TextEditingController();
|
||||
final TextEditingController forgetOtp = TextEditingController();
|
||||
final forgetFormKey = GlobalKey<FormState>();
|
||||
late bool checkValidate = false;
|
||||
@ -40,22 +41,55 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
int _remainingTime = 0;
|
||||
List<RegionModel>? regionList = [RegionModel(name: 'name', id: 'id')];
|
||||
|
||||
Future<void> _onStartTimer(StartTimerEvent event, Emitter<AuthState> emit) async {
|
||||
|
||||
Future _onStartTimer(
|
||||
StartTimerEvent event, Emitter<AuthState> emit) async {
|
||||
if (_validateInputs(emit)) return;
|
||||
if (_timer != null && _timer!.isActive) {
|
||||
return;
|
||||
}
|
||||
_remainingTime = 1;
|
||||
add(UpdateTimerEvent(remainingTime: _remainingTime, isButtonEnabled: false));
|
||||
_remainingTime = (await AuthenticationAPI.sendOtp(
|
||||
email: forgetEmailController.text, regionUuid: regionUuid))!;
|
||||
add(UpdateTimerEvent(
|
||||
remainingTime: _remainingTime, isButtonEnabled: false));
|
||||
try {
|
||||
forgetEmailValidate = '';
|
||||
_remainingTime = (await AuthenticationAPI.sendOtp(
|
||||
email: forgetEmailController.text, regionUuid: regionUuid))!;
|
||||
} on DioException catch (e) {
|
||||
if (e.response!.statusCode == 400) {
|
||||
final errorData = e.response!.data;
|
||||
String errorMessage = errorData['message'];
|
||||
print('sendOtp=$errorMessage');
|
||||
if (errorMessage == 'User not found') {
|
||||
validate='Invalid Credential';
|
||||
emit(AuthInitialState());
|
||||
return 1;
|
||||
} else {
|
||||
validate='';
|
||||
_remainingTime = errorData['data']['cooldown'] ?? 1;
|
||||
emit(AuthInitialState());
|
||||
}
|
||||
} else {
|
||||
emit(AuthInitialState());
|
||||
|
||||
return 1;
|
||||
}
|
||||
emit(AuthInitialState());
|
||||
|
||||
} catch (e) {
|
||||
emit(AuthInitialState());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
_timer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
_remainingTime--;
|
||||
if (_remainingTime <= 0) {
|
||||
_timer?.cancel();
|
||||
add(const UpdateTimerEvent(remainingTime: 0, isButtonEnabled: true));
|
||||
} else {
|
||||
add(UpdateTimerEvent(remainingTime: _remainingTime, isButtonEnabled: false));
|
||||
add(UpdateTimerEvent(
|
||||
remainingTime: _remainingTime, isButtonEnabled: false));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -65,14 +99,16 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
emit(const TimerState(isButtonEnabled: true, remainingTime: 0));
|
||||
}
|
||||
|
||||
Future<void> changePassword(ChangePasswordEvent event, Emitter<AuthState> emit) async {
|
||||
Future<void> changePassword(
|
||||
ChangePasswordEvent event, Emitter<AuthState> emit) async {
|
||||
try {
|
||||
emit(LoadingForgetState());
|
||||
var response = await AuthenticationAPI.verifyOtp(
|
||||
email: forgetEmailController.text, otpCode: forgetOtp.text);
|
||||
if (response == true) {
|
||||
await AuthenticationAPI.forgetPassword(
|
||||
password: forgetPasswordController.text, email: forgetEmailController.text);
|
||||
password: forgetPasswordController.text,
|
||||
email: forgetEmailController.text);
|
||||
_timer?.cancel();
|
||||
emit(const TimerState(isButtonEnabled: true, remainingTime: 0));
|
||||
emit(SuccessForgetState());
|
||||
@ -89,7 +125,12 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
} else if (errorMessage == "OTP expired") {
|
||||
forgetValidate = 'One time password has been expired.';
|
||||
emit(AuthInitialState());
|
||||
}else{
|
||||
validate='';
|
||||
emit(AuthInitialState());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +142,9 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
}
|
||||
|
||||
void _onUpdateTimer(UpdateTimerEvent event, Emitter<AuthState> emit) {
|
||||
emit(TimerState(isButtonEnabled: event.isButtonEnabled, remainingTime: event.remainingTime));
|
||||
emit(TimerState(
|
||||
isButtonEnabled: event.isButtonEnabled,
|
||||
remainingTime: event.remainingTime));
|
||||
}
|
||||
|
||||
///////////////////////////////////// login /////////////////////////////////////
|
||||
@ -115,6 +158,7 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
String otpCode = '';
|
||||
String validate = '';
|
||||
String forgetValidate = '';
|
||||
String forgetEmailValidate = '';
|
||||
String regionUuid = '';
|
||||
static Token token = Token.emptyConstructor();
|
||||
static UserModel? user;
|
||||
@ -132,7 +176,9 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
|
||||
token = await AuthenticationAPI.loginWithEmail(
|
||||
model: LoginWithEmailModel(
|
||||
email: event.username, password: event.password, regionUuid: event.regionUuid),
|
||||
email: event.username,
|
||||
password: event.password,
|
||||
regionUuid: event.regionUuid),
|
||||
);
|
||||
} catch (failure) {
|
||||
validate = 'Invalid Credentials!';
|
||||
@ -142,7 +188,8 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
|
||||
if (token.accessTokenIsNotEmpty) {
|
||||
FlutterSecureStorage storage = const FlutterSecureStorage();
|
||||
await storage.write(key: Token.loginAccessTokenKey, value: token.accessToken);
|
||||
await storage.write(
|
||||
key: Token.loginAccessTokenKey, value: token.accessToken);
|
||||
const FlutterSecureStorage().write(
|
||||
key: UserModel.userUuidKey,
|
||||
value: Token.decodeToken(token.accessToken)['uuid'].toString());
|
||||
@ -160,9 +207,9 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
}
|
||||
|
||||
checkBoxToggle(
|
||||
CheckBoxEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
CheckBoxEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
emit(AuthLoading());
|
||||
isChecked = event.newValue!;
|
||||
add(CheckEnableEvent());
|
||||
@ -218,7 +265,9 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
emit(LoadingForgetState());
|
||||
final nameError = validateEmail(forgetEmailController.text);
|
||||
if (nameError != null) {
|
||||
emit(FailureForgetState(error: nameError));
|
||||
forgetEmailValidate = nameError;
|
||||
emit(AuthInitialState());
|
||||
// emit(FailureForgetState(error: nameError));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -297,12 +346,14 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
static Future<String> getTokenAndValidate() async {
|
||||
try {
|
||||
const storage = FlutterSecureStorage();
|
||||
final firstLaunch =
|
||||
await SharedPreferencesHelper.readBoolFromSP(StringsManager.firstLaunch) ?? true;
|
||||
final firstLaunch = await SharedPreferencesHelper.readBoolFromSP(
|
||||
StringsManager.firstLaunch) ??
|
||||
true;
|
||||
if (firstLaunch) {
|
||||
storage.deleteAll();
|
||||
}
|
||||
await SharedPreferencesHelper.saveBoolToSP(StringsManager.firstLaunch, false);
|
||||
await SharedPreferencesHelper.saveBoolToSP(
|
||||
StringsManager.firstLaunch, false);
|
||||
final value = await storage.read(key: Token.loginAccessTokenKey) ?? '';
|
||||
if (value.isEmpty) {
|
||||
return 'Token not found';
|
||||
@ -354,7 +405,9 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
final String formattedTime = [
|
||||
if (days > 0) '${days}d', // Append 'd' for days
|
||||
if (days > 0 || hours > 0)
|
||||
hours.toString().padLeft(2, '0'), // Show hours if there are days or hours
|
||||
hours
|
||||
.toString()
|
||||
.padLeft(2, '0'), // Show hours if there are days or hours
|
||||
minutes.toString().padLeft(2, '0'),
|
||||
seconds.toString().padLeft(2, '0'),
|
||||
].join(':');
|
||||
@ -363,9 +416,9 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
}
|
||||
|
||||
bool checkEnable(
|
||||
CheckEnableEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
CheckEnableEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
emit(AuthLoading());
|
||||
checkValidate = isChecked == true &&
|
||||
loginPasswordController.text.isNotEmpty &&
|
||||
@ -376,18 +429,18 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||
}
|
||||
|
||||
changeValidate(
|
||||
ChangeValidateEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
ChangeValidateEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
emit(AuthLoading());
|
||||
validate = '';
|
||||
emit(LoginInitial());
|
||||
}
|
||||
|
||||
changeForgetValidate(
|
||||
ChangeValidateEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
ChangeValidateEvent event,
|
||||
Emitter<AuthState> emit,
|
||||
) {
|
||||
emit(AuthLoading());
|
||||
forgetValidate = '';
|
||||
emit(LoginInitial());
|
||||
|
@ -64,307 +64,310 @@ class ForgetPasswordWebPage extends StatelessWidget {
|
||||
Size size = MediaQuery.of(context).size;
|
||||
return FirstLayer(
|
||||
second: Center(
|
||||
child: Stack(
|
||||
children: [
|
||||
if (state is AuthLoading)
|
||||
const Center(child: CircularProgressIndicator()),
|
||||
ListView(
|
||||
shrinkWrap: true,
|
||||
controller: _scrollController,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(size.width * 0.02),
|
||||
margin: EdgeInsets.all(size.width * 0.09),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.3),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
child: Center(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: SvgPicture.asset(
|
||||
Assets.loginLogo,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
borderRadius:
|
||||
const BorderRadius.all(Radius.circular(30)),
|
||||
border: Border.all(
|
||||
color:
|
||||
ColorsManager.graysColor.withOpacity(0.2)),
|
||||
if (state is AuthLoading)
|
||||
const Center(child: CircularProgressIndicator()),
|
||||
ListView(
|
||||
shrinkWrap: true,
|
||||
controller: _scrollController,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(size.width * 0.02),
|
||||
margin: EdgeInsets.all(size.width * 0.09),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.3),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
child: Center(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: SvgPicture.asset(
|
||||
Assets.loginLogo,
|
||||
),
|
||||
),
|
||||
child: Form(
|
||||
key: forgetBloc.forgetFormKey,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: size.width * 0.02,
|
||||
vertical: size.width * 0.003),
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
borderRadius:
|
||||
const BorderRadius.all(Radius.circular(30)),
|
||||
border: Border.all(
|
||||
color:
|
||||
ColorsManager.graysColor.withOpacity(0.2)),
|
||||
),
|
||||
child: Form(
|
||||
key: forgetBloc.forgetFormKey,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: size.width * 0.02,
|
||||
vertical: size.width * 0.003),
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 10),
|
||||
const Text(
|
||||
'Forget Password',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'Please fill in your account information to\nretrieve your password',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 10),
|
||||
const Text(
|
||||
'Forget Password',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'Please fill in your account information to\nretrieve your password',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: _buildDropdownField(context, forgetBloc, size)
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Account",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: _buildDropdownField(context, forgetBloc, size)
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Account",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: TextFormField(
|
||||
controller:forgetBloc.forgetEmailController ,
|
||||
validator: forgetBloc.validateEmail,
|
||||
decoration: textBoxDecoration()!.copyWith(
|
||||
hintText: 'Enter your email',
|
||||
hintStyle: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
style: const TextStyle(
|
||||
color: Colors.black),
|
||||
),
|
||||
),
|
||||
if(forgetBloc.forgetEmailValidate!='')
|
||||
SizedBox(
|
||||
child: Text(
|
||||
forgetBloc.forgetEmailValidate,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: ColorsManager.red),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: TextFormField(
|
||||
controller:forgetBloc.forgetEmailController ,
|
||||
validator: forgetBloc.validateEmail,
|
||||
decoration: textBoxDecoration()!
|
||||
.copyWith(
|
||||
hintText: 'Enter your email',
|
||||
hintStyle: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontWeight: FontWeight.w400)),
|
||||
style: const TextStyle(
|
||||
color: Colors.black),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"One Time Password",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"One Time Password",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: TextFormField(
|
||||
validator: forgetBloc.validateCode,
|
||||
keyboardType:
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: TextFormField(
|
||||
validator: forgetBloc.validateCode,
|
||||
keyboardType:
|
||||
TextInputType.visiblePassword,
|
||||
controller: forgetBloc.forgetOtp,
|
||||
decoration:
|
||||
controller: forgetBloc.forgetOtp,
|
||||
decoration:
|
||||
textBoxDecoration()!.copyWith(
|
||||
hintText: 'Enter Code',
|
||||
hintStyle: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontWeight: FontWeight.w400),
|
||||
suffixIcon: SizedBox(
|
||||
width: 100,
|
||||
child: Center(
|
||||
child: InkWell(
|
||||
onTap: state is TimerState &&
|
||||
hintText: 'Enter Code',
|
||||
hintStyle: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontWeight: FontWeight.w400),
|
||||
suffixIcon: SizedBox(
|
||||
width: 100,
|
||||
child: Center(
|
||||
child: InkWell(
|
||||
onTap: state is TimerState &&
|
||||
!state.isButtonEnabled &&
|
||||
state.remainingTime !=
|
||||
1
|
||||
? null
|
||||
: () {
|
||||
forgetBloc.add(
|
||||
StartTimerEvent());
|
||||
},
|
||||
child: Text(
|
||||
'Get Code ${state is TimerState && !state.isButtonEnabled && state.remainingTime != 1 ? "(${forgetBloc.formattedTime(state.remainingTime)}) " : ""}',
|
||||
style: TextStyle(
|
||||
color: state is TimerState &&
|
||||
state.remainingTime != 1
|
||||
? null : () {
|
||||
forgetBloc.add(StartTimerEvent());
|
||||
|
||||
},
|
||||
child: Text(
|
||||
'Get Code ${state is TimerState && !state.isButtonEnabled && state.remainingTime != 1 ? "(${forgetBloc.formattedTime(state.remainingTime)}) " : ""}',
|
||||
style: TextStyle(
|
||||
color: state is TimerState &&
|
||||
!state.isButtonEnabled
|
||||
? Colors.grey
|
||||
: ColorsManager
|
||||
.btnColor,
|
||||
? Colors.grey
|
||||
: ColorsManager.btnColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
style: const TextStyle(
|
||||
color: Colors.black),
|
||||
),
|
||||
),
|
||||
style: const TextStyle(
|
||||
color: Colors.black),
|
||||
),
|
||||
),
|
||||
if (forgetBloc.forgetValidate != '') // Check if there is a validation message
|
||||
Padding(
|
||||
padding:
|
||||
if (forgetBloc.forgetValidate != '') // Check if there is a validation message
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
forgetBloc.forgetValidate,
|
||||
style: const TextStyle(
|
||||
color: ColorsManager.red,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w700),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
child: Text(
|
||||
forgetBloc.forgetValidate,
|
||||
style: const TextStyle(
|
||||
color: ColorsManager.red,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w700),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Password",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Password",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: TextFormField(
|
||||
validator: forgetBloc.passwordValidator,
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
controller: forgetBloc.forgetPasswordController,
|
||||
decoration: textBoxDecoration()!.copyWith(
|
||||
hintText: 'At least 8 characters',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
child: TextFormField(
|
||||
validator: forgetBloc.passwordValidator,
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
controller: forgetBloc.forgetPasswordController,
|
||||
decoration: textBoxDecoration()!.copyWith(
|
||||
hintText: 'At least 8 characters',
|
||||
hintStyle: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
style: const TextStyle(color: Colors.black),
|
||||
),
|
||||
),
|
||||
style: const TextStyle(color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
Row(
|
||||
crossAxisAlignment:
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: size.width * 0.2,
|
||||
child: DefaultButton(
|
||||
backgroundColor:
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: size.width * 0.2,
|
||||
child: DefaultButton(
|
||||
backgroundColor:
|
||||
ColorsManager.btnColor,
|
||||
child: const Text('Submit'),
|
||||
onPressed: () {
|
||||
if (forgetBloc
|
||||
.forgetFormKey.currentState!
|
||||
.validate()) {
|
||||
forgetBloc.add(ChangePasswordEvent());
|
||||
}
|
||||
},
|
||||
child: const Text('Submit'),
|
||||
onPressed: () {
|
||||
if (forgetBloc.forgetFormKey.currentState!.validate()) {
|
||||
forgetBloc.add(ChangePasswordEvent());
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
Center(
|
||||
child: SizedBox(
|
||||
child: Text(
|
||||
forgetBloc.validate,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: ColorsManager.red),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SizedBox(
|
||||
child: Center(
|
||||
child: Wrap(
|
||||
children: [
|
||||
const Text(
|
||||
"Do you have an account? ",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
forgetBloc.add(StopTimerEvent());
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text(
|
||||
"Sign in",
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
Center(
|
||||
child: SizedBox(
|
||||
child: Text(
|
||||
forgetBloc.validate,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: ColorsManager.red),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SizedBox(
|
||||
width: size.width * 0.2,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Flexible(
|
||||
child: Text(
|
||||
"Do you have an account? ",
|
||||
style: TextStyle(color: Colors.white),
|
||||
)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
forgetBloc.add(StopTimerEvent());
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Flexible(
|
||||
child: Text(
|
||||
"Sign in",
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Widget _buildDropdownField(
|
||||
BuildContext context, AuthBloc loginBloc, Size size) {
|
||||
final TextEditingController textEditingController = TextEditingController();
|
||||
@ -467,6 +470,7 @@ class ForgetPasswordWebPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
|
83
lib/pages/common/curtain_toggle.dart
Normal file
83
lib/pages/common/curtain_toggle.dart
Normal file
@ -0,0 +1,83 @@
|
||||
|
||||
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/bloc/living_room_bloc.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
|
||||
class CurtainToggle extends StatelessWidget {
|
||||
final bool value;
|
||||
final String code;
|
||||
final String deviceId;
|
||||
final String label;
|
||||
|
||||
const CurtainToggle({
|
||||
super.key,
|
||||
required this.value,
|
||||
required this.code,
|
||||
required this.deviceId,
|
||||
required this.label,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: ColorsManager.greyColor.withOpacity(0.2),
|
||||
border: Border.all(color: ColorsManager.boxDivider),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
child: SvgPicture.asset(
|
||||
Assets.curtainIcon,
|
||||
width: 60,
|
||||
height: 60,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
width: 35,
|
||||
child: CupertinoSwitch(
|
||||
value: value,
|
||||
activeColor: ColorsManager.dialogBlueTitle,
|
||||
onChanged: (newValue) {
|
||||
context.read<LivingRoomBloc>().add(
|
||||
LivingRoomControl(
|
||||
deviceId: deviceId,
|
||||
code: code,
|
||||
value: newValue,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -48,11 +48,11 @@ class _HourPickerDialogState extends State<HourPickerDialog> {
|
||||
value: _isPm,
|
||||
items: const [
|
||||
DropdownMenuItem(
|
||||
value: false,
|
||||
value: true,
|
||||
child: Text('AM'),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: true,
|
||||
value:false ,
|
||||
child: Text('PM'),
|
||||
),
|
||||
],
|
||||
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/ac/view/ac_device_control.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/ceiling_sensor/view/ceiling_sensor_controls.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/view/curtain_control.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/door_lock/view/door_lock_status_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/gateway/view/gateway_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/view/living_room_device_control.dart';
|
||||
@ -27,6 +28,10 @@ mixin RouteControlsBasedCode {
|
||||
return CeilingSensorControls(
|
||||
device: device,
|
||||
);
|
||||
case 'CUR':
|
||||
return CurtainControl(
|
||||
deviceId: device.uuid!,
|
||||
);
|
||||
case 'AC':
|
||||
return AcDeviceControl(device: device);
|
||||
default:
|
||||
|
@ -116,7 +116,7 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
||||
? const EdgeInsets.all(30)
|
||||
: const EdgeInsets.all(15),
|
||||
child: DynamicTable(
|
||||
withSelectAll: false,
|
||||
withSelectAll: true,
|
||||
cellDecoration: containerDecoration,
|
||||
onRowSelected: (index, isSelected, row) {
|
||||
final selectedDevice = devicesToShow[index];
|
||||
|
40
lib/pages/device_managment/curtain/bloc/curtain_bloc.dart
Normal file
40
lib/pages/device_managment/curtain/bloc/curtain_bloc.dart
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/bloc/curtain_event.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/bloc/curtain_state.dart';
|
||||
import 'package:syncrow_web/services/devices_mang_api.dart';
|
||||
|
||||
class CurtainBloc extends Bloc<CurtainEvent, CurtainState> {
|
||||
late bool deviceStatus;
|
||||
final String deviceId;
|
||||
|
||||
CurtainBloc({required this.deviceId}) : super(CurtainInitial()) {
|
||||
on<CurtainFetchDeviceStatus>(_onFetchDeviceStatus);
|
||||
}
|
||||
|
||||
FutureOr<void> _onFetchDeviceStatus(
|
||||
CurtainFetchDeviceStatus event, Emitter<CurtainState> emit) async {
|
||||
emit(CurtainStatusLoading());
|
||||
try {
|
||||
final status = await DevicesManagementApi().getDeviceStatus(event.deviceId);
|
||||
deviceStatus =checkStatus(status.status[0].value) ; // Assuming this is a Map<String, dynamic>
|
||||
emit(CurtainStatusLoaded(deviceStatus));
|
||||
} catch (e) {
|
||||
emit(CurtainError(e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
bool checkStatus(String command) {
|
||||
if (command.toLowerCase() == 'open') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
32
lib/pages/device_managment/curtain/bloc/curtain_event.dart
Normal file
32
lib/pages/device_managment/curtain/bloc/curtain_event.dart
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
sealed class CurtainEvent extends Equatable {
|
||||
const CurtainEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class CurtainFetchDeviceStatus extends CurtainEvent {
|
||||
final String deviceId;
|
||||
|
||||
const CurtainFetchDeviceStatus(this.deviceId);
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceId];
|
||||
}
|
||||
|
||||
class CurtainControl extends CurtainEvent {
|
||||
final String deviceId;
|
||||
final String code;
|
||||
final bool value;
|
||||
|
||||
const CurtainControl(
|
||||
{required this.deviceId, required this.code, required this.value});
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceId, code, value];
|
||||
}
|
41
lib/pages/device_managment/curtain/bloc/curtain_state.dart
Normal file
41
lib/pages/device_managment/curtain/bloc/curtain_state.dart
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/model/curtain_model.dart';
|
||||
|
||||
sealed class CurtainState extends Equatable {
|
||||
const CurtainState();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
final class CurtainInitial extends CurtainState {}
|
||||
|
||||
class CurtainStatusLoading extends CurtainState {}
|
||||
|
||||
class CurtainStatusLoaded extends CurtainState {
|
||||
final bool status;
|
||||
|
||||
const CurtainStatusLoaded(this.status);
|
||||
|
||||
@override
|
||||
List<Object> get props => [status];
|
||||
}
|
||||
|
||||
class CurtainError extends CurtainState {
|
||||
final String message;
|
||||
|
||||
const CurtainError(this.message);
|
||||
|
||||
@override
|
||||
List<Object> get props => [message];
|
||||
}
|
||||
|
||||
class CurtainControlError extends CurtainState {
|
||||
final String message;
|
||||
|
||||
const CurtainControlError(this.message);
|
||||
|
||||
@override
|
||||
List<Object> get props => [message];
|
||||
}
|
32
lib/pages/device_managment/curtain/model/curtain_model.dart
Normal file
32
lib/pages/device_managment/curtain/model/curtain_model.dart
Normal file
@ -0,0 +1,32 @@
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_status.dart';
|
||||
|
||||
class CurtainModel {
|
||||
final String productUuid;
|
||||
final String productType;
|
||||
final List<Status> status;
|
||||
|
||||
CurtainModel({
|
||||
required this.productUuid,
|
||||
required this.productType,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
factory CurtainModel.fromJson(dynamic json) {
|
||||
var statusList = json['status'] as List;
|
||||
List<Status> status = statusList.map((i) => Status.fromJson(i)).toList();
|
||||
|
||||
return CurtainModel(
|
||||
productUuid: json['productUuid'],
|
||||
productType: json['productType'],
|
||||
status: status,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'productUuid': productUuid,
|
||||
'productType': productType,
|
||||
'status': status.map((s) => s!.toJson()).toList(),
|
||||
};
|
||||
}
|
||||
}
|
72
lib/pages/device_managment/curtain/view/curtain_control.dart
Normal file
72
lib/pages/device_managment/curtain/view/curtain_control.dart
Normal file
@ -0,0 +1,72 @@
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/common/curtain_toggle.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/bloc/curtain_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/bloc/curtain_event.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/bloc/curtain_state.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/model/curtain_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/bloc/living_room_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/models/living_room_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/widgets/living_toggle_widget.dart';
|
||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||
|
||||
class CurtainControl extends StatelessWidget with HelperResponsiveLayout {
|
||||
final String deviceId;
|
||||
|
||||
const CurtainControl({super.key, required this.deviceId});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
create: (context) =>
|
||||
CurtainBloc(deviceId: deviceId)..add(CurtainFetchDeviceStatus(deviceId)),
|
||||
child: BlocBuilder<CurtainBloc, CurtainState>(
|
||||
builder: (context, state) {
|
||||
if (state is CurtainStatusLoading) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (state is CurtainStatusLoaded) {
|
||||
return _buildStatusControls(context, state.status);
|
||||
} else if (state is CurtainError || state is CurtainControlError) {
|
||||
return const Center(child: Text('Error fetching status'));
|
||||
} else {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatusControls(BuildContext context, bool status) {
|
||||
final isExtraLarge = isExtraLargeScreenSize(context);
|
||||
final isLarge = isLargeScreenSize(context);
|
||||
final isMedium = isMediumScreenSize(context);
|
||||
return Container(
|
||||
child: GridView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: isLarge || isExtraLarge
|
||||
? 3
|
||||
: isMedium
|
||||
? 2
|
||||
: 1,
|
||||
mainAxisExtent: 140,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
),
|
||||
children: [
|
||||
CurtainToggle(
|
||||
value: status,
|
||||
code: 'Curtains',
|
||||
deviceId: deviceId,
|
||||
label: 'Curtains',
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -35,40 +35,42 @@ class LivingRoomDeviceControl extends StatelessWidget with HelperResponsiveLayou
|
||||
final isExtraLarge = isExtraLargeScreenSize(context);
|
||||
final isLarge = isLargeScreenSize(context);
|
||||
final isMedium = isMediumScreenSize(context);
|
||||
return GridView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: isLarge || isExtraLarge
|
||||
? 3
|
||||
: isMedium
|
||||
? 2
|
||||
: 1,
|
||||
mainAxisExtent: 140,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
return Container(
|
||||
child: GridView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: isLarge || isExtraLarge
|
||||
? 3
|
||||
: isMedium
|
||||
? 2
|
||||
: 1,
|
||||
mainAxisExtent: 140,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
),
|
||||
children: [
|
||||
ToggleWidget(
|
||||
value: status.switch1,
|
||||
code: 'switch_1',
|
||||
deviceId: deviceId,
|
||||
label: 'Wall Light',
|
||||
),
|
||||
ToggleWidget(
|
||||
value: status.switch2,
|
||||
code: 'switch_2',
|
||||
deviceId: deviceId,
|
||||
label: 'Ceiling Light',
|
||||
),
|
||||
ToggleWidget(
|
||||
value: status.switch3,
|
||||
code: 'switch_3',
|
||||
deviceId: deviceId,
|
||||
label: 'Spotlight',
|
||||
),
|
||||
],
|
||||
),
|
||||
children: [
|
||||
ToggleWidget(
|
||||
value: status.switch1,
|
||||
code: 'switch_1',
|
||||
deviceId: deviceId,
|
||||
label: 'Wall Light',
|
||||
),
|
||||
ToggleWidget(
|
||||
value: status.switch2,
|
||||
code: 'switch_2',
|
||||
deviceId: deviceId,
|
||||
label: 'Ceiling Light',
|
||||
),
|
||||
ToggleWidget(
|
||||
value: status.switch3,
|
||||
code: 'switch_3',
|
||||
deviceId: deviceId,
|
||||
label: 'Spotlight',
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -29,40 +29,13 @@ class AuthenticationAPI {
|
||||
}
|
||||
|
||||
static Future<int?> sendOtp({required String email, required String regionUuid}) async {
|
||||
try {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOtp,
|
||||
body: {"email": email, "type": "PASSWORD", "regionUuid": regionUuid},
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
return json['data']['cooldown'];
|
||||
});
|
||||
return response;
|
||||
} on DioException catch (e) {
|
||||
final errorData = e.response!.data;
|
||||
String errorMessage = errorData['message'];
|
||||
print('sendOtp=$errorMessage');
|
||||
if (e.response != null) {
|
||||
if (e.response!.statusCode == 400) {
|
||||
final errorData = e.response!.data;
|
||||
String errorMessage = errorData['message'];
|
||||
print('sendOtp=$errorMessage');
|
||||
|
||||
if (errorMessage == 'User not found') {
|
||||
return 1;
|
||||
} else {
|
||||
int cooldown = errorData['data']['cooldown'] ?? 1;
|
||||
return cooldown;
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
} catch (e) {
|
||||
return 1;
|
||||
}
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOtp,
|
||||
body: {"email": email, "type": "PASSWORD", "regionUuid": regionUuid},
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
return json['data']['cooldown'];
|
||||
});
|
||||
}
|
||||
|
||||
static Future verifyOtp({required String email, required String otpCode}) async {
|
||||
|
@ -33,6 +33,7 @@ class DevicesManagementApi {
|
||||
path: ApiEndpoints.getDeviceStatus.replaceAll('{uuid}', uuid),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
print('getDeviceStatus$json');
|
||||
return DeviceStatus.fromJson(json);
|
||||
},
|
||||
);
|
||||
|
@ -124,4 +124,5 @@ class Assets {
|
||||
static const String office = 'assets/icons/office.svg';
|
||||
static const String parlour = 'assets/icons/parlour.svg';
|
||||
static const String grid = "assets/images/grid.svg";
|
||||
static const String curtainIcon = "assets/images/curtain.svg";
|
||||
}
|
||||
|
Reference in New Issue
Block a user