Compare commits
28 Commits
f3674ba06f
...
8ae81d2b24
| Author | SHA1 | Date |
|---|---|---|
|
|
8ae81d2b24 | 2 months ago |
|
|
11de01e079 | 2 months ago |
|
|
62bb667cb8 | 2 months ago |
|
|
58b1e3a386 | 2 months ago |
|
|
6c1707128b | 2 months ago |
|
|
3601e39a29 | 2 months ago |
|
|
e0606ceb65 | 2 months ago |
|
|
6ceee6973f | 2 months ago |
|
|
68a34369ee | 2 months ago |
|
|
873b2a1591 | 2 months ago |
|
|
37574412a5 | 2 months ago |
|
|
b353de3cf8 | 2 months ago |
|
|
dcdd17f0e9 | 2 months ago |
|
|
8b90a84adf | 2 months ago |
|
|
54f8391066 | 2 months ago |
|
|
135b05e561 | 2 months ago |
|
|
510d82b592 | 2 months ago |
|
|
e1a021129b | 2 months ago |
|
|
366429f083 | 2 months ago |
|
|
3cc2610d30 | 2 months ago |
|
|
f886357bcd | 2 months ago |
|
|
40638cfec4 | 2 months ago |
|
|
5581346a2d | 3 months ago |
|
|
b8ecb70aa2 | 3 months ago |
|
|
15f5eaf8e5 | 3 months ago |
|
|
87fd9a42b7 | 3 months ago |
|
|
d28c94606b | 3 months ago |
|
|
68e1b116f9 | 3 months ago |
@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32.381" height="37.391" viewBox="0 0 32.381 37.391">
|
||||
<g id="affiliate-marketing_1_" data-name="affiliate-marketing (1)" transform="translate(-34.298 0)">
|
||||
<path id="Path_4982" data-name="Path 4982" d="M63.419,23.145l.415,1.991-2.684-1.55a11.718,11.718,0,0,0,0-9.782l2.684-1.55-.415,1.991,2.145.447,1.115-5.345L61.492,7.641l-.685,2.081,1.932.636-2.687,1.551a11.736,11.736,0,0,0-8.469-4.893v-3.1L53.1,5.272l1.46-1.634L50.489,0,46.417,3.639l1.46,1.634,1.517-1.355v3.1a11.736,11.736,0,0,0-8.469,4.893l-2.687-1.551,1.932-.636-.685-2.081L34.3,9.348l1.115,5.346,2.145-.447-.415-1.991,2.684,1.55a11.718,11.718,0,0,0,0,9.782l-2.684,1.55.415-1.991L35.413,22.7,34.3,28.043l5.187,1.707.685-2.081-1.932-.636,2.687-1.551a11.736,11.736,0,0,0,8.469,4.893v3.1l-1.517-1.355-1.46,1.634,4.072,3.639,4.072-3.639L53.1,32.118l-1.517,1.355v-3.1a11.736,11.736,0,0,0,8.469-4.893l2.687,1.551-1.932.636.685,2.081,5.187-1.707L65.564,22.7Z" fill="#2e303a"/>
|
||||
<g id="user_24_" data-name="user (24)" transform="translate(42.096 9.104)">
|
||||
<path id="Path_4983" data-name="Path 4983" d="M10.267,8.536a3.028,3.028,0,0,0,1.792.581,3.125,3.125,0,0,0,3.059-3.059,3.059,3.059,0,1,0-4.85,2.478Z" transform="translate(-3.378 0)" fill="#fff"/>
|
||||
<path id="Path_4984" data-name="Path 4984" d="M11.372,16.55a3.919,3.919,0,0,1-5.384,0,5.689,5.689,0,0,0-2.989,5,.438.438,0,0,0,.437.437H13.924a.438.438,0,0,0,.437-.437A5.689,5.689,0,0,0,11.372,16.55Z" transform="translate(0 -7.629)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,7 @@
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.462872 10.1666C0.228367 10.108 0.111115 10.0787 0.0468218 9.98619C-0.0174712 9.8937 -0.00458142 9.77798 0.0211982 9.54656C0.619456 4.17595 5.17435 0 10.7046 0C16.2349 0 20.7898 4.176 21.388 9.54665C21.4138 9.77807 21.4267 9.89379 21.3624 9.98628C21.2981 10.0788 21.1808 10.1081 20.9463 10.1667L16.5365 11.2692C16.3156 11.3244 16.2052 11.352 16.1187 11.3202C16.0321 11.2885 15.9488 11.1726 15.7824 10.9408C15.5865 10.6681 15.3355 10.4575 15.0448 10.3067C14.5775 10.0644 14.0546 10.0002 13.5871 10.0002H7.82242C7.35432 10.0002 6.83087 10.0645 6.3633 10.3073C6.07298 10.458 5.82232 10.6685 5.62668 10.9408C5.46023 11.1725 5.37701 11.2884 5.29044 11.3201C5.20386 11.3519 5.09347 11.3243 4.87268 11.2691L0.462872 10.1666ZM5.67426 7.21967C6.13506 6.75887 6.76003 6.5 7.4117 6.5H8.70459C9.1188 6.5 9.45459 6.83579 9.45459 7.25C9.45459 7.66421 9.1188 8 8.70459 8H7.4117C7.15786 8 6.91441 8.10084 6.73492 8.28033C6.44203 8.57322 5.96715 8.57322 5.67426 8.28033C5.38137 7.98744 5.38137 7.51256 5.67426 7.21967ZM11.9546 7.25C11.9546 6.83579 12.2904 6.5 12.7046 6.5H13.9975C14.6491 6.5 15.2741 6.75887 15.7349 7.21967C16.0278 7.51256 16.0278 7.98744 15.7349 8.28033C15.442 8.57322 14.9672 8.57322 14.6743 8.28033C14.4948 8.10084 14.2513 8 13.9975 8H12.7046C12.2904 8 11.9546 7.66421 11.9546 7.25Z" fill="white"/>
|
||||
<path d="M0.0837141 12.4212C0.0267055 12.0559 -0.00179879 11.8733 0.117089 11.7647C0.235976 11.6561 0.422465 11.7027 0.795442 11.7959L4.52364 12.728C4.76706 12.7888 4.88877 12.8193 4.95293 12.9082C5.01708 12.9972 5.00713 13.1275 4.98722 13.3883C4.9545 13.8168 4.94652 14.2577 4.96329 14.6923C4.97667 15.0388 4.98336 15.2121 4.88525 15.3055C4.78714 15.399 4.62125 15.3844 4.28947 15.3554L1.20555 15.0852C1.031 15.0699 0.943724 15.0622 0.875524 15.0115C0.807325 14.9608 0.776105 14.8824 0.713667 14.7256C0.422134 13.9936 0.208718 13.222 0.0837141 12.4212Z" fill="white"/>
|
||||
<path d="M2.94493 16.749C2.40172 16.7002 2.13012 16.6758 2.03715 16.8534C1.94417 17.0309 2.11204 17.232 2.44777 17.6343C4.4197 19.9968 7.3866 21.5 10.7046 21.5C14.0226 21.5 16.9895 19.9968 18.9614 17.6343C19.2971 17.2321 19.465 17.031 19.372 16.8534C19.279 16.6759 19.0074 16.7002 18.4642 16.749L16.4748 16.9275C16.2986 16.9434 16.2105 16.9513 16.1473 16.993C16.0842 17.0348 16.033 17.1302 15.9308 17.3211C15.7212 17.7122 15.4152 18.0015 15.0448 18.1936C14.5775 18.436 14.0546 18.5002 13.5871 18.5002H7.82241C7.35508 18.5002 6.83229 18.436 6.36514 18.1938C5.99468 18.0017 5.68855 17.7124 5.47892 17.3211C5.37667 17.1303 5.32555 17.0349 5.26236 16.9931C5.19916 16.9513 5.11106 16.9434 4.93485 16.9276L2.94493 16.749Z" fill="white"/>
|
||||
<path d="M20.6955 14.7257C20.6331 14.8824 20.6018 14.9608 20.5336 15.0115C20.4654 15.0623 20.3782 15.0699 20.2036 15.0852L17.1201 15.3554C16.7883 15.3844 16.6225 15.399 16.5244 15.3055C16.4263 15.2121 16.4329 15.0388 16.4463 14.6923C16.463 14.2578 16.455 13.8169 16.4222 13.3884C16.4023 13.1276 16.3923 12.9972 16.4564 12.9083C16.5206 12.8193 16.6423 12.7889 16.8858 12.728L20.6137 11.796C20.9867 11.7028 21.1732 11.6562 21.2921 11.7648C21.411 11.8734 21.3825 12.056 21.3255 12.4213C21.2004 13.2221 20.987 13.9937 20.6955 14.7257Z" fill="white"/>
|
||||
<path d="M6.73398 12.051C6.80458 11.8189 6.91733 11.7098 7.05454 11.6385C7.22042 11.5524 7.47075 11.5002 7.82242 11.5002H13.5871C13.9382 11.5002 14.1884 11.5523 14.3542 11.6383C14.4914 11.7095 14.604 11.8184 14.6746 12.0497C15.0482 13.274 15.0482 15.2264 14.6746 16.4506C14.604 16.6819 14.4914 16.7909 14.3542 16.8621C14.1884 16.9481 13.9382 17.0002 13.5871 17.0002H7.82241C7.47147 17.0002 7.22139 16.9481 7.05557 16.8621C6.91833 16.791 6.80577 16.6821 6.73521 16.451C6.36164 15.2274 6.36134 13.2759 6.73398 12.051Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1 @@
|
||||
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
||||
|
After Width: | Height: | Size: 391 B |
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="30.776" height="24.337" viewBox="0 0 30.776 24.337">
|
||||
<g id="folder" transform="translate(0 -42.679)">
|
||||
<g id="Group_8637" data-name="Group 8637" transform="translate(0 45.895)">
|
||||
<g id="Group_8636" data-name="Group 8636" transform="translate(0 0)">
|
||||
<path id="Path_5021" data-name="Path 5021" d="M25.043,88.08H13.94l-2.209-2.625a.377.377,0,0,0-.3-.136H2.471A2.489,2.489,0,0,0,0,87.808v16.145a2.489,2.489,0,0,0,2.486,2.486H25.043a2.489,2.489,0,0,0,2.486-2.486V90.566A2.489,2.489,0,0,0,25.043,88.08Z" transform="translate(0 -85.319)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Group_8639" data-name="Group 8639" transform="translate(3.274 42.679)">
|
||||
<g id="Group_8638" data-name="Group 8638" transform="translate(0 0)">
|
||||
<path id="Path_5022" data-name="Path 5022" d="M68.431,45.44H57.324l-2.209-2.625a.377.377,0,0,0-.3-.136H45.859A2.486,2.486,0,0,0,43.4,44.827h8.168a1.445,1.445,0,0,1,1.11.516l1.886,2.242H65.169a3.56,3.56,0,0,1,3.554,3.554V63.775A2.486,2.486,0,0,0,70.9,61.31V47.923A2.489,2.489,0,0,0,68.431,45.44Z" transform="translate(-43.4 -42.679)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="30.996" height="28.414" viewBox="0 0 30.996 28.414">
|
||||
<g id="image-gallery" transform="translate(-0.001 -2)">
|
||||
<g id="Group_8635" data-name="Group 8635" transform="translate(0.001 5.875)">
|
||||
<g id="Group_8634" data-name="Group 8634" transform="translate(0 5.078)">
|
||||
<path id="Path_5018" data-name="Path 5018" d="M8.072,22.581A4.836,4.836,0,0,1,3.5,19.286l-.045-.149a4.711,4.711,0,0,1-.223-1.4V8.932L.1,19.391a2.933,2.933,0,0,0,2.056,3.558L22.123,28.3a2.962,2.962,0,0,0,.744.1,2.88,2.88,0,0,0,2.791-2.112l1.164-3.7Z" transform="translate(-0.001 -8.932)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
<path id="Path_5019" data-name="Path 5019" d="M9.583,10.166A2.583,2.583,0,1,0,7,7.583,2.586,2.586,0,0,0,9.583,10.166Z" transform="translate(2.04 -5)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
<path id="Path_5020" data-name="Path 5020" d="M26.6,2H7.229A3.233,3.233,0,0,0,4,5.229V19.436a3.233,3.233,0,0,0,3.229,3.229H26.6a3.233,3.233,0,0,0,3.229-3.229V5.229A3.233,3.233,0,0,0,26.6,2ZM7.229,4.583H26.6a.646.646,0,0,1,.646.646V14.4l-4.08-4.761a2.313,2.313,0,0,0-1.732-.794,2.258,2.258,0,0,0-1.726.815l-4.8,5.758-1.563-1.559a2.267,2.267,0,0,0-3.2,0L6.583,17.42V5.229a.646.646,0,0,1,.646-.646Z" transform="translate(1.166)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="31.908" height="29.134" viewBox="0 0 31.908 29.134">
|
||||
<g id="Group_8579" data-name="Group 8579" transform="translate(0 -100)">
|
||||
<path id="Path_4556" data-name="Path 4556" d="M88.972,88.108h-4.4l-2.539-2.775H72.324v4.162H68.162v4.162H64V107.53a2.783,2.783,0,0,0,2.775,2.775h22.2a2.783,2.783,0,0,0,2.775-2.775V90.882A2.783,2.783,0,0,0,88.972,88.108Zm-11.1,18.035a6.937,6.937,0,1,1,6.937-6.937A6.939,6.939,0,0,1,77.873,106.143Z" transform="translate(-59.838 18.829)" fill="#2bb8a6"/>
|
||||
<path id="Path_4557" data-name="Path 4557" d="M4.162,32.432H6.937V28.27H11.1V25.495H6.937V21.333H4.162v4.162H0V28.27H4.162Z" transform="translate(0 78.667)" fill="#2bb8a6"/>
|
||||
<path id="Path_4558" data-name="Path 4558" d="M213.505,230.4a4.435,4.435,0,0,0-4.439,4.439h0a4.439,4.439,0,1,0,4.439-4.439Z" transform="translate(-195.47 -116.804)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 910 B |
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
|
||||
<path id="Path_4586" data-name="Path 4586" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0ZM9.5,17.8A3.555,3.555,0,0,1,11.2,14.777L8.75,12.793a1.187,1.187,0,1,1,1.491-1.847l5.052,4.088A3.561,3.561,0,1,1,9.5,17.8Zm16.29,12.688a1.188,1.188,0,0,1-1.678.04,7.42,7.42,0,0,0-10.234,0,1.187,1.187,0,1,1-1.636-1.721,9.787,9.787,0,0,1,13.5,0A1.187,1.187,0,0,1,25.785,30.492Zm3.447-17.7-2.455,1.985a3.549,3.549,0,1,1-4.09.256l5.054-4.088a1.187,1.187,0,1,1,1.491,1.847Z" fill="#EFEFF0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 614 B |
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
|
||||
<path id="Path_4587" data-name="Path 4587" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0ZM9.5,14.243a2.374,2.374,0,1,1,2.374,2.374A2.378,2.378,0,0,1,9.5,14.243ZM27.383,28.895a1.192,1.192,0,0,1-1.681,0,9.72,9.72,0,0,0-13.429,0,1.187,1.187,0,0,1-1.678-1.678,11.869,11.869,0,0,1,16.788,0A1.188,1.188,0,0,1,27.383,28.895Zm-1.27-12.278a2.374,2.374,0,1,1,2.374-2.374A2.378,2.378,0,0,1,26.113,16.617Z" fill="#EFEFF0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 551 B |
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
|
||||
<path id="Path_4588" data-name="Path 4588" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0ZM9.5,14.243a2.374,2.374,0,1,1,2.374,2.374A2.378,2.378,0,0,1,9.5,14.243Zm15.43,14.243H13.056a1.187,1.187,0,1,1,0-2.374H24.926a1.187,1.187,0,1,1,0,2.374Zm1.187-11.869a2.374,2.374,0,1,1,2.374-2.374A2.378,2.378,0,0,1,26.113,16.617Z" fill="#EFEFF0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 474 B |
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="37.981" height="37.982" viewBox="0 0 37.981 37.982">
|
||||
<path id="Path_4589" data-name="Path 4589" d="M18.991,0A18.991,18.991,0,1,0,37.981,18.991,19.013,19.013,0,0,0,18.991,0ZM8.308,14.243A3.561,3.561,0,1,1,11.869,17.8,3.565,3.565,0,0,1,8.308,14.243ZM27.382,27.382a11.866,11.866,0,0,1-16.785,0A1.187,1.187,0,0,1,12.275,25.7a9.72,9.72,0,0,0,13.429,0,1.187,1.187,0,0,1,1.678,1.678ZM26.112,17.8a3.561,3.561,0,1,1,3.561-3.561A3.565,3.565,0,0,1,26.112,17.8Z" fill="#EFEFF0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 524 B |
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
|
||||
<path id="Path_4590" data-name="Path 4590" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0Zm7.122,11.869a2.374,2.374,0,1,1-2.374,2.374A2.378,2.378,0,0,1,26.113,11.869Zm-14.243,0A2.374,2.374,0,1,1,9.5,14.243,2.378,2.378,0,0,1,11.869,11.869Zm7.122,21.365a14.275,14.275,0,0,1-13.7-10.36,1.188,1.188,0,0,1,1.142-1.51H31.549a1.183,1.183,0,0,1,.945.47,1.2,1.2,0,0,1,.2,1.04A14.275,14.275,0,0,1,18.991,33.234Z" fill="#EFEFF0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 558 B |
@ -0,0 +1,33 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class CovidQuestionnaireModel {
|
||||
int? id;
|
||||
String? questionEn;
|
||||
String? questionAr;
|
||||
int? ans;
|
||||
|
||||
CovidQuestionnaireModel({
|
||||
this.id,
|
||||
this.questionEn,
|
||||
this.questionAr,
|
||||
this.ans,
|
||||
});
|
||||
|
||||
factory CovidQuestionnaireModel.fromRawJson(String str) => CovidQuestionnaireModel.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory CovidQuestionnaireModel.fromJson(Map<String, dynamic> json) => CovidQuestionnaireModel(
|
||||
id: json["id"],
|
||||
questionEn: json["questionEN"],
|
||||
questionAr: json["questionAR"],
|
||||
ans: json["ans"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"questionEN": questionEn,
|
||||
"questionAR": questionAr,
|
||||
"ans": ans,
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,183 @@
|
||||
|
||||
|
||||
class QrParkingResponseModel {
|
||||
dynamic totalRecords;
|
||||
dynamic nRowID;
|
||||
int? qRParkingID;
|
||||
String? description;
|
||||
String? descriptionN;
|
||||
dynamic qRCompare;
|
||||
dynamic qRValue;
|
||||
String? imagePath;
|
||||
bool? isActive;
|
||||
int? parkingID;
|
||||
int? branchID;
|
||||
int? companyID;
|
||||
int? buildingID;
|
||||
int? rowID;
|
||||
int? gateID;
|
||||
int? floorID;
|
||||
dynamic imagePath1;
|
||||
int? createdBy;
|
||||
String? createdOn;
|
||||
dynamic editedBy;
|
||||
dynamic editedOn;
|
||||
String? parkingDescription;
|
||||
String? parkingDescriptionN;
|
||||
String? gateDescription;
|
||||
String? gateDescriptionN;
|
||||
String? branchDescription;
|
||||
String? branchDescriptionN;
|
||||
String? companyDescription;
|
||||
String? companyDescriptionN;
|
||||
String? rowDescription;
|
||||
String? rowDescriptionN;
|
||||
String? floorDescription;
|
||||
String? floorDescriptionN;
|
||||
String? buildingDescription;
|
||||
String? buildingDescriptionN;
|
||||
String? qRParkingCode;
|
||||
String? parkingCode;
|
||||
double? latitude;
|
||||
double? longitude;
|
||||
String? qRImageStr;
|
||||
|
||||
QrParkingResponseModel({
|
||||
this.totalRecords,
|
||||
this.nRowID,
|
||||
this.qRParkingID,
|
||||
this.description,
|
||||
this.descriptionN,
|
||||
this.qRCompare,
|
||||
this.qRValue,
|
||||
this.imagePath,
|
||||
this.isActive,
|
||||
this.parkingID,
|
||||
this.branchID,
|
||||
this.companyID,
|
||||
this.buildingID,
|
||||
this.rowID,
|
||||
this.gateID,
|
||||
this.floorID,
|
||||
this.imagePath1,
|
||||
this.createdBy,
|
||||
this.createdOn,
|
||||
this.editedBy,
|
||||
this.editedOn,
|
||||
this.parkingDescription,
|
||||
this.parkingDescriptionN,
|
||||
this.gateDescription,
|
||||
this.gateDescriptionN,
|
||||
this.branchDescription,
|
||||
this.branchDescriptionN,
|
||||
this.companyDescription,
|
||||
this.companyDescriptionN,
|
||||
this.rowDescription,
|
||||
this.rowDescriptionN,
|
||||
this.floorDescription,
|
||||
this.floorDescriptionN,
|
||||
this.buildingDescription,
|
||||
this.buildingDescriptionN,
|
||||
this.qRParkingCode,
|
||||
this.parkingCode,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.qRImageStr,
|
||||
});
|
||||
|
||||
QrParkingResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
totalRecords = json['TotalRecords'];
|
||||
nRowID = json['nRowID'];
|
||||
qRParkingID = json['QRParkingID'];
|
||||
description = json['Description'];
|
||||
descriptionN = json['DescriptionN'];
|
||||
qRCompare = json['QRCompare'];
|
||||
qRValue = json['QRValue'];
|
||||
imagePath = json['ImagePath'];
|
||||
isActive = json['IsActive'];
|
||||
parkingID = json['ParkingID'];
|
||||
branchID = json['BranchID'];
|
||||
companyID = json['CompanyID'];
|
||||
buildingID = json['BuildingID'];
|
||||
rowID = json['RowID'];
|
||||
gateID = json['GateID'];
|
||||
floorID = json['FloorID'];
|
||||
imagePath1 = json['ImagePath1'];
|
||||
createdBy = json['CreatedBy'];
|
||||
createdOn = json['CreatedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
editedOn = json['EditedOn'];
|
||||
parkingDescription = json['ParkingDescription'];
|
||||
parkingDescriptionN = json['ParkingDescriptionN'];
|
||||
gateDescription = json['GateDescription'];
|
||||
gateDescriptionN = json['GateDescriptionN'];
|
||||
branchDescription = json['BranchDescription'];
|
||||
branchDescriptionN = json['BranchDescriptionN'];
|
||||
companyDescription = json['CompanyDescription'];
|
||||
companyDescriptionN = json['CompanyDescriptionN'];
|
||||
rowDescription = json['RowDescription'];
|
||||
rowDescriptionN = json['RowDescriptionN'];
|
||||
floorDescription = json['FloorDescription'];
|
||||
floorDescriptionN = json['FloorDescriptionN'];
|
||||
buildingDescription = json['BuildingDescription'];
|
||||
buildingDescriptionN = json['BuildingDescriptionN'];
|
||||
qRParkingCode = json['QRParkingCode'];
|
||||
parkingCode = json['ParkingCode'];
|
||||
latitude = _toDouble(json['Latitude']);
|
||||
longitude = _toDouble(json['Longitude']);
|
||||
qRImageStr = json['QRImageStr'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['TotalRecords'] = totalRecords;
|
||||
data['nRowID'] = nRowID;
|
||||
data['QRParkingID'] = qRParkingID;
|
||||
data['Description'] = description;
|
||||
data['DescriptionN'] = descriptionN;
|
||||
data['QRCompare'] = qRCompare;
|
||||
data['QRValue'] = qRValue;
|
||||
data['ImagePath'] = imagePath;
|
||||
data['IsActive'] = isActive;
|
||||
data['ParkingID'] = parkingID;
|
||||
data['BranchID'] = branchID;
|
||||
data['CompanyID'] = companyID;
|
||||
data['BuildingID'] = buildingID;
|
||||
data['RowID'] = rowID;
|
||||
data['GateID'] = gateID;
|
||||
data['FloorID'] = floorID;
|
||||
data['ImagePath1'] = imagePath1;
|
||||
data['CreatedBy'] = createdBy;
|
||||
data['CreatedOn'] = createdOn;
|
||||
data['EditedBy'] = editedBy;
|
||||
data['EditedOn'] = editedOn;
|
||||
data['ParkingDescription'] = parkingDescription;
|
||||
data['ParkingDescriptionN'] = parkingDescriptionN;
|
||||
data['GateDescription'] = gateDescription;
|
||||
data['GateDescriptionN'] = gateDescriptionN;
|
||||
data['BranchDescription'] = branchDescription;
|
||||
data['BranchDescriptionN'] = branchDescriptionN;
|
||||
data['CompanyDescription'] = companyDescription;
|
||||
data['CompanyDescriptionN'] = companyDescriptionN;
|
||||
data['RowDescription'] = rowDescription;
|
||||
data['RowDescriptionN'] = rowDescriptionN;
|
||||
data['FloorDescription'] = floorDescription;
|
||||
data['FloorDescriptionN'] = floorDescriptionN;
|
||||
data['BuildingDescription'] = buildingDescription;
|
||||
data['BuildingDescriptionN'] = buildingDescriptionN;
|
||||
data['QRParkingCode'] = qRParkingCode;
|
||||
data['ParkingCode'] = parkingCode;
|
||||
data['Latitude'] = latitude;
|
||||
data['Longitude'] = longitude;
|
||||
data['QRImageStr'] = qRImageStr;
|
||||
return data;
|
||||
}
|
||||
|
||||
static double? _toDouble(dynamic v) {
|
||||
if (v == null) return null;
|
||||
if (v is double) return v;
|
||||
if (v is int) return v.toDouble();
|
||||
return double.tryParse(v.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:hmg_patient_app_new/features/qr_parking/models/qr_parking_response_model.dart';
|
||||
import '../../core/api/api_client.dart';
|
||||
import '../../core/api_consts.dart';
|
||||
import '../../core/common_models/generic_api_model.dart';
|
||||
import '../../core/exceptions/api_failure.dart';
|
||||
import '../../services/logger_service.dart';
|
||||
|
||||
|
||||
abstract class QrParkingRepo {
|
||||
Future<Either<Failure, GenericApiModel<List<QrParkingResponseModel>>>>
|
||||
getQrParking({
|
||||
required int qrParkingId,
|
||||
});
|
||||
}
|
||||
|
||||
class QrParkingRepoImp implements QrParkingRepo {
|
||||
final ApiClient apiClient;
|
||||
final LoggerService loggerService;
|
||||
|
||||
QrParkingRepoImp({
|
||||
required this.loggerService,
|
||||
required this.apiClient,
|
||||
});
|
||||
|
||||
@override
|
||||
Future<Either<Failure, GenericApiModel<List<QrParkingResponseModel>>>>
|
||||
getQrParking({required int qrParkingId}) async {
|
||||
try {
|
||||
GenericApiModel<List<QrParkingResponseModel>>? apiResponse;
|
||||
Failure? failure;
|
||||
|
||||
await apiClient.post(
|
||||
ApiConsts.getQrParkingDetails, // GetQRParkingByID
|
||||
body: {'QRParkingID': qrParkingId},
|
||||
onFailure: (error, statusCode,
|
||||
{messageStatus, failureType}) {
|
||||
failure = failureType ??
|
||||
StatusCodeFailure("$error ($statusCode)");
|
||||
},
|
||||
onSuccess: (response, statusCode,
|
||||
{messageStatus, errorMessage}) {
|
||||
final list =
|
||||
(response['List_SWP_QRParkingModel'] as List?) ?? [];
|
||||
|
||||
final res = list
|
||||
.map((e) => QrParkingResponseModel.fromJson(
|
||||
Map<String, dynamic>.from(e),
|
||||
))
|
||||
.toList();
|
||||
|
||||
apiResponse = GenericApiModel<List<QrParkingResponseModel>>(
|
||||
messageStatus: messageStatus,
|
||||
statusCode: statusCode,
|
||||
errorMessage: null,
|
||||
data: res,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (failure != null) return Left(failure!);
|
||||
if (apiResponse == null) {
|
||||
return Left(ServerFailure("Unknown error"));
|
||||
}
|
||||
|
||||
return Right(apiResponse!);
|
||||
} catch (e) {
|
||||
return Left(UnknownFailure(e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,144 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||
import 'package:hmg_patient_app_new/features/qr_parking/qr_parking_repo.dart';
|
||||
|
||||
import '../../services/cache_service.dart';
|
||||
import '../../services/error_handler_service.dart';
|
||||
import 'models/qr_parking_response_model.dart';
|
||||
|
||||
|
||||
class QrParkingViewModel extends ChangeNotifier {
|
||||
final QrParkingRepo qrParkingRepo;
|
||||
final ErrorHandlerService errorHandlerService;
|
||||
final CacheService cacheService;
|
||||
String IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
|
||||
|
||||
bool isLoading = false;
|
||||
String? error;
|
||||
|
||||
bool isSavePark = false;
|
||||
QrParkingResponseModel? qrParkingModel;
|
||||
List<QrParkingResponseModel> qrParkingList = [];
|
||||
|
||||
QrParkingViewModel({
|
||||
required this.qrParkingRepo,
|
||||
required this.errorHandlerService,
|
||||
required this.cacheService,
|
||||
});
|
||||
|
||||
|
||||
Future<QrParkingResponseModel?> scanAndGetParking() async {
|
||||
try {
|
||||
error = null;
|
||||
isLoading = true;
|
||||
notifyListeners();
|
||||
|
||||
final result = await BarcodeScanner.scan();
|
||||
|
||||
if (result.type != ResultType.Barcode) {
|
||||
isLoading = false;
|
||||
notifyListeners();
|
||||
return null;
|
||||
}
|
||||
|
||||
final raw = result.rawContent.trim();
|
||||
if (raw.isEmpty) {
|
||||
error = "Invalid QR Code";
|
||||
isLoading = false;
|
||||
notifyListeners();
|
||||
return null;
|
||||
}
|
||||
|
||||
final qrParkingId = _extractQrParkingId(raw);
|
||||
if (qrParkingId == null) {
|
||||
error = "Invalid QR Code";
|
||||
isLoading = false;
|
||||
notifyListeners();
|
||||
return null;
|
||||
}
|
||||
|
||||
final apiResult =
|
||||
await qrParkingRepo.getQrParking(qrParkingId: qrParkingId);
|
||||
|
||||
final model = apiResult.fold(
|
||||
(failure) {
|
||||
errorHandlerService.handleError(failure: failure);
|
||||
error = failure.toString();
|
||||
return null;
|
||||
},
|
||||
(apiResponse) {
|
||||
qrParkingList = apiResponse.data ?? [];
|
||||
if (qrParkingList.isNotEmpty) {
|
||||
return qrParkingList.first;
|
||||
}
|
||||
error = "Invalid Qr Code";
|
||||
return null;
|
||||
},
|
||||
);
|
||||
|
||||
if (model != null) {
|
||||
qrParkingModel = model;
|
||||
isSavePark = true;
|
||||
|
||||
await cacheService.saveObject(
|
||||
key: IS_GO_TO_PARKING,
|
||||
value: model.toJson(),
|
||||
);
|
||||
}
|
||||
|
||||
isLoading = false;
|
||||
notifyListeners();
|
||||
return model;
|
||||
} catch (e) {
|
||||
error = "Scan error";
|
||||
isLoading = false;
|
||||
notifyListeners();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Load saved parking
|
||||
Future<void> getIsSaveParking() async {
|
||||
isLoading = true;
|
||||
notifyListeners();
|
||||
|
||||
final parking =
|
||||
await cacheService.getObject(key: IS_GO_TO_PARKING);
|
||||
|
||||
if (parking != null) {
|
||||
isSavePark = true;
|
||||
qrParkingModel = QrParkingResponseModel.fromJson(
|
||||
Map<String, dynamic>.from(parking),
|
||||
);
|
||||
} else {
|
||||
isSavePark = false;
|
||||
qrParkingModel = null;
|
||||
}
|
||||
|
||||
isLoading = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
/// Reset parking
|
||||
Future<void> clearParking() async {
|
||||
await cacheService.remove(key: IS_GO_TO_PARKING);
|
||||
isSavePark = false;
|
||||
qrParkingModel = null;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
int? _extractQrParkingId(String raw) {
|
||||
try {
|
||||
if (raw.startsWith("{")) {
|
||||
final data = jsonDecode(raw);
|
||||
return int.tryParse(data['QRParkingID'].toString());
|
||||
}
|
||||
return int.tryParse(raw);
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,283 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'covid_19_questionnaire.dart';
|
||||
|
||||
class Covid19LandingPage extends StatefulWidget {
|
||||
const Covid19LandingPage({super.key});
|
||||
|
||||
@override
|
||||
State<Covid19LandingPage> createState() => _Covid19LandingPageState();
|
||||
}
|
||||
|
||||
class _Covid19LandingPageState extends State<Covid19LandingPage> {
|
||||
|
||||
late HabibWalletViewModel habibWalletVM;
|
||||
int? _selectedBranchIndex;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
habibWalletVM = Provider.of<HabibWalletViewModel>(context, listen: false);
|
||||
scheduleMicrotask(() {
|
||||
getProjectList();
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.bgScaffoldColor,
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CollapsingListView(
|
||||
title: "COVID-19",
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(24.w),
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(20.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Get the results in Few Hours"
|
||||
.toText18(
|
||||
color: AppColors.textColor,
|
||||
weight: FontWeight.w600,
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
LocaleKeys.covid_info
|
||||
.tr()
|
||||
.toText14(
|
||||
color: AppColors.greyTextColor,
|
||||
weight: FontWeight.w400,
|
||||
height: 1.6,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
// borderRadius: 24.r,
|
||||
hasShadow: true,
|
||||
customBorder: BorderRadius.only(topLeft:Radius.circular(24.r) , topRight:Radius.circular(24.r))
|
||||
),
|
||||
child: SizedBox(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomButton(
|
||||
text: "SelectLocation".needTranslation,
|
||||
onPressed: () {
|
||||
_showBranchBottomSheet(context);
|
||||
},
|
||||
backgroundColor: AppColors.primaryRedColor,
|
||||
borderColor: AppColors.primaryRedColor,
|
||||
textColor: AppColors.whiteColor,
|
||||
fontSize: 16.f,
|
||||
fontWeight: FontWeight.w500,
|
||||
borderRadius: 12.r,
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
height: 50.h,
|
||||
iconSize: 18.h,
|
||||
).paddingSymmetrical(16.h, 24.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
void _showBranchBottomSheet(BuildContext context, ) {
|
||||
// Set first branch as selected by default
|
||||
setState(() {
|
||||
_selectedBranchIndex = 0;
|
||||
});
|
||||
|
||||
showCommonBottomSheet(
|
||||
|
||||
context,
|
||||
title: "Select Branch".needTranslation,
|
||||
height: ResponsiveExtension.screenHeight * 0.651,
|
||||
child: StatefulBuilder(
|
||||
builder: (context, setBottomSheetState) {
|
||||
return Consumer<HabibWalletViewModel>(
|
||||
builder: (context, habibWalletVM, child) {
|
||||
|
||||
final hospitals = habibWalletVM.advancePaymentHospitals;
|
||||
if (hospitals.isEmpty) {
|
||||
return const Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Text('No branches available'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child:Container(
|
||||
margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 12.h, bottom: 24.h),
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
hasShadow: true,
|
||||
customBorder: BorderRadius.only(
|
||||
topLeft: Radius.circular(24.r),
|
||||
topRight: Radius.circular(24.r),
|
||||
),
|
||||
), child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h),
|
||||
itemBuilder: (context, index) {
|
||||
final branch = hospitals[index];
|
||||
final isSelected = _selectedBranchIndex == index;
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
setBottomSheetState(() {
|
||||
_selectedBranchIndex = index;
|
||||
});
|
||||
setState(() {
|
||||
_selectedBranchIndex = index;
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
||||
child: Row(
|
||||
children: [
|
||||
// Radio button
|
||||
Container(
|
||||
width: 20.w,
|
||||
height: 20.h,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: isSelected
|
||||
? AppColors.primaryRedColor
|
||||
: AppColors.greyTextColor.withValues(alpha: 0.3),
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
child: isSelected
|
||||
? Center(
|
||||
child: Container(
|
||||
width: 10.w,
|
||||
height: 10.h,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: AppColors.primaryRedColor,
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
SizedBox(width: 12.w),
|
||||
// Branch details
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
SizedBox(height: 4.h),
|
||||
(branch.desciption ?? 'Unknown').toText14(
|
||||
color: AppColors.textColor,
|
||||
weight: FontWeight.w600,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Location icon
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) => SizedBox(height: 12.h),
|
||||
itemCount: hospitals.length,
|
||||
)),
|
||||
),
|
||||
// Next button
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 16.h),
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
hasShadow: true,
|
||||
customBorder: BorderRadius.only(
|
||||
topLeft: Radius.circular(24.r),
|
||||
topRight: Radius.circular(24.r),
|
||||
),
|
||||
),
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: CustomButton(
|
||||
text: "Next".needTranslation,
|
||||
onPressed: (){
|
||||
|
||||
Navigator.of(context)
|
||||
.push(
|
||||
CustomPageRoute(
|
||||
page: Covid19Questionnaire(selectedHospital: hospitals[_selectedBranchIndex!],),
|
||||
),
|
||||
);
|
||||
|
||||
},
|
||||
backgroundColor: _selectedBranchIndex != null
|
||||
? AppColors.primaryRedColor
|
||||
: AppColors.greyTextColor.withValues(alpha: 0.3),
|
||||
borderColor: _selectedBranchIndex != null
|
||||
? AppColors.primaryRedColor
|
||||
: AppColors.greyTextColor.withValues(alpha: 0.3),
|
||||
textColor: AppColors.whiteColor,
|
||||
fontSize: 16.f,
|
||||
fontWeight: FontWeight.w600,
|
||||
borderRadius: 12.r,
|
||||
height: 56.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
getProjectList() async{
|
||||
await habibWalletVM.getProjectsList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,132 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/covid_questionnare_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/CustomSwitch.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class Covid19Questionnaire extends StatefulWidget {
|
||||
final HospitalsModel selectedHospital;
|
||||
const Covid19Questionnaire({super.key, required this.selectedHospital});
|
||||
|
||||
@override
|
||||
State<Covid19Questionnaire> createState() => _Covid19QuestionnaireState();
|
||||
}
|
||||
|
||||
class _Covid19QuestionnaireState extends State<Covid19Questionnaire> {
|
||||
late HmgServicesViewModel hmgServicesViewModel;
|
||||
List<CovidQuestionnaireModel> qaList = [];
|
||||
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
hmgServicesViewModel = Provider.of<HmgServicesViewModel>(context, listen: false);
|
||||
scheduleMicrotask(() {
|
||||
setState(() {
|
||||
qaList = hmgServicesViewModel.getQuestionsFromJson();
|
||||
});
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void _toggleAnswer(int index, bool value) {
|
||||
setState(() {
|
||||
qaList[index].ans = value ? 1 : 0;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.bgScaffoldColor,
|
||||
body: Column(children: [
|
||||
Expanded(
|
||||
child: CollapsingListView(
|
||||
title: "COVID-19",
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(24.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(20.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Please answer below questionnaire:".toText14(
|
||||
color: AppColors.textColor,
|
||||
weight: FontWeight.w500,
|
||||
),
|
||||
SizedBox(height: 20.h),
|
||||
// Question list
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: qaList.length,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 16.h),
|
||||
itemBuilder: (context, index) {
|
||||
final question = qaList[index];
|
||||
final isAnswerYes = question.ans == 1;
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: (question.questionEn ?? '').toText14(
|
||||
color: AppColors.textColor,
|
||||
weight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 12.w),
|
||||
CustomSwitch(
|
||||
value: isAnswerYes,
|
||||
onChanged: (value) => _toggleAnswer(index, value),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
// Next button
|
||||
CustomButton(
|
||||
text: "Next".needTranslation,
|
||||
onPressed: () {
|
||||
// Handle next action
|
||||
},
|
||||
backgroundColor: AppColors.primaryRedColor,
|
||||
borderColor: AppColors.primaryRedColor,
|
||||
textColor: AppColors.whiteColor,
|
||||
fontSize: 16.f,
|
||||
fontWeight: FontWeight.w600,
|
||||
borderRadius: 12.r,
|
||||
height: 56.h,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]));
|
||||
}
|
||||
}
|
||||