Compare commits
8 Commits
0388d22cc1
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c4e082c57 | ||
|
|
c5a6c2dbed | ||
|
|
0b562d1dcc | ||
|
|
b734fc9ce6 | ||
|
|
44878e79b3 | ||
|
|
4acc409de0 | ||
|
|
689cf29eab | ||
|
|
d8bd9c4925 |
@@ -1,6 +1,8 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<application
|
<application
|
||||||
|
android:allowBackup="false"
|
||||||
|
android:fullBackupContent="false"
|
||||||
android:label="food_delivery_client"
|
android:label="food_delivery_client"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher">
|
||||||
|
|||||||
9
assets/icons/common/ic_cart.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M16 16C14.89 16 14 16.89 14 18C14 18.5304 14.2107 19.0391 14.5858 19.4142C14.9609 19.7893 15.4696 20 16 20C16.5304 20 17.0391 19.7893 17.4142 19.4142C17.7893 19.0391 18 18.5304 18 18C18 17.4696 17.7893 16.9609 17.4142 16.5858C17.0391 16.2107 16.5304 16 16 16ZM0 0V2H2L5.6 9.59L4.24 12.04C4.09 12.32 4 12.65 4 13C4 13.5304 4.21071 14.0391 4.58579 14.4142C4.96086 14.7893 5.46957 15 6 15H18V13H6.42C6.3537 13 6.29011 12.9737 6.24322 12.9268C6.19634 12.8799 6.17 12.8163 6.17 12.75C6.17 12.7 6.18 12.66 6.2 12.63L7.1 11H14.55C15.3 11 15.96 10.58 16.3 9.97L19.88 3.5C19.95 3.34 20 3.17 20 3C20 2.73478 19.8946 2.48043 19.7071 2.29289C19.5196 2.10536 19.2652 2 19 2H4.21L3.27 0M6 16C4.89 16 4 16.89 4 18C4 18.5304 4.21071 19.0391 4.58579 19.4142C4.96086 19.7893 5.46957 20 6 20C6.53043 20 7.03914 19.7893 7.41421 19.4142C7.78929 19.0391 8 18.5304 8 18C8 17.4696 7.78929 16.9609 7.41421 16.5858C7.03914 16.2107 6.53043 16 6 16Z" fill="url(#paint0_linear_6448_12220)"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_6448_12220" x1="10" y1="0" x2="10" y2="20" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
23
assets/icons/common/ic_cart1.svg
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<!-- Full-coverage gradient from top (#FF6F00) to bottom (#FFAB40) -->
|
||||||
|
<linearGradient id="grad1" x1="12" y1="0" x2="12" y2="24" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#FF6F00"/>
|
||||||
|
<stop offset="100%" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<path
|
||||||
|
d="M16.25 22.5C17.2165 22.5 18 21.7165 18 20.75C18 19.7835 17.2165 19 16.25 19C15.2835 19 14.5 19.7835 14.5 20.75C14.5 21.7165 15.2835 22.5 16.25 22.5Z"
|
||||||
|
fill="url(#grad1)" />
|
||||||
|
<path
|
||||||
|
d="M8.25 22.5C9.2165 22.5 10 21.7165 10 20.75C10 19.7835 9.2165 19 8.25 19C7.2835 19 6.5 19.7835 6.5 20.75C6.5 21.7165 7.2835 22.5 8.25 22.5Z"
|
||||||
|
fill="url(#grad1)" />
|
||||||
|
<path
|
||||||
|
d="M4.84 3.94L4.64 6.39C4.6 6.86 4.97 7.25 5.44 7.25H20.75C21.17 7.25 21.52 6.93 21.55 6.51C21.68 4.74 20.33 3.3 18.56 3.3H6.27C6.17 2.86 5.97 2.44 5.66 2.09C5.16 1.56 4.46 1.25 3.74 1.25H2C1.59 1.25 1.25 1.59 1.25 2C1.25 2.41 1.59 2.75 2 2.75H3.74C4.05 2.75 4.34 2.88 4.55 3.1C4.76 3.33 4.86 3.63 4.84 3.94Z"
|
||||||
|
fill="url(#grad1)" />
|
||||||
|
<path
|
||||||
|
d="M20.5101 8.75H5.17005C4.75005 8.75 4.41005 9.07 4.37005 9.48L4.01005 13.83C3.87005 15.54 5.21005 17 6.92005 17H18.0401C19.5401 17 20.8601 15.77 20.9701 14.27L21.3001 9.6C21.3401 9.14 20.9801 8.75 20.5101 8.75Z"
|
||||||
|
fill="url(#grad1)" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
3
assets/icons/common/ic_clock.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="49" height="56" viewBox="0 0 49 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M39.3392 31.4713C40.2309 31.4713 41.0963 31.5762 41.9618 31.7074V23.6035C41.9618 22.2124 41.4092 20.8782 40.4255 19.8946C39.4418 18.9109 38.1077 18.3583 36.7166 18.3583H34.0939V13.1131C34.0939 5.87465 28.2193 0 20.9809 0C13.7425 0 7.86783 5.87465 7.86783 13.1131V18.3583H5.24522C3.8541 18.3583 2.51996 18.9109 1.53629 19.8946C0.55262 20.8782 0 22.2124 0 23.6035V49.8296C0 52.7407 2.33412 55.0748 5.24522 55.0748H25.7278C24.3903 52.7669 23.6035 50.0919 23.6035 47.207C23.6035 38.5262 30.6583 31.4713 39.3392 31.4713ZM13.1131 13.1131C13.1131 8.75952 16.6274 5.24522 20.9809 5.24522C25.3344 5.24522 28.8487 8.75952 28.8487 13.1131V18.3583H13.1131V13.1131ZM20.9809 41.9618C19.9435 41.9618 18.9294 41.6542 18.0668 41.0778C17.2042 40.5015 16.5319 39.6823 16.1349 38.7238C15.7379 37.7654 15.6341 36.7107 15.8365 35.6933C16.0388 34.6758 16.5384 33.7412 17.272 33.0076C18.0055 32.2741 18.9401 31.7745 19.9576 31.5721C20.9751 31.3697 22.0297 31.4736 22.9881 31.8706C23.9466 32.2676 24.7658 32.9399 25.3421 33.8025C25.9185 34.665 26.2261 35.6792 26.2261 36.7166C26.2261 39.6277 23.892 41.9618 20.9809 41.9618ZM48.5183 42.6174L36.0609 55.0748L28.8487 47.207L31.891 44.1648L36.0609 48.3347L45.4761 38.9196L48.5183 42.6174Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
14
assets/icons/common/ic_discover.svg
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23Z" fill="url(#paint0_linear_6448_12254)" stroke="url(#paint1_linear_6448_12254)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M11.1527 9.23672L15.6663 8.3335L14.7631 12.8472C14.6686 13.3202 14.4361 13.7548 14.0951 14.096C13.7541 14.4373 13.3197 14.67 12.8467 14.7648L8.33301 15.6668L9.23623 11.1532C9.331 10.6803 9.56352 10.246 9.90453 9.90502C10.2455 9.56401 10.6798 9.33149 11.1527 9.23672Z" fill="white" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_6448_12254" x1="12" y1="1" x2="12" y2="23" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_6448_12254" x1="12" y1="1" x2="12" y2="23" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
9
assets/icons/common/ic_home.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M18.05 4.81774L12.29 0.78774C10.72 -0.31226 8.31 -0.252259 6.8 0.917741L1.79 4.82774C0.79 5.60774 0 7.20774 0 8.46774V15.3677C0 17.9177 2.07 19.9977 4.62 19.9977H15.4C17.95 19.9977 20.02 17.9277 20.02 15.3777V8.59774C20.02 7.24774 19.15 5.58774 18.05 4.81774ZM10.76 15.9977C10.76 16.4077 10.42 16.7477 10.01 16.7477C9.6 16.7477 9.26 16.4077 9.26 15.9977V12.9977C9.26 12.5877 9.6 12.2477 10.01 12.2477C10.42 12.2477 10.76 12.5877 10.76 12.9977V15.9977Z" fill="url(#paint0_linear_6478_100)"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_6478_100" x1="10.01" y1="0" x2="10.01" y2="19.9977" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 823 B |
261
assets/icons/common/ic_login.svg
Normal file
|
After Width: | Height: | Size: 126 KiB |
224
assets/icons/common/ic_onboarding1.svg
Normal file
|
After Width: | Height: | Size: 75 KiB |
3
assets/icons/common/ic_onboarding2.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="341" height="319" viewBox="0 0 341 319" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M67.8521 23.0006C62.5319 27.4324 51.6584 33.3869 63.1495 34.3099C99.8632 37.2587 139.926 33.2799 176.92 35.3806C177.96 35.4397 180.964 35.3305 179.926 35.748C177.12 36.8773 174.043 37.4682 171.085 38.2733C156.855 42.1469 142.586 45.9252 128.478 50.1984C111.531 55.3313 95.271 61.5926 78.9736 67.9597C64.8554 73.4754 49.2615 79.0174 36.9048 86.5832C36.4258 86.8764 33.5261 88.5587 34.6607 89.0614C35.7109 89.5267 38.7132 89.4979 39.6541 89.4439C56.7073 88.4652 74.8769 85.2454 92.0329 83.1512C168.171 73.8573 242.311 69.5676 315.799 69.7248C320.077 69.7339 316.273 71.3042 313.509 72.5279C279.862 87.4259 244.452 100.099 210.664 114.944C173.403 131.314 136.381 148.17 100.052 165.619C98.775 166.233 65.6515 180.52 65.615 183.371C65.6027 184.33 91.1682 179.461 91.5178 179.402C126.894 173.415 162.34 167.289 197.648 162.812C218.439 160.176 239.343 157.999 259.877 156.774C262.195 156.636 266.913 155.384 266.646 156.876C266.559 157.36 265.479 157.715 264.767 158.005C255.129 161.936 245.09 165.23 235.313 168.947C187.201 187.239 139.348 206.269 92.4733 226.381C69.642 236.177 43.3202 246.692 24.0322 260.048C20.273 262.651 27.8995 260.746 29.3114 260.51C57.0547 255.885 84.5446 251.81 111.937 250.18C124.222 249.448 138.511 248.506 149.855 250.108C156.469 251.042 138.549 260.718 136.975 261.731C131.568 265.213 115.258 272.197 118.184 277.441C123.628 287.199 152.131 284.252 155.075 295.241" stroke="#FF6F00" stroke-opacity="0.1" stroke-width="46" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
139
assets/icons/common/ic_onboarding3.svg
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
<svg width="374" height="374" viewBox="0 0 374 374" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M220.167 65.8973C219.285 61.9793 216.515 59.3126 211.314 59.4811C211.314 59.4811 205.366 59.8938 201.816 60.3967C198.265 60.8997 194.548 62.439 192.858 65.6023C191.566 68.021 191.694 70.9235 191.921 73.6563C192.09 75.6872 192.303 77.7441 193.033 79.6471C193.762 81.5502 195.079 83.3095 196.935 84.1533C198.99 85.0873 201.368 84.7885 203.603 84.4706C204.807 84.2995 206.011 84.1285 207.215 83.9574C207.879 86.0868 212.088 89.4644 213.166 87.7375C213.574 87.0838 212.111 84.3676 211.552 83.3413C212.769 83.1684 213.986 82.9954 215.204 82.8225C217.334 82.5198 219.719 82.0646 220.919 80.2792C221.754 79.038 221.694 76.5672 221.709 75.0717L220.167 65.8973Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M209.14 50.2158C204.277 49.2252 198.998 51.7297 196.378 55.9453C193.758 60.1609 193.767 65.7759 196.074 70.1701C198.38 74.565 203.253 79.3579 208.092 80.4629C213.502 77.4815 218.775 70.1822 219.088 64.0134C219.402 57.8439 215.194 51.4487 209.14 50.2158ZM206.741 69.6576C202.429 69.6576 198.933 66.1618 198.933 61.8496C198.933 57.5374 202.429 54.0416 206.741 54.0416C211.053 54.0416 214.549 57.5374 214.549 61.8496C214.549 66.1618 211.053 69.6576 206.741 69.6576Z" fill="#FF6F00"/>
|
||||||
|
<path d="M128.689 185.668C128.689 185.668 114.223 185.575 100.426 185.56C88.8626 185.553 77.768 185.603 76.0747 185.819C72.6959 186.252 73.1207 144.156 73.8271 143.861C75.5851 143.126 87.2348 142.946 99.5325 143.126C114.511 143.342 130.44 144.084 130.634 144.971C131.534 149.098 130.814 181.943 128.689 185.668Z" fill="url(#paint0_linear_6415_15393)"/>
|
||||||
|
<path d="M98.4992 146.768C98.4992 146.768 98.3771 154.583 99.231 154.759C100.085 154.937 110.968 155.444 110.968 154.205C110.968 152.965 111.192 147.222 110.828 146.799C110.012 145.85 99.109 145.151 98.4992 146.768Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M116.244 185.018C115.451 174.365 115.177 163.674 115.423 152.994C115.494 149.92 115.61 146.848 115.766 143.777C115.792 143.265 114.997 143.267 114.971 143.777C114.428 154.456 114.398 165.16 114.893 175.842C115.035 178.903 115.221 181.961 115.448 185.017C115.486 185.525 116.282 185.529 116.244 185.018Z" fill="#FFB966"/>
|
||||||
|
<path d="M136.328 215.312C135.899 215.878 124.15 216.301 110.885 216.516C94.3082 216.795 75.3706 216.75 73.1974 216.262C69.2806 215.384 67.6675 186.921 68.5196 186.654C71.1347 185.828 92.6296 185.314 111.093 185.295C125.672 185.269 138.365 185.549 138.365 186.206C138.364 189.192 138.885 211.948 136.328 215.312Z" fill="url(#paint1_linear_6415_15393)"/>
|
||||||
|
<path d="M110.375 185.29C110.375 195.41 110.375 205.53 110.375 215.65C110.375 216.162 111.17 216.163 111.17 215.65C111.17 205.53 111.17 195.41 111.17 185.29C111.17 184.779 110.375 184.778 110.375 185.29Z" fill="url(#paint2_linear_6415_15393)"/>
|
||||||
|
<path d="M162.876 156.504C162.876 156.504 156.54 161.35 157.67 176.585C157.91 179.819 160.959 192.903 167.798 196.108C186.312 204.781 204.354 215.424 204.354 215.424C204.354 215.424 181.251 260.16 183.632 261.906C186.014 263.65 197.213 269.417 197.213 269.417C197.213 269.417 224.554 220.707 227.41 210.52C228.613 206.231 226.538 201.579 223.158 198.09C212.52 187.109 188.056 169.498 188.056 169.498C188.056 169.498 188.981 165.811 188.084 162.382C187.187 158.952 162.876 156.504 162.876 156.504Z" fill="#313131"/>
|
||||||
|
<path d="M203.743 216.613C206.051 214.111 208.359 211.607 210.666 209.105C211.013 208.729 210.452 208.166 210.104 208.543C207.797 211.045 205.489 213.549 203.181 216.051C202.835 216.427 203.395 216.99 203.743 216.613Z" fill="#67A533"/>
|
||||||
|
<path d="M183.837 297.28C183.607 298.458 183.362 299.668 182.669 300.459C181.975 301.25 180.707 301.519 179.492 300.724C178.841 300.298 178.292 299.635 177.764 298.991C173.483 293.763 169.2 288.534 164.918 283.305C164.117 282.327 163.264 281.244 163.046 280.126C162.806 278.893 163.411 278.018 163.993 277.264C164.547 276.545 165.272 275.786 166.339 276.179C166.941 276.401 167.501 276.948 168.023 277.475C173.586 283.094 179.007 290.902 183.837 297.28Z" fill="#2F2B28"/>
|
||||||
|
<path d="M188.965 282.532C188.83 281.943 188.507 281.372 188.426 280.715C188.054 277.728 188.477 274.135 189.553 271.419C190.864 268.106 202.332 261.092 202.779 261.063L190.142 253.909C190.142 253.909 183.203 263.307 180.357 265.777C177.511 268.246 169.076 273.047 168.427 275.511C167.777 277.974 178.157 291.105 182.45 295.596C189.121 302.572 194.395 301.76 195.255 300.873C195.844 300.262 189.713 285.802 188.965 282.532Z" fill="#FF6F00"/>
|
||||||
|
<path d="M194.029 296.603L188.965 282.531C188.475 281.066 188.386 279.128 188.487 276.964C188.487 276.964 183.436 276.695 180.449 273.999C177.462 271.303 177.371 268 177.371 268C174.679 269.829 172.14 271.6 170.468 273.028C170.468 273.028 172.418 282.994 180.1 290.505C187.782 298.016 194.976 299.232 194.976 299.232L194.029 296.603Z" fill="#2F2B28"/>
|
||||||
|
<path d="M195.308 300.538C195.249 300.163 195.156 299.832 194.976 299.232C194.741 299.192 187.758 297.818 180.203 290.435C172.52 282.925 170.468 273.03 170.468 273.03C169.382 273.968 168.549 274.86 168.372 275.539C168.351 275.617 168.344 275.704 168.344 275.799C168.343 275.994 168.386 276.23 168.465 276.499C169.619 280.389 178.505 291.558 182.395 295.628C187.523 300.994 191.752 301.715 193.889 301.41C194.99 301.223 195.369 300.924 195.308 300.538Z" fill="white"/>
|
||||||
|
<path d="M188.329 277.417C188.329 277.417 191.329 275.242 191.291 272.255C191.256 269.51 184.061 267.114 182.59 269.146C181.284 270.95 182.147 275.086 180.448 274C178.751 272.915 177.521 268.401 177.408 268.225L174.87 270.952L176.252 277.002L180.45 280.908L185.15 281.065L188.755 281.775C188.49 280.951 188.378 279.145 188.329 277.417Z" fill="#2F2B28"/>
|
||||||
|
<path d="M183.589 278.2C185.343 277.896 187.198 278.413 188.471 279.682C188.951 280.161 188.326 281.011 187.81 280.534C186.673 279.479 185.25 278.939 183.693 279.118C183.098 279.186 183.006 278.301 183.589 278.2Z" fill="white"/>
|
||||||
|
<path d="M189.302 284.685C188.525 284.417 187.829 284.056 187.002 283.933C186.16 283.808 185.426 283.94 184.592 283.997C183.851 284.047 183.577 283.026 184.278 282.727C185.933 282.02 188.663 282.653 189.713 284.159C189.917 284.449 189.624 284.795 189.302 284.685Z" fill="white"/>
|
||||||
|
<path d="M190.604 288.282C189.897 288.326 189.176 287.898 188.479 287.774C187.688 287.634 186.887 287.615 186.089 287.685C185.206 287.763 185.06 286.458 185.934 286.32C186.884 286.169 187.826 286.228 188.75 286.493C189.512 286.711 190.522 287.034 190.906 287.783C191.012 287.989 190.824 288.269 190.604 288.282Z" fill="white"/>
|
||||||
|
<path d="M173.267 270.86C173.267 270.86 177.637 280.089 177.524 282.645C177.412 285.202 176.512 286.318 176.512 286.318L177.836 288.037C177.836 288.037 180.141 285.87 179.07 281.62C177.998 277.37 174.898 269.7 174.898 269.7L173.267 270.86Z" fill="white"/>
|
||||||
|
<path d="M194.402 297.442C194.633 298.06 194.857 298.683 195.062 299.311C195.205 299.752 195.538 300.43 195.346 300.897C195.128 301.425 194.344 301.714 193.85 301.854C190.426 302.832 186.693 300.253 184.211 298.23C179.933 294.743 176.198 290.485 172.823 286.137C171.454 284.373 170.125 282.562 168.964 280.653C168.345 279.636 167.566 278.484 167.526 277.256C167.442 274.699 169.257 273.229 171.203 271.886C172.828 270.763 174.532 269.745 176.247 268.766C176.786 268.459 177.378 269.238 176.832 269.549C175.614 270.244 174.41 270.967 173.227 271.72C171.714 272.682 169.442 273.887 168.734 275.628C168.195 276.952 168.615 278.062 169.251 279.218C170.101 280.767 171.13 282.226 172.172 283.65C175.086 287.637 178.332 291.43 181.896 294.851C184.621 297.467 188.221 300.945 192.268 301.067C193.153 301.094 193.677 300.779 194.433 300.501C194.533 300.464 194.414 300.417 194.438 300.555C194.43 300.509 194.245 299.956 194.181 299.759C193.969 299.1 193.734 298.448 193.492 297.798C193.271 297.21 194.18 296.85 194.402 297.442Z" fill="#2F2B28"/>
|
||||||
|
<path d="M227.322 192.008C227.794 191.401 255.263 179.187 257.296 180.391C259.329 181.595 265.114 201.012 246.405 210.088C246.405 210.088 243.186 209.773 244.312 207.701C245.438 205.629 252.819 203.669 254.723 195.198C256.628 186.727 253.953 184.954 253.953 184.954C253.953 184.954 232.216 193.689 232.443 194.736C232.67 195.784 235.914 202.575 235.914 202.575L231.514 204.078C231.514 204.078 225.782 193.987 227.322 192.008Z" fill="#2F2B28"/>
|
||||||
|
<path d="M117.367 273.19C127.323 260.239 136.444 246.666 145.708 233.218C148.261 229.512 150.823 225.811 153.415 222.131C154.059 221.218 153.579 219.834 152.674 219.304C151.641 218.699 150.491 219.13 149.846 220.045C140.436 233.4 131.405 247.019 121.845 260.269C119.213 263.917 116.54 267.536 113.798 271.103C113.117 271.989 113.662 273.417 114.539 273.931C115.605 274.554 116.685 274.078 117.367 273.19Z" fill="#2F2B28"/>
|
||||||
|
<path d="M111.609 231.38C85.8673 231.38 65 252.247 65 277.989C65 303.73 85.8673 324.598 111.609 324.598C137.351 324.598 158.218 303.73 158.218 277.989C158.218 252.247 137.351 231.38 111.609 231.38ZM111.609 320.952C87.881 320.952 68.6452 301.717 68.6452 277.989C68.6452 254.26 87.881 235.025 111.609 235.025C135.337 235.025 154.573 254.261 154.573 277.989C154.573 301.717 135.338 320.952 111.609 320.952Z" fill="#2F2B28"/>
|
||||||
|
<path d="M111.638 318.614C88.8946 318.614 70.3906 300.11 70.3906 277.366C70.3906 254.622 88.8946 236.118 111.638 236.118C134.383 236.118 152.887 254.622 152.887 277.366C152.887 300.11 134.383 318.614 111.638 318.614ZM111.638 238.662C90.2966 238.662 72.9339 256.024 72.9339 277.366C72.9339 298.708 90.2966 316.07 111.638 316.07C132.98 316.07 150.343 298.708 150.343 277.366C150.343 256.024 132.981 238.662 111.638 238.662Z" fill="#FF6F00"/>
|
||||||
|
<path d="M261.391 317.878C238.647 317.878 220.144 299.374 220.144 276.631C220.144 253.886 238.648 235.383 261.391 235.383C284.135 235.383 302.639 253.887 302.639 276.631C302.639 299.375 284.135 317.878 261.391 317.878ZM261.391 237.926C240.049 237.926 222.687 255.289 222.687 276.631C222.687 297.972 240.05 315.335 261.391 315.335C282.733 315.335 300.096 297.972 300.096 276.631C300.096 255.289 282.733 237.926 261.391 237.926Z" fill="#FF6F00"/>
|
||||||
|
<path d="M118.6 280.673C130.937 283.591 143.38 286.05 155.902 288.033C159.494 288.602 163.092 289.131 166.696 289.622C167.545 289.738 168.402 289.418 168.651 288.512C168.854 287.771 168.397 286.674 167.541 286.557C154.98 284.842 142.484 282.66 130.088 280.007C126.532 279.246 122.984 278.444 119.445 277.608C117.455 277.137 116.606 280.202 118.6 280.673Z" fill="#2F2B28"/>
|
||||||
|
<path d="M142.104 199.161C145.599 210.34 149.168 221.496 152.76 232.644C156.232 243.423 159.723 254.197 163.169 264.984C165.215 271.392 167.245 277.804 169.252 284.223C169.586 285.288 170.692 285.969 171.794 285.667C172.845 285.378 173.572 284.194 173.238 283.125C169.742 271.945 166.174 260.79 162.582 249.642C159.109 238.862 155.618 228.089 152.173 217.301C150.127 210.894 148.096 204.482 146.089 198.062C145.756 196.997 144.65 196.316 143.547 196.619C142.497 196.908 141.769 198.092 142.104 199.161Z" fill="#2F2B28"/>
|
||||||
|
<path d="M152.254 223.317C163.168 222.873 174.077 222.318 184.98 221.649C196.353 220.95 207.72 220.13 219.069 219.112C225.065 218.574 231.057 217.979 237.038 217.295C238.147 217.169 239.104 216.436 239.104 215.229C239.104 214.21 238.154 213.034 237.038 213.162C226.187 214.401 215.306 215.361 204.417 216.187C193.053 217.048 181.678 217.755 170.298 218.347C164.285 218.66 158.27 218.939 152.253 219.184C151.138 219.229 150.187 220.102 150.187 221.251C150.187 222.335 151.133 223.363 152.254 223.317Z" fill="#2F2B28"/>
|
||||||
|
<path d="M108.208 286.467C114.883 291.206 123.469 292.457 131.286 294.182C140.056 296.117 148.872 297.909 157.8 298.941C162.853 299.525 167.933 299.85 173.02 299.819C174.042 299.813 174.045 298.223 173.02 298.229C164.136 298.283 155.299 297.231 146.565 295.671C142.199 294.892 137.856 293.991 133.522 293.047C129.411 292.151 125.281 291.289 121.204 290.246C116.899 289.144 112.662 287.687 109.009 285.094C108.174 284.501 107.379 285.879 108.208 286.467Z" fill="#2F2B28"/>
|
||||||
|
<path d="M111.751 273.299C112.946 272.056 114.582 271.554 116.244 271.284C118.238 270.959 120.295 270.9 122.312 270.865C126.503 270.791 130.692 271.061 134.875 271.286C143.395 271.743 151.915 272.2 160.435 272.657C165.274 272.916 170.113 273.176 174.951 273.436C175.974 273.491 175.971 271.901 174.951 271.846C166.116 271.373 157.28 270.898 148.444 270.424C144.131 270.193 139.819 269.961 135.506 269.73C131.113 269.494 126.713 269.197 122.312 269.274C120.11 269.313 117.875 269.4 115.7 269.77C113.814 270.09 111.976 270.771 110.628 272.174C109.918 272.913 111.041 274.039 111.751 273.299Z" fill="#2F2B28"/>
|
||||||
|
<path d="M171.245 270.858C163.005 270.858 156.325 277.538 156.325 285.778C156.325 294.018 163.005 300.698 171.245 300.698C179.485 300.698 186.165 294.018 186.165 285.778C186.165 277.538 179.485 270.858 171.245 270.858ZM182.884 285.778C182.884 287.122 182.645 288.407 182.226 289.607C180.795 288.461 176.258 284.797 176.119 284.271C176.001 283.825 179.186 281.035 181.02 279.473C182.195 281.292 182.884 283.453 182.884 285.778ZM167.974 284.527C167.8 285.075 162.035 285.9 159.628 286.222C159.623 286.074 159.606 285.928 159.606 285.779C159.606 281.486 161.936 277.746 165.395 275.728C166.045 277.639 168.161 283.939 167.974 284.527ZM171.703 282.019C171.149 281.985 169.072 276.95 168.124 274.575C169.119 274.298 170.162 274.139 171.246 274.139C174.433 274.139 177.318 275.422 179.42 277.498C177.533 278.715 172.297 282.056 171.703 282.019ZM160.147 289.289C162.062 289.108 168.218 288.553 168.711 288.85C169.189 289.137 168.637 294.954 168.421 297.058C164.496 296.078 161.357 293.117 160.147 289.289ZM170.686 297.351C170.686 297.351 172.747 289.016 173.274 288.583C173.732 288.207 179.668 291.007 181.222 291.75C179.188 295.141 175.487 297.418 171.245 297.418C171.106 297.418 170.972 297.402 170.834 297.397C170.785 297.381 170.736 297.369 170.686 297.351Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M261.391 230.024C235.65 230.024 214.782 250.892 214.782 276.633C214.782 302.375 235.65 323.242 261.391 323.242C287.133 323.242 308 302.375 308 276.633C308 250.892 287.133 230.024 261.391 230.024ZM261.391 319.596C237.663 319.596 218.427 300.36 218.427 276.632C218.427 252.904 237.663 233.669 261.391 233.669C285.119 233.669 304.355 252.905 304.355 276.632C304.355 300.361 285.12 319.596 261.391 319.596Z" fill="#2F2B28"/>
|
||||||
|
<path d="M228.094 193.34C232.568 204.286 236.739 215.355 240.794 226.462C245.148 238.384 249.352 250.362 253.406 262.389C255.435 268.41 257.425 274.444 259.354 280.498C259.693 281.561 260.789 282.245 261.896 281.941C262.942 281.654 263.68 280.467 263.34 279.399C259.75 268.131 255.96 256.926 252.062 245.761C247.878 233.779 243.563 221.841 239.051 209.979C236.793 204.041 234.484 198.122 232.08 192.241C231.658 191.209 230.706 190.477 229.538 190.798C228.56 191.066 227.669 192.301 228.094 193.34Z" fill="#2F2B28"/>
|
||||||
|
<path d="M129.384 195.722C129.31 195.973 128.347 198.512 129.384 199.989C130.421 201.466 137.301 202.394 141.824 202.751C146.348 203.107 162.275 198.265 163.123 197.691C163.971 197.117 164.066 195.639 163.123 194.819C162.181 193.999 129.69 194.69 129.384 195.722Z" fill="#2F2B28"/>
|
||||||
|
<path d="M73.8709 219.315C89.1022 219.315 104.333 219.315 119.564 219.315C123.901 219.315 128.238 219.315 132.574 219.315C135.233 219.315 135.237 215.182 132.574 215.182C117.343 215.182 102.112 215.182 86.8812 215.182C82.5449 215.182 78.2079 215.182 73.8715 215.182C71.2118 215.182 71.2074 219.315 73.8709 219.315Z" fill="#2F2B28"/>
|
||||||
|
<path d="M118.379 272.527C120.239 258.499 122.707 244.549 125.741 230.728C126.609 226.77 127.527 222.824 128.488 218.888C128.753 217.804 128.143 216.648 127.045 216.346C125.99 216.056 124.769 216.701 124.503 217.789C121.074 231.817 118.236 245.988 116.009 260.256C115.372 264.339 114.789 268.43 114.246 272.527C114.099 273.635 115.301 274.593 116.312 274.593C117.551 274.593 118.231 273.638 118.379 272.527Z" fill="#2F2B28"/>
|
||||||
|
<path d="M91.8812 216.236C89.2603 216.549 89.5693 219.616 89.4885 221.596C89.3709 224.486 89.3315 227.379 89.2952 230.27C89.2183 236.429 89.2024 242.589 89.2075 248.748C89.2088 250.026 88.9494 251.631 89.9393 252.603C91.0451 253.689 92.236 254.7 93.3798 255.745C98.1524 260.103 102.926 264.461 107.698 268.818C111.128 271.95 114.522 275.128 117.991 278.216C118.048 278.267 118.105 278.32 118.161 278.372C118.985 279.124 120.269 279.187 121.084 278.372C121.847 277.609 121.911 276.205 121.084 275.45C117.877 272.523 114.671 269.595 111.464 266.667C106.397 262.04 101.329 257.413 96.2608 252.786C95.0864 251.714 93.912 250.641 92.7376 249.568C92.9392 250.056 93.1414 250.543 93.3429 251.03C93.3328 247.439 93.3385 243.849 93.3518 240.258C93.3741 234.429 93.3894 228.596 93.5782 222.769C93.6113 221.752 93.6469 220.734 93.72 219.719C93.7327 219.541 93.7461 219.362 93.7639 219.185C93.7709 219.114 93.7798 219.044 93.7855 218.974C93.8115 218.67 93.9425 218.847 93.7429 219.277C93.7785 219.201 93.7492 219.092 93.7906 219.017C93.837 218.932 93.9432 218.733 93.7174 219.162C93.554 219.473 93.2844 219.931 92.9176 220.087C92.5698 220.181 92.222 220.275 91.8748 220.369C91.8774 220.369 91.8793 220.369 91.8818 220.369C92.9901 220.236 93.9483 219.513 93.9483 218.302C93.9476 217.288 92.9971 216.102 91.8812 216.236Z" fill="#2F2B28"/>
|
||||||
|
<path d="M119.495 285.433C123.188 281.74 123.188 275.752 119.495 272.059C115.802 268.366 109.814 268.366 106.121 272.059C102.428 275.752 102.428 281.74 106.121 285.433C109.814 289.126 115.802 289.126 119.495 285.433Z" fill="#FF6F00"/>
|
||||||
|
<path d="M266.125 285.341C270.34 282.257 271.258 276.34 268.173 272.124C265.089 267.909 259.172 266.992 254.957 270.076C250.741 273.16 249.824 279.077 252.908 283.293C255.992 287.508 261.91 288.425 266.125 285.341Z" fill="#FF6F00"/>
|
||||||
|
<path d="M143.271 201.993C143.271 201.993 144.913 210.464 145.951 210.896C146.988 211.329 150.359 210.204 150.359 210.204L147.507 200.35L143.271 201.993Z" fill="#2F2B28"/>
|
||||||
|
<path d="M186.215 244.258C186.34 244.258 186.34 244.063 186.215 244.063C186.09 244.063 186.089 244.258 186.215 244.258Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M186.215 245.466C186.262 245.466 186.262 245.393 186.215 245.393C186.167 245.392 186.167 245.466 186.215 245.466Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M185.961 254.186C186.115 254.186 186.116 253.947 185.961 253.947C185.807 253.947 185.807 254.186 185.961 254.186Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M129.506 200.17C140.187 199.246 150.89 198.588 161.603 198.195C162.113 198.177 162.115 197.382 161.603 197.401C150.889 197.794 140.187 198.452 129.506 199.375C129.001 199.419 128.995 200.213 129.506 200.17Z" fill="#534C46"/>
|
||||||
|
<path d="M161.108 173.538C161.108 173.538 149.421 165.481 147.962 156.922C146.351 147.467 166.836 153.395 166.836 153.395L194.163 168.66L161.108 173.538Z" fill="#2F2B28"/>
|
||||||
|
<path d="M222.379 109.775C222.379 109.775 258.233 88.3307 259.796 94.1206C260.549 96.9068 247.97 102.377 247.97 102.377C247.97 102.377 244.785 98.614 244.499 98.8549C244.213 99.0966 222.379 109.775 222.379 109.775Z" fill="#FF6F00"/>
|
||||||
|
<path d="M229.979 118.058L232.07 99.3978L240.999 95.8257C250.813 98.4657 251.145 106.964 251.145 106.964C253.179 107.685 255.212 108.406 257.245 109.127C257.492 109.214 257.759 109.317 257.899 109.544C258.17 109.981 257.817 110.541 257.456 110.904C256.238 112.133 254.716 113.041 253.075 113.516L252.869 114.632C252.739 117.976 250.967 121.215 248.252 123.067C245.537 124.919 241.949 125.337 238.908 124.155L234.569 130.908L223.819 125.398L229.979 118.058Z" fill="#FFEDCC"/>
|
||||||
|
<path d="M249.419 101.039C249.259 101.23 247.279 101.282 244.372 99.3444C244.372 99.3444 241.926 100.432 238.91 98.9768C238.91 98.9768 241.894 107.795 240.252 108.612C238.61 109.429 237.274 107.943 237.274 107.943C237.274 107.943 231.327 118.055 230.215 118.978C229.104 119.9 228.568 119.739 228.568 119.739C228.568 119.739 224.071 114.864 222.375 109.243C220.679 103.622 223.182 95.8854 228.134 95.5624C228.134 95.5624 235.733 90.0313 247.872 96.9257C247.872 96.9257 250.763 95.5211 251.451 97.5004C252.139 99.4798 249.772 100.614 249.419 101.039Z" fill="#2F2B28"/>
|
||||||
|
<path d="M232.028 108.793C232.198 107.745 232.754 106.706 233.695 106.217C234.636 105.729 238.193 106.319 238.072 108.862L235.134 113.663C234.29 113.354 232.764 112.236 232.374 111.426C231.983 110.616 231.883 109.68 232.028 108.793Z" fill="#FFEDCC"/>
|
||||||
|
<path d="M247.545 106.605C247.524 107.048 247.191 107.392 246.801 107.373C246.412 107.355 246.113 106.98 246.134 106.537C246.155 106.094 246.488 105.75 246.878 105.769C247.268 105.788 247.566 106.162 247.545 106.605Z" fill="#2F2B28"/>
|
||||||
|
<path d="M243.024 102.753C244.541 101.689 246.752 101.009 248.456 102.149C248.828 102.398 248.562 103.02 248.13 102.95C247.293 102.816 246.566 102.529 245.699 102.579C244.891 102.626 243.989 102.798 243.275 103.172C243.029 103.301 242.795 102.913 243.024 102.753Z" fill="#2F2B28"/>
|
||||||
|
<path d="M237.285 111.296C237.055 111.134 236.757 111.057 236.52 110.878C236.223 110.653 235.937 110.413 235.641 110.186C235.091 109.764 234.395 109.446 233.904 108.966C233.533 108.603 234.06 108.151 234.438 108.256C235.1 108.44 235.806 109.156 236.298 109.607C236.569 109.856 236.859 110.123 237.077 110.42C237.267 110.68 237.288 110.933 237.396 111.209C237.423 111.277 237.346 111.339 237.285 111.296Z" fill="#7E3B1E"/>
|
||||||
|
<g opacity="0.2">
|
||||||
|
<path d="M239.9 110.104C239.869 110.763 240.966 111.351 242.351 111.418C243.736 111.484 244.884 111.002 244.916 110.343C244.947 109.684 243.85 109.096 242.465 109.029C241.08 108.963 239.932 109.444 239.9 110.104Z" fill="#FFEDCC"/>
|
||||||
|
</g>
|
||||||
|
<path d="M250.623 114.598C249.563 114.608 248.634 114.392 247.752 113.776C247.026 113.268 246.064 112.37 246.069 111.424C246.071 111.173 246.433 111.034 246.612 111.195C246.909 111.46 247.042 111.808 247.27 112.131C247.518 112.483 247.816 112.795 248.154 113.061C248.849 113.606 249.739 114.013 250.619 114.121C250.879 114.153 250.9 114.595 250.623 114.598Z" fill="#7E3B1E"/>
|
||||||
|
<path d="M241.326 90.8483C236.299 89.0209 228.444 91.432 224.984 95.5115C221.525 99.591 220.87 104.645 222.379 109.777C231.049 104.773 238.628 100.48 247.971 96.8862C245.713 94.9011 244.845 92.1276 241.326 90.8483Z" fill="#FF6F00"/>
|
||||||
|
<path d="M221.686 102.932C221.686 102.932 226.075 99.8791 226.868 100.918C227.659 101.957 227.294 103.054 226.868 103.602C226.441 104.15 222.048 106.513 221.686 106.215C221.324 105.916 221.686 102.932 221.686 102.932Z" fill="#2F2B28"/>
|
||||||
|
<path d="M244.906 93.3015C243.112 93.9272 241.101 94.9114 239.447 95.8455C239.241 95.9618 239.028 96.0884 238.904 96.2899C238.629 96.7356 238.9 97.3053 239.169 97.7549C239.353 98.062 239.594 98.4047 239.951 98.4257C240.14 98.4365 240.321 98.3506 240.491 98.2667C242.446 97.3034 244.594 96.4133 246.549 95.45L244.906 93.3015Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M159.768 103.46C159.087 103.303 158.679 100.49 159.011 99.8756C159.342 99.2601 160.006 98.9123 160.631 98.5995C166.643 95.592 172.696 92.568 179.152 90.6935C180.388 90.3349 181.676 90.0164 182.948 90.2014C184.221 90.3864 185.484 91.1895 185.845 92.4236C177.358 96.1025 168.871 99.7815 160.384 103.46" fill="#FF6F00"/>
|
||||||
|
<path d="M203.839 123.818C203.166 125.155 203.558 124.384 202.229 125.173C190.864 131.923 178.036 136.626 166.671 143.371C164.309 144.776 161.757 146.234 158.953 146.194C158.538 146.189 158.133 146.149 157.736 146.08C154.407 145.525 151.683 142.976 149.455 140.485C144.015 134.421 139.327 127.767 135.495 120.709C133.971 117.902 135.012 114.479 137.87 112.816C138.25 112.593 138.647 112.364 139.057 112.124C151.799 104.751 180.528 88.81 185.779 91.8283C193.704 96.3891 197.162 105.603 202.273 112.867C203.809 115.05 205.026 121.452 203.839 123.818Z" fill="url(#paint3_linear_6415_15393)"/>
|
||||||
|
<path d="M151.801 123.591C153.699 122.308 155.619 121.054 157.56 119.829C157.828 119.659 158.135 119.483 158.452 119.542C158.776 119.602 158.989 119.884 159.168 120.143C159.651 120.845 160.133 121.547 160.617 122.248L154.115 126.437L151.801 123.591Z" fill="#537F2D"/>
|
||||||
|
<path d="M182.699 92.0208C189.208 98.4624 194.677 106.186 198.985 114.253C199.226 114.704 199.912 114.303 199.671 113.851C195.334 105.731 189.814 97.9442 183.261 91.4587C182.897 91.0988 182.335 91.6602 182.699 92.0208Z" fill="#53802D"/>
|
||||||
|
<path d="M142.905 113.705C150.444 122.129 157.238 131.197 163.178 140.816C163.446 141.25 164.134 140.851 163.864 140.414C157.889 130.74 151.049 121.615 143.466 113.143C143.125 112.761 142.564 113.325 142.905 113.705Z" fill="#53802D"/>
|
||||||
|
<path d="M159.669 135.009C169.632 129.411 178.578 122.231 188.347 116.325C191.149 114.631 194.019 113.052 196.976 111.645C197.438 111.426 197.034 110.741 196.575 110.959C186.231 115.877 177.156 122.926 167.63 129.192C164.897 130.99 162.12 132.721 159.267 134.323C158.822 134.573 159.222 135.26 159.669 135.009Z" fill="#53802D"/>
|
||||||
|
<path d="M160.87 102.43C168.108 98.7353 175.514 95.38 183.065 92.3789C183.535 92.1919 183.33 91.4232 182.854 91.6127C175.238 94.6386 167.768 98.018 160.469 101.744C160.013 101.977 160.415 102.663 160.87 102.43Z" fill="#53802D"/>
|
||||||
|
<path d="M170.9 110.066C171.562 111.445 174.95 111.193 178.468 109.504C181.986 107.814 184.301 105.327 183.64 103.949C182.978 102.57 179.589 102.822 176.071 104.512C172.553 106.201 170.238 108.688 170.9 110.066Z" fill="white"/>
|
||||||
|
<path d="M234.058 133.455C230.647 139.907 224.817 145.137 217.575 146.606C216.957 146.731 217.217 147.693 217.836 147.555C225.489 145.839 231.881 141.168 234.63 133.697C234.752 133.363 234.223 133.144 234.058 133.455Z" fill="#FF6F00"/>
|
||||||
|
<path d="M233.729 133.248C228.939 137.015 222.454 138.309 216.58 136.718C216.086 136.583 215.875 137.35 216.369 137.484C222.54 139.155 229.272 137.757 234.291 133.809C234.692 133.494 234.126 132.935 233.729 133.248Z" fill="#FF6F00"/>
|
||||||
|
<path d="M195.953 309.915C196.36 311.043 196.771 312.208 196.581 313.243C196.391 314.278 195.441 315.158 193.99 315.1C193.212 315.069 192.4 314.78 191.618 314.498C185.26 312.206 178.903 309.913 172.545 307.621C171.356 307.192 170.068 306.7 169.307 305.851C168.469 304.916 168.539 303.854 168.652 302.908C168.759 302.007 168.993 300.984 170.109 300.774C170.74 300.656 171.502 300.838 172.219 301.023C179.877 302.994 188.536 306.917 195.953 309.915Z" fill="#2F2B28"/>
|
||||||
|
<path d="M192.789 294.622C192.371 294.185 191.801 293.86 191.394 293.338C189.542 290.964 188.063 287.663 187.593 284.78C187.02 281.263 193.266 269.36 193.635 269.106L179.118 269.446C179.118 269.446 177.981 281.073 176.805 284.652C175.628 288.231 170.849 296.68 171.555 299.127C172.261 301.574 187.906 307.524 193.895 309.177C203.2 311.745 207.311 308.343 207.594 307.14C207.788 306.314 195.108 297.045 192.789 294.622Z" fill="#313131"/>
|
||||||
|
<path d="M204.354 304.104L192.789 294.621C191.618 293.615 190.547 291.997 189.524 290.087C189.524 290.087 185.05 292.446 181.102 291.664C177.156 290.882 175.383 288.092 175.383 288.092C174.01 291.044 172.739 293.866 172.036 295.95C172.036 295.95 178.822 303.505 189.268 306.013C199.715 308.521 206.514 305.875 206.514 305.875L204.354 304.104Z" fill="#2F2B28"/>
|
||||||
|
<path d="M207.47 306.824C207.227 306.533 206.977 306.296 206.515 305.874C206.293 305.959 199.594 308.361 189.321 305.898C178.874 303.391 172.037 295.949 172.037 295.949C171.586 297.311 171.328 298.504 171.525 299.179C171.547 299.256 171.585 299.335 171.633 299.416C171.733 299.584 171.89 299.765 172.097 299.955C175.082 302.703 188.439 307.733 193.866 309.231C201.02 311.208 205.02 309.658 206.699 308.3C207.548 307.576 207.721 307.125 207.47 306.824Z" fill="white"/>
|
||||||
|
<path d="M189.621 290.557C189.621 290.557 191.08 287.152 189.516 284.607C188.078 282.268 180.672 283.901 180.451 286.401C180.255 288.619 183.117 291.727 181.103 291.666C179.089 291.605 175.717 288.36 175.531 288.268L174.751 291.91L179.04 296.395L184.647 297.595L188.762 295.319L192.221 294.079C191.572 293.509 190.549 292.016 189.621 290.557Z" fill="#2F2B28"/>
|
||||||
|
<path d="M185.953 293.659C187.304 292.499 189.161 291.991 190.905 292.428C191.563 292.592 191.462 293.643 190.775 293.497C189.258 293.175 187.759 293.442 186.514 294.394C186.038 294.757 185.505 294.045 185.953 293.659Z" fill="white"/>
|
||||||
|
<path d="M194.186 296.299C193.381 296.468 192.598 296.515 191.826 296.833C191.039 297.157 190.476 297.648 189.79 298.123C189.179 298.547 188.42 297.81 188.869 297.194C189.928 295.739 192.596 294.882 194.269 295.635C194.593 295.781 194.519 296.229 194.186 296.299Z" fill="white"/>
|
||||||
|
<path d="M197.146 298.719C196.562 299.119 195.724 299.122 195.062 299.373C194.311 299.658 193.613 300.053 192.964 300.523C192.246 301.042 191.451 299.997 192.13 299.43C192.869 298.813 193.707 298.381 194.636 298.134C195.402 297.93 196.435 297.69 197.149 298.135C197.347 298.259 197.329 298.594 197.146 298.719Z" fill="white"/>
|
||||||
|
<path d="M173.328 292.653C173.328 292.653 181.813 298.334 183.028 300.586C184.242 302.838 184.043 304.258 184.043 304.258L186.061 305.055C186.061 305.055 186.929 302.012 183.829 298.913C180.729 295.814 174.134 290.82 174.134 290.82L173.328 292.653Z" fill="white"/>
|
||||||
|
<path d="M205.105 304.631C205.62 305.043 206.132 305.463 206.63 305.897C206.979 306.202 207.613 306.612 207.687 307.113C207.771 307.678 207.246 308.328 206.895 308.702C204.456 311.297 199.928 310.998 196.761 310.534C191.301 309.735 185.91 307.995 180.782 305.993C178.702 305.181 176.633 304.308 174.657 303.265C173.604 302.709 172.345 302.12 171.68 301.086C170.297 298.934 171.101 296.742 172.082 294.59C172.901 292.793 173.841 291.045 174.812 289.325C175.117 288.785 176.024 289.15 175.715 289.697C175.026 290.919 174.364 292.157 173.734 293.409C172.929 295.011 171.596 297.211 171.881 299.068C172.097 300.482 173.028 301.219 174.166 301.886C175.691 302.779 177.322 303.503 178.947 304.192C183.493 306.121 188.225 307.711 193.04 308.821C196.721 309.669 201.596 310.808 205.132 308.838C205.905 308.407 206.195 307.867 206.7 307.241C206.767 307.159 206.641 307.178 206.732 307.284C206.702 307.25 206.259 306.87 206.104 306.734C205.583 306.277 205.047 305.837 204.506 305.404C204.016 305.011 204.612 304.236 205.105 304.631Z" fill="#2F2B28"/>
|
||||||
|
<path d="M164.1 155.265C164.1 155.265 156.756 161.99 156.522 169.153C156.024 184.395 162.278 190.354 165.711 195.827C176.064 212.334 179.203 226.963 179.203 226.963C179.203 226.963 168.977 274.069 170.686 276.633C172.395 279.197 190.223 280.106 190.223 280.106C190.223 280.106 205.56 232.576 204.492 223.816C203.424 215.055 189.732 173.936 189.732 173.936C189.732 173.936 187.726 166.365 189.877 162.661C191.714 159.497 164.1 155.265 164.1 155.265Z" fill="#313131"/>
|
||||||
|
<path d="M167.83 158.621C162.191 168.042 165.222 179.679 169.334 189.086C173.568 198.773 179.003 207.89 183.213 217.594C185.511 222.892 184.033 229.053 183.037 234.534C181.628 242.289 179.768 249.957 177.979 257.631C176.489 264.02 174.691 270.696 174.336 277.276C174.312 277.72 174.985 277.71 175.021 277.276C175.519 271.463 177.338 265.723 178.711 260.079C180.551 252.507 182.377 244.921 183.935 237.286C185.006 232.037 186.597 226.026 185.93 220.627C185.548 217.526 183.721 214.455 182.407 211.677C180.19 206.988 177.816 202.375 175.477 197.746C169.216 185.36 163.531 172.768 168.211 158.781C168.288 158.553 167.949 158.421 167.83 158.621Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M172.028 159.331C166.385 168.748 169.421 180.392 173.532 189.798C177.708 199.352 183.042 208.36 187.241 217.91C189.635 223.356 188.371 229.313 187.391 235.006C186.057 242.757 184.264 250.425 182.54 258.097C181.119 264.417 179.424 271.001 179.077 277.496C179.053 277.941 179.725 277.931 179.762 277.496C180.261 271.652 182.035 265.883 183.369 260.195C185.143 252.627 186.906 245.045 188.378 237.411C189.362 232.309 190.864 226.414 190.113 221.185C189.654 217.993 187.762 214.819 186.396 211.947C184.172 207.268 181.797 202.661 179.461 198.035C173.27 185.773 167.794 173.31 172.409 159.492C172.486 159.264 172.147 159.132 172.028 159.331Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M204.693 122.412C205.264 122.708 149.385 148.982 147.994 153.993C147.299 156.498 157.863 154.056 169.456 158.314C181.049 162.572 192.471 173.935 192.471 173.935C199.228 172.612 199.439 171.161 199.061 166.928C199.061 166.928 211.641 165.292 218.707 158.501C225.773 151.709 228.47 136.671 228.47 136.671C228.47 136.671 238.981 132.198 238.344 128.623C237.707 125.048 224.602 112.519 221.525 108.85C218.448 105.18 209.943 97.9249 204.489 102.986C199.033 108.047 197.135 118.499 204.693 122.412Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M175.251 132.881C175.005 132.988 183.693 146.626 210.583 142.457C210.583 142.457 211.596 147.144 211.358 147.308C211.12 147.471 182.239 150.98 169.729 134.12L175.251 132.881Z" fill="#FF6F00"/>
|
||||||
|
<path d="M186.883 161.738C189.734 161.788 192.499 160.209 193.908 157.731C194.161 157.285 193.475 156.885 193.222 157.33C191.947 159.572 189.462 160.988 186.883 160.943C186.371 160.934 186.371 161.729 186.883 161.738Z" fill="url(#paint4_linear_6415_15393)"/>
|
||||||
|
<path d="M200.572 166.14C197.753 160.483 192.912 155.996 187.087 153.56C186.616 153.363 186.41 154.132 186.876 154.327C192.509 156.682 197.165 161.082 199.886 166.54C200.113 166.999 200.8 166.597 200.572 166.14Z" fill="url(#paint5_linear_6415_15393)"/>
|
||||||
|
<path d="M228.384 135.384C228.724 131.72 228.568 127.903 226.119 125.171C223.669 122.439 220.098 120.911 216.481 120.296C212.863 119.681 201.591 120.322 197.933 120.603C198.064 119.007 198.284 116.516 197.873 114.969C203.809 114.862 216.97 116.754 222.203 119.557C225.618 121.385 228.862 123.965 230.281 127.569C231.701 131.174 231.692 134.86 228.291 136.713" fill="#FF6F00"/>
|
||||||
|
<path d="M168.81 132.987C170.651 136.035 173.039 138.733 175.851 140.92C176.25 141.23 176.816 140.671 176.413 140.358C173.652 138.211 171.304 135.579 169.496 132.585C169.232 132.148 168.545 132.547 168.81 132.987Z" fill="#53802D"/>
|
||||||
|
<path d="M172.943 130.046C174.882 132.123 176.821 134.201 178.759 136.279C179.109 136.653 179.671 136.09 179.322 135.717C177.383 133.639 175.444 131.562 173.505 129.484C173.155 129.109 172.594 129.672 172.943 130.046Z" fill="#53802D"/>
|
||||||
|
<path d="M195.644 122.215C200.135 121.595 204.625 120.977 209.116 120.357C209.621 120.288 209.406 119.522 208.905 119.591C204.414 120.21 199.923 120.829 195.433 121.448C194.928 121.518 195.143 122.284 195.644 122.215Z" fill="#53802D"/>
|
||||||
|
<path d="M195.498 116.215C201.783 115.1 208.247 115.417 214.398 117.122C214.891 117.259 215.102 116.493 214.609 116.356C208.317 114.611 201.714 114.308 195.287 115.449C194.783 115.538 194.997 116.304 195.498 116.215Z" fill="#53802D"/>
|
||||||
|
<path d="M231.543 132.948C233.517 131.653 235.493 130.357 237.468 129.062C237.894 128.783 237.496 128.095 237.067 128.376C235.092 129.671 233.116 130.967 231.141 132.262C230.715 132.542 231.113 133.23 231.543 132.948Z" fill="url(#paint6_linear_6415_15393)"/>
|
||||||
|
<path d="M237.039 197.332C237.039 197.332 238.076 202.468 240.984 204.513C243.891 206.558 246.309 207.502 246.309 207.502C246.309 207.502 248.899 210.543 250.968 210.031C253.038 209.519 252.516 208.021 252.516 208.021C252.516 208.021 255.162 207.575 254.843 205.775C254.843 205.775 256.492 205.697 256.782 204.36C256.782 204.36 257.323 206.085 259.171 204.963C261.019 203.842 258.147 197.342 255.2 196.214C252.254 195.085 239.465 193.019 239.465 193.019" fill="#FFEDCC"/>
|
||||||
|
<path d="M250.705 206.651C250.759 206.67 250.811 206.691 250.864 206.713C250.829 206.697 250.83 206.699 250.864 206.713C250.89 206.724 250.916 206.736 250.941 206.748C251.039 206.793 251.136 206.842 251.23 206.894C251.42 206.997 251.602 207.114 251.776 207.241C251.794 207.255 251.812 207.269 251.831 207.282C251.768 207.236 251.832 207.283 251.845 207.293C251.885 207.325 251.924 207.358 251.963 207.391C252.045 207.461 252.125 207.533 252.203 207.609C252.361 207.763 252.509 207.929 252.645 208.104C252.774 208.269 253.074 208.249 253.207 208.104C253.367 207.929 253.344 207.718 253.207 207.542C252.616 206.785 251.813 206.221 250.917 205.883C250.722 205.809 250.472 205.965 250.428 206.161C250.376 206.388 250.497 206.572 250.705 206.651Z" fill="#7E3B1E"/>
|
||||||
|
<path d="M252.811 203.621C252.884 203.649 252.732 203.58 252.823 203.626C252.851 203.64 252.88 203.654 252.908 203.668C252.958 203.695 253.008 203.723 253.056 203.754C253.116 203.792 253.175 203.832 253.232 203.874C253.248 203.886 253.325 203.944 253.254 203.889C253.28 203.909 253.305 203.93 253.331 203.95C253.567 204.142 253.785 204.356 253.994 204.576C254.383 204.987 254.74 205.428 255.087 205.875C255.215 206.04 255.516 206.019 255.649 205.875C255.81 205.7 255.786 205.489 255.649 205.312C255.288 204.846 254.915 204.387 254.506 203.962C254.08 203.519 253.604 203.078 253.022 202.855C252.828 202.781 252.578 202.937 252.533 203.132C252.482 203.359 252.603 203.541 252.811 203.621Z" fill="#7E3B1E"/>
|
||||||
|
<path d="M254.524 200.959C254.423 200.882 254.574 201.004 254.603 201.029C254.657 201.078 254.709 201.127 254.76 201.178C254.883 201.299 255.001 201.425 255.116 201.553C255.379 201.846 255.66 202.188 255.881 202.475C256.131 202.8 256.371 203.134 256.596 203.479C256.691 203.624 256.782 203.77 256.867 203.921C256.903 203.985 256.938 204.049 256.971 204.114C256.986 204.143 256.999 204.172 257.014 204.201C257.064 204.304 256.999 204.161 257.023 204.221C257.102 204.42 257.288 204.559 257.512 204.498C257.701 204.446 257.869 204.21 257.789 204.009C257.503 203.289 257.008 202.646 256.539 202.036C256.059 201.411 255.557 200.754 254.926 200.272C254.755 200.142 254.481 200.245 254.382 200.414C254.262 200.62 254.353 200.828 254.524 200.959Z" fill="#7E3B1E"/>
|
||||||
|
<path d="M206.177 143.774C206.65 148.901 209.929 170.264 213.276 176.081C217.536 183.486 234.611 201.949 235.299 202.024C242.776 202.837 249.174 198.402 246.514 192.789C245.025 189.646 236.601 180.194 232.36 173.124C229.375 168.148 227.686 162.509 227.434 156.711C226.997 146.661 226.084 131.065 224.507 126.992C221.845 120.118 215.433 119.163 210.304 123.083C205.175 127.002 205.813 139.849 206.177 143.774Z" fill="#CDDDC0"/>
|
||||||
|
<path d="M210.201 166.157C207.569 155.363 206.362 144.259 206.609 133.151C206.62 132.639 205.825 132.639 205.814 133.151C205.565 144.326 206.786 155.508 209.434 166.368C209.556 166.865 210.322 166.655 210.201 166.157Z" fill="url(#paint7_linear_6415_15393)"/>
|
||||||
|
<path d="M227.623 156.008C227.365 149.901 227.107 143.793 226.849 137.686C226.662 133.245 227.214 126.498 222.287 124.286C221.824 124.078 221.419 124.763 221.885 124.972C224.111 125.971 225.185 128.242 225.594 130.535C226.083 133.279 225.991 136.171 226.108 138.949C226.348 144.635 226.589 150.322 226.828 156.008C226.85 156.517 227.645 156.52 227.623 156.008Z" fill="url(#paint8_linear_6415_15393)"/>
|
||||||
|
<path d="M217.261 143.01C218.778 142.819 219.613 139.525 219.126 135.653C218.639 131.781 217.014 128.797 215.497 128.988C213.98 129.178 213.145 132.472 213.632 136.344C214.118 140.216 215.744 143.2 217.261 143.01Z" fill="white"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_6415_15393" x1="102.175" y1="143.061" x2="102.175" y2="185.823" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_6415_15393" x1="103.353" y1="185.293" x2="103.353" y2="216.688" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint2_linear_6415_15393" x1="110.772" y1="184.906" x2="110.772" y2="216.034" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint3_linear_6415_15393" x1="169.556" y1="91.4526" x2="169.556" y2="146.195" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint4_linear_6415_15393" x1="190.231" y1="157.136" x2="190.231" y2="161.739" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint5_linear_6415_15393" x1="193.615" y1="153.528" x2="193.615" y2="166.743" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint6_linear_6415_15393" x1="234.305" y1="128.31" x2="234.305" y2="133.015" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint7_linear_6415_15393" x1="207.998" y1="132.767" x2="207.998" y2="166.652" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint8_linear_6415_15393" x1="224.651" y1="124.247" x2="224.651" y2="156.391" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 39 KiB |
14
assets/icons/common/ic_profile.svg
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 12C14.7614 12 17 9.76142 17 7C17 4.23858 14.7614 2 12 2C9.23858 2 7 4.23858 7 7C7 9.76142 9.23858 12 12 12Z" fill="url(#paint0_linear_6448_12036)"/>
|
||||||
|
<path d="M12.0002 14.5C6.99016 14.5 2.91016 17.86 2.91016 22C2.91016 22.28 3.13016 22.5 3.41016 22.5H20.5902C20.8702 22.5 21.0902 22.28 21.0902 22C21.0902 17.86 17.0102 14.5 12.0002 14.5Z" fill="url(#paint1_linear_6448_12036)"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_6448_12036" x1="12" y1="2" x2="12" y2="12" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_6448_12036" x1="12.0002" y1="14.5" x2="12.0002" y2="22.5" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 916 B |
16
assets/icons/common/ic_transactions.svg
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<mask id="mask0_6459_14583" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="3" y="1" width="18" height="22">
|
||||||
|
<path d="M18.5 4H5.5C4.94772 4 4.5 4.44772 4.5 5V21C4.5 21.5523 4.94772 22 5.5 22H18.5C19.0523 22 19.5 21.5523 19.5 21V5C19.5 4.44772 19.0523 4 18.5 4Z" fill="white" stroke="white" stroke-width="2" stroke-linejoin="round"/>
|
||||||
|
<path d="M9 2V5M15 2V5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M8 9.5H16M8 13.5H14M8 17.5H12" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask0_6459_14583)">
|
||||||
|
<path d="M0 0H24V24H0V0Z" fill="url(#paint0_linear_6459_14583)"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_6459_14583" x1="12" y1="0" x2="12" y2="24" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#FF6F00"/>
|
||||||
|
<stop offset="1" stop-color="#FFAB40"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 996 B |
8
assets/icons/common/ic_visibility.svg
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M12.9833 10C12.9833 11.65 11.6499 12.9833 9.99993 12.9833C8.34993 12.9833 7.0166 11.65 7.0166 10C7.0166 8.35 8.34993 7.01666 9.99993 7.01666C11.6499 7.01666 12.9833 8.35 12.9833 10Z"
|
||||||
|
stroke="#A7AEC1" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path
|
||||||
|
d="M10.0001 16.8916C12.9418 16.8916 15.6834 15.1583 17.5918 12.1583C18.3418 10.9833 18.3418 9.00831 17.5918 7.83331C15.6834 4.83331 12.9418 3.09998 10.0001 3.09998C7.05845 3.09998 4.31678 4.83331 2.40845 7.83331C1.65845 9.00831 1.65845 10.9833 2.40845 12.1583C4.31678 15.1583 7.05845 16.8916 10.0001 16.8916Z"
|
||||||
|
stroke="#A7AEC1" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 823 B |
17
assets/icons/common/ic_visibility_off.svg
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M12.1083 7.89166L7.8916 12.1083C7.34994 11.5667 7.0166 10.825 7.0166 10C7.0166 8.35 8.34994 7.01666 9.99994 7.01666C10.8249 7.01666 11.5666 7.35 12.1083 7.89166Z"
|
||||||
|
stroke="#A7AEC1" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path
|
||||||
|
d="M14.8501 4.80834C13.3918 3.70834 11.7251 3.10834 10.0001 3.10834C7.05845 3.10834 4.31678 4.84167 2.40845 7.84167C1.65845 9.01667 1.65845 10.9917 2.40845 12.1667C3.06678 13.2 3.83345 14.0917 4.66678 14.8083"
|
||||||
|
stroke="#A7AEC1" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path
|
||||||
|
d="M7.0166 16.275C7.9666 16.675 8.97493 16.8917 9.99993 16.8917C12.9416 16.8917 15.6833 15.1583 17.5916 12.1583C18.3416 10.9833 18.3416 9.00834 17.5916 7.83334C17.3166 7.4 17.0166 6.99167 16.7083 6.60834"
|
||||||
|
stroke="#A7AEC1" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path d="M12.925 10.5833C12.7083 11.7583 11.75 12.7166 10.575 12.9333" stroke="#A7AEC1"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path d="M7.89175 12.1083L1.66675 18.3333" stroke="#A7AEC1" stroke-width="1.5"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path d="M18.3334 1.66669L12.1084 7.89169" stroke="#A7AEC1" stroke-width="1.5"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
6
assets/icons/dark/ic_arrow_left.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M8.77254 5.43582L3.20837 11L8.77254 16.5642" stroke="white" stroke-width="1.5"
|
||||||
|
stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path d="M18.7916 11H3.36414" stroke="white" stroke-width="1.5" stroke-miterlimit="10"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 425 B |
5
assets/icons/dark/ic_cart.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M18.4167 19.4998C18.9913 19.4998 19.5424 19.7281 19.9487 20.1344C20.3551 20.5408 20.5833 21.0919 20.5833 21.6665C20.5833 22.2411 20.3551 22.7922 19.9487 23.1986C19.5424 23.6049 18.9913 23.8332 18.4167 23.8332C17.842 23.8332 17.2909 23.6049 16.8846 23.1986C16.4783 22.7922 16.25 22.2411 16.25 21.6665C16.25 20.464 17.2142 19.4998 18.4167 19.4998ZM1.08333 2.1665H4.62583L5.64416 4.33317H21.6667C21.954 4.33317 22.2295 4.44731 22.4327 4.65047C22.6359 4.85364 22.75 5.12919 22.75 5.4165C22.75 5.60067 22.6958 5.78484 22.62 5.95817L18.7417 12.9673C18.3733 13.6282 17.6583 14.0832 16.8458 14.0832H8.77499L7.79999 15.849L7.76749 15.979C7.76749 16.0508 7.79603 16.1197 7.84682 16.1705C7.89761 16.2213 7.9665 16.2498 8.03833 16.2498H20.5833V18.4165H7.58333C7.00869 18.4165 6.45759 18.1882 6.05126 17.7819C5.64493 17.3756 5.41666 16.8245 5.41666 16.2498C5.41666 15.8707 5.51416 15.5132 5.67666 15.2098L7.14999 12.5557L3.24999 4.33317H1.08333V2.1665ZM7.58333 19.4998C8.15796 19.4998 8.70906 19.7281 9.11539 20.1344C9.52172 20.5408 9.74999 21.0919 9.74999 21.6665C9.74999 22.2411 9.52172 22.7922 9.11539 23.1986C8.70906 23.6049 8.15796 23.8332 7.58333 23.8332C7.00869 23.8332 6.45759 23.6049 6.05126 23.1986C5.64493 22.7922 5.41666 22.2411 5.41666 21.6665C5.41666 20.464 6.38083 19.4998 7.58333 19.4998ZM17.3333 11.9165L20.345 6.49984H6.65166L9.20833 11.9165H17.3333Z"
|
||||||
|
fill="#626262" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
16
assets/icons/dark/ic_cart1.svg
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M2 2H3.74001C4.82001 2 5.67 2.93 5.58 4L4.75 13.96C4.61 15.59 5.89999 16.99 7.53999 16.99H18.19C19.63 16.99 20.89 15.81 21 14.38L21.54 6.88C21.66 5.22 20.4 3.87 18.73 3.87H5.82001"
|
||||||
|
stroke="#626262" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round" />
|
||||||
|
<path
|
||||||
|
d="M16.25 22C16.9404 22 17.5 21.4404 17.5 20.75C17.5 20.0596 16.9404 19.5 16.25 19.5C15.5596 19.5 15 20.0596 15 20.75C15 21.4404 15.5596 22 16.25 22Z"
|
||||||
|
stroke="#626262" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round" />
|
||||||
|
<path
|
||||||
|
d="M8.25 22C8.94036 22 9.5 21.4404 9.5 20.75C9.5 20.0596 8.94036 19.5 8.25 19.5C7.55964 19.5 7 20.0596 7 20.75C7 21.4404 7.55964 22 8.25 22Z"
|
||||||
|
stroke="#626262" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round" />
|
||||||
|
<path d="M9 8H21" stroke="#626262" stroke-width="1.5" stroke-miterlimit="10"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
11
assets/icons/dark/ic_discover.svg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_6459_29443)">
|
||||||
|
<path d="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23Z" stroke="#626262" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M11.1528 9.23672L15.6665 8.3335L14.7633 12.8472C14.6687 13.3202 14.4363 13.7548 14.0953 14.096C13.7542 14.4373 13.3198 14.67 12.8468 14.7648L8.33315 15.6668L9.23638 11.1532C9.33114 10.6803 9.56366 10.246 9.90468 9.90502C10.2457 9.56401 10.68 9.33149 11.1528 9.23672Z" stroke="#626262" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_6459_29443">
|
||||||
|
<rect width="24" height="24" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 822 B |
4
assets/icons/dark/ic_home.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9.02 2.83992L3.63 7.03992C2.73 7.73992 2 9.22992 2 10.3599V17.7699C2 20.0899 3.89 21.9899 6.21 21.9899H17.79C20.11 21.9899 22 20.0899 22 17.7799V10.4999C22 9.28992 21.19 7.73992 20.2 7.04992L14.02 2.71992C12.62 1.73992 10.37 1.78992 9.02 2.83992Z" stroke="#626262" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M12 17.99V14.99" stroke="#626262" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 557 B |
4
assets/icons/dark/ic_profile.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 12C14.7614 12 17 9.76142 17 7C17 4.23858 14.7614 2 12 2C9.23858 2 7 4.23858 7 7C7 9.76142 9.23858 12 12 12Z" stroke="#626262" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M20.59 22C20.59 18.13 16.74 15 12 15C7.26003 15 3.41003 18.13 3.41003 22" stroke="#626262" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 478 B |
4
assets/icons/dark/ic_transactions.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M20.0417 4.3335H5.95833C5.36002 4.3335 4.875 4.81852 4.875 5.41683V22.7502C4.875 23.3485 5.36002 23.8335 5.95833 23.8335H20.0417C20.64 23.8335 21.125 23.3485 21.125 22.7502V5.41683C21.125 4.81852 20.64 4.3335 20.0417 4.3335Z" stroke="#626262" stroke-width="2" stroke-linejoin="round"/>
|
||||||
|
<path d="M9.74996 2.16675V5.41675M16.25 2.16675V5.41675M8.66663 10.2917H17.3333M8.66663 14.6251H15.1666M8.66663 18.9584H13" stroke="#626262" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 605 B |
4
assets/icons/light/ic_arrow_left.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M8.77217 5.43585L3.20801 11L8.77217 16.5642" stroke="#151B33" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M18.7918 11H3.36426" stroke="#151B33" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 403 B |
5
assets/icons/light/ic_cart.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M18.4163 19.4998C18.991 19.4998 19.5421 19.7281 19.9484 20.1344C20.3547 20.5408 20.583 21.0919 20.583 21.6665C20.583 22.2411 20.3547 22.7922 19.9484 23.1986C19.5421 23.6049 18.991 23.8332 18.4163 23.8332C17.8417 23.8332 17.2906 23.6049 16.8843 23.1986C16.4779 22.7922 16.2497 22.2411 16.2497 21.6665C16.2497 20.464 17.2138 19.4998 18.4163 19.4998ZM1.08301 2.1665H4.62551L5.64384 4.33317H21.6663C21.9537 4.33317 22.2292 4.44731 22.4324 4.65047C22.6355 4.85364 22.7497 5.12919 22.7497 5.4165C22.7497 5.60067 22.6955 5.78484 22.6197 5.95817L18.7413 12.9673C18.373 13.6282 17.658 14.0832 16.8455 14.0832H8.77467L7.79967 15.849L7.76717 15.979C7.76717 16.0508 7.79571 16.1197 7.8465 16.1705C7.89729 16.2213 7.96618 16.2498 8.03801 16.2498H20.583V18.4165H7.58301C7.00837 18.4165 6.45727 18.1882 6.05094 17.7819C5.64461 17.3756 5.41634 16.8245 5.41634 16.2498C5.41634 15.8707 5.51384 15.5132 5.67634 15.2098L7.14967 12.5557L3.24967 4.33317H1.08301V2.1665ZM7.58301 19.4998C8.15764 19.4998 8.70874 19.7281 9.11507 20.1344C9.5214 20.5408 9.74967 21.0919 9.74967 21.6665C9.74967 22.2411 9.5214 22.7922 9.11507 23.1986C8.70874 23.6049 8.15764 23.8332 7.58301 23.8332C7.00837 23.8332 6.45727 23.6049 6.05094 23.1986C5.64461 22.7922 5.41634 22.2411 5.41634 21.6665C5.41634 20.464 6.38051 19.4998 7.58301 19.4998ZM17.333 11.9165L20.3447 6.49984H6.65134L9.20801 11.9165H17.333Z"
|
||||||
|
fill="#A9A9A9" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
16
assets/icons/light/ic_cart1.svg
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M2 2H3.74001C4.82001 2 5.67 2.93 5.58 4L4.75 13.96C4.61 15.59 5.89999 16.99 7.53999 16.99H18.19C19.63 16.99 20.89 15.81 21 14.38L21.54 6.88C21.66 5.22 20.4 3.87 18.73 3.87H5.82001"
|
||||||
|
stroke="#A9A9A9" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round" />
|
||||||
|
<path
|
||||||
|
d="M16.25 22C16.9404 22 17.5 21.4404 17.5 20.75C17.5 20.0596 16.9404 19.5 16.25 19.5C15.5596 19.5 15 20.0596 15 20.75C15 21.4404 15.5596 22 16.25 22Z"
|
||||||
|
stroke="#A9A9A9" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round" />
|
||||||
|
<path
|
||||||
|
d="M8.25 22C8.94036 22 9.5 21.4404 9.5 20.75C9.5 20.0596 8.94036 19.5 8.25 19.5C7.55964 19.5 7 20.0596 7 20.75C7 21.4404 7.55964 22 8.25 22Z"
|
||||||
|
stroke="#A9A9A9" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round" />
|
||||||
|
<path d="M9 8H21" stroke="#A9A9A9" stroke-width="1.5" stroke-miterlimit="10"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
4
assets/icons/light/ic_discover.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M11.75 22.75C17.8251 22.75 22.75 17.8251 22.75 11.75C22.75 5.67487 17.8251 0.75 11.75 0.75C5.67487 0.75 0.75 5.67487 0.75 11.75C0.75 17.8251 5.67487 22.75 11.75 22.75Z" stroke="#A9A9A9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M10.9027 8.98672L15.4163 8.0835L14.5131 12.5972C14.4186 13.0702 14.1861 13.5048 13.8451 13.846C13.5041 14.1873 13.0697 14.42 12.5967 14.5148L8.08301 15.4168L8.98623 10.9032C9.081 10.4303 9.31352 9.99603 9.65453 9.65502C9.99555 9.31401 10.4298 9.08149 10.9027 8.98672Z" stroke="#A9A9A9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 729 B |
4
assets/icons/light/ic_home.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9.02 2.84016L3.63 7.04016C2.73 7.74016 2 9.23016 2 10.3602V17.7702C2 20.0902 3.89 21.9902 6.21 21.9902H17.79C20.11 21.9902 22 20.0902 22 17.7802V10.5002C22 9.29016 21.19 7.74016 20.2 7.05016L14.02 2.72016C12.62 1.74016 10.37 1.79016 9.02 2.84016Z" stroke="#A7AEC1" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M12 17.9902V14.9902" stroke="#A7AEC1" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 561 B |
4
assets/icons/light/ic_profile.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 12C14.7614 12 17 9.76142 17 7C17 4.23858 14.7614 2 12 2C9.23858 2 7 4.23858 7 7C7 9.76142 9.23858 12 12 12Z" stroke="#A9A9A9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M20.5901 22C20.5901 18.13 16.7402 15 12.0002 15C7.26015 15 3.41016 18.13 3.41016 22" stroke="#A9A9A9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 489 B |
4
assets/icons/light/ic_transactions.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M20.0417 4.33301H5.95833C5.36002 4.33301 4.875 4.81803 4.875 5.41634V22.7497C4.875 23.348 5.36002 23.833 5.95833 23.833H20.0417C20.64 23.833 21.125 23.348 21.125 22.7497V5.41634C21.125 4.81803 20.64 4.33301 20.0417 4.33301Z" stroke="#A9A9A9" stroke-width="2" stroke-linejoin="round"/>
|
||||||
|
<path d="M9.75033 2.1665V5.4165M16.2503 2.1665V5.4165M8.66699 10.2915H17.3337M8.66699 14.6248H15.167M8.66699 18.9582H13.0003" stroke="#A9A9A9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 606 B |
@@ -4,6 +4,56 @@
|
|||||||
"password_too_short": "Password must be at least 6 characters long",
|
"password_too_short": "Password must be at least 6 characters long",
|
||||||
"passwords_do_not_match": "Passwords do not match",
|
"passwords_do_not_match": "Passwords do not match",
|
||||||
"otp_code_incomplete": "OTP code is incomplete",
|
"otp_code_incomplete": "OTP code is incomplete",
|
||||||
"unexpected_error": "An unexpected error occurred. Please try again."
|
"unexpected_error": "An unexpected error occurred. Please try again.",
|
||||||
|
"onboarding_title_1": "Bringing the best flavors food in the world",
|
||||||
|
"onboarding_subtitle_1": "Discover your favorite meals and get them delivered fast wherever you are.",
|
||||||
|
"onboarding_button_next": "Next",
|
||||||
|
"onboarding_title_2": "A place for extraordinary people in the world",
|
||||||
|
"onboarding_subtitle_2": "Discover your favorite meals and get them delivered fast wherever you are.",
|
||||||
|
"onboarding_button_get_started": "Get Started",
|
||||||
|
"welcome_to_volt": "Welcome to {name}",
|
||||||
|
"@welcome_to_volt":{
|
||||||
|
"placeholders": {
|
||||||
|
"name": {
|
||||||
|
"type": "String"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"please_login": "Please login to your account",
|
||||||
|
"email_or_phone": "Phone Number",
|
||||||
|
"enter_email_or_phone": "Enter your phone number",
|
||||||
|
"password": "Password",
|
||||||
|
"enter_password": "Enter your password",
|
||||||
|
"forgot_password": "Forgot Password?",
|
||||||
|
"login": "Login",
|
||||||
|
"or_login_with": "Or login with",
|
||||||
|
"google": "Google",
|
||||||
|
"facebook": "Facebook",
|
||||||
|
"dont_have_account": "Don’t have an account?",
|
||||||
|
"register": "Register",
|
||||||
|
"home": "Home",
|
||||||
|
"discover": "Discover",
|
||||||
|
"cart": "Cart",
|
||||||
|
"transactions": "Transactions",
|
||||||
|
"profile": "Profile",
|
||||||
|
"forgotPassword": "Forgot Password",
|
||||||
|
"forgotPasswordSubtitle": "Please enter your phone number to reset your password.",
|
||||||
|
"phoneNumber": "Phone Number",
|
||||||
|
"sendCode": "Send Code",
|
||||||
|
"verifyYourAccount": "Verify Your Account",
|
||||||
|
"verifyAccountSubtitle": "We’ve sent a verification code to",
|
||||||
|
"verifyAccount": "Verify Account",
|
||||||
|
"didNotReceiveCode": "Didn’t receive the code?",
|
||||||
|
"resend": "Resend",
|
||||||
|
"createNewPassword": "Create New Password",
|
||||||
|
"createNewPasswordSubtitle": "Please create your new password.",
|
||||||
|
"oldPassword": "Old Password",
|
||||||
|
"newPassword": "New Password",
|
||||||
|
"confirmNewPassword": "Confirm New Password",
|
||||||
|
"passwordHint": "*Password must have at least 8 characters, including number and symbol.",
|
||||||
|
"resetPassword": "Reset Password",
|
||||||
|
"changePasswordSuccess": "Change Password Success",
|
||||||
|
"changePasswordMessage": "We have updated your password. Please remember your password, thank you!",
|
||||||
|
"login": "Login"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,56 @@
|
|||||||
"password_too_short": "Пароль должен содержать не менее 6 символов",
|
"password_too_short": "Пароль должен содержать не менее 6 символов",
|
||||||
"passwords_do_not_match": "Пароли не совпадают",
|
"passwords_do_not_match": "Пароли не совпадают",
|
||||||
"otp_code_incomplete": "Код подтверждения введён не полностью",
|
"otp_code_incomplete": "Код подтверждения введён не полностью",
|
||||||
"unexpected_error": "Произошла непредвиденная ошибка. Пожалуйста, попробуйте снова."
|
"unexpected_error": "Произошла непредвиденная ошибка. Пожалуйста, попробуйте снова.",
|
||||||
|
"onboarding_title_1": "Доставка лучших вкусов мира",
|
||||||
|
"onboarding_subtitle_1": "Находите свои любимые блюда и получайте их быстро, где бы вы ни находились.",
|
||||||
|
"onboarding_button_next": "Далее",
|
||||||
|
"onboarding_title_2": "Место для выдающихся людей по всему миру",
|
||||||
|
"onboarding_subtitle_2": "Находите свои любимые блюда и получайте их быстро, где бы вы ни находились.",
|
||||||
|
"onboarding_button_get_started": "Начать",
|
||||||
|
"welcome_to_volt": "Добро пожаловать в {name}",
|
||||||
|
"@welcome_to_volt":{
|
||||||
|
"placeholders": {
|
||||||
|
"name": {
|
||||||
|
"type": "String"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"please_login": "Пожалуйста, войдите в свой аккаунт",
|
||||||
|
"email_or_phone": "Номер телефона",
|
||||||
|
"enter_email_or_phone": "Введите свою номер телефона",
|
||||||
|
"password": "Пароль",
|
||||||
|
"enter_password": "Введите свой пароль",
|
||||||
|
"forgot_password": "Забыли пароль?",
|
||||||
|
"login": "Войти",
|
||||||
|
"or_login_with": "Или войдите с помощью",
|
||||||
|
"google": "Google",
|
||||||
|
"facebook": "Facebook",
|
||||||
|
"dont_have_account": "У вас нет аккаунта?",
|
||||||
|
"register": "Зарегистрироваться",
|
||||||
|
"home": "Главная",
|
||||||
|
"discover": "Обзор",
|
||||||
|
"cart": "Корзина",
|
||||||
|
"transactions": "Транзакции",
|
||||||
|
"profile": "Профиль",
|
||||||
|
"forgotPassword": "Забыли пароль",
|
||||||
|
"forgotPasswordSubtitle": "Пожалуйста, введите свой номер телефона, чтобы сбросить пароль.",
|
||||||
|
"phoneNumber": "Номер телефона",
|
||||||
|
"sendCode": "Отправить код",
|
||||||
|
"verifyYourAccount": "Подтвердите аккаунт",
|
||||||
|
"verifyAccountSubtitle": "Мы отправили код подтверждения на",
|
||||||
|
"verifyAccount": "Подтвердить",
|
||||||
|
"didNotReceiveCode": "Не получили код?",
|
||||||
|
"resend": "Отправить повторно",
|
||||||
|
"createNewPassword": "Создайте новый пароль",
|
||||||
|
"createNewPasswordSubtitle": "Пожалуйста, создайте новый пароль.",
|
||||||
|
"oldPassword": "Старый пароль",
|
||||||
|
"newPassword": "Новый пароль",
|
||||||
|
"confirmNewPassword": "Подтвердите пароль",
|
||||||
|
"passwordHint": "*Пароль должен содержать не менее 8 символов, включая цифры и символы.",
|
||||||
|
"resetPassword": "Сбросить пароль",
|
||||||
|
"changePasswordSuccess": "Пароль успешно изменён",
|
||||||
|
"changePasswordMessage": "Ваш пароль был обновлён. Пожалуйста, запомните его. Спасибо!",
|
||||||
|
"login": "Войти"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,56 @@
|
|||||||
"password_too_short": "Parol kamida 6 ta belgidan iborat bo‘lishi kerak",
|
"password_too_short": "Parol kamida 6 ta belgidan iborat bo‘lishi kerak",
|
||||||
"passwords_do_not_match": "Parollar mos emas",
|
"passwords_do_not_match": "Parollar mos emas",
|
||||||
"otp_code_incomplete": "OTP kodi to‘liq kiritilmagan",
|
"otp_code_incomplete": "OTP kodi to‘liq kiritilmagan",
|
||||||
"unexpected_error": "Kutilmagan xatolik yuz berdi. Iltimos, qayta urinib ko‘ring."
|
"unexpected_error": "Kutilmagan xatolik yuz berdi. Iltimos, qayta urinib ko‘ring.",
|
||||||
|
"onboarding_title_1": "Dunyoning eng mazali taomlari siz uchun",
|
||||||
|
"onboarding_subtitle_1": "Sevimli taomlaringizni toping va ularni tezda yetkazib oling, qaerda bo‘lishingizdan qat’i nazar.",
|
||||||
|
"onboarding_button_next": "Keyingi",
|
||||||
|
"onboarding_title_2": "Butun dunyodagi ajoyib insonlar uchun joy",
|
||||||
|
"onboarding_subtitle_2": "Sevimli taomlaringizni toping va ularni tezda yetkazib oling, qaerda bo‘lishingizdan qat’i nazar.",
|
||||||
|
"onboarding_button_get_started": "Boshlash",
|
||||||
|
"welcome_to_volt": "{name} ilovasiga xush kelibsiz",
|
||||||
|
"@welcome_to_volt":{
|
||||||
|
"placeholders": {
|
||||||
|
"name": {
|
||||||
|
"type": "String"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"please_login": "Iltimos, akkauntingizga kiring",
|
||||||
|
"email_or_phone": "Telefon raqami",
|
||||||
|
"enter_email_or_phone": "Telefon raqamingizni kiriting",
|
||||||
|
"password": "Parol",
|
||||||
|
"enter_password": "Parolingizni kiriting",
|
||||||
|
"forgot_password": "Parolni unutdingizmi?",
|
||||||
|
"login": "Kirish",
|
||||||
|
"or_login_with": "Yoki quyidagi orqali kiring",
|
||||||
|
"google": "Google",
|
||||||
|
"facebook": "Facebook",
|
||||||
|
"dont_have_account": "Akkauntingiz yo‘qmi?",
|
||||||
|
"register": "Ro‘yxatdan o‘tish",
|
||||||
|
"home": "Bosh sahifa",
|
||||||
|
"discover": "Kashf etish",
|
||||||
|
"cart": "Savat",
|
||||||
|
"transactions": "Tranzaksiyalar",
|
||||||
|
"profile": "Profil",
|
||||||
|
"forgotPassword": "Parolni unutdingizmi",
|
||||||
|
"forgotPasswordSubtitle": "Parolingizni tiklash uchun telefon raqamingizni kiriting.",
|
||||||
|
"phoneNumber": "Telefon raqami",
|
||||||
|
"sendCode": "Kod yuborish",
|
||||||
|
"verifyYourAccount": "Hisobni tasdiqlang",
|
||||||
|
"verifyAccountSubtitle": "Tasdiqlash kodi quyidagi raqamga yuborildi",
|
||||||
|
"verifyAccount": "Hisobni tasdiqlash",
|
||||||
|
"didNotReceiveCode": "Kod kelmadimi?",
|
||||||
|
"resend": "Qayta yuborish",
|
||||||
|
"createNewPassword": "Yangi parol yarating",
|
||||||
|
"createNewPasswordSubtitle": "Iltimos, yangi parolingizni yarating.",
|
||||||
|
"oldPassword": "Eski parol",
|
||||||
|
"newPassword": "Yangi parol",
|
||||||
|
"confirmNewPassword": "Parolni tasdiqlang",
|
||||||
|
"passwordHint": "*Parol kamida 8 ta belgi, raqam va belgidan iborat bo‘lishi kerak.",
|
||||||
|
"resetPassword": "Parolni tiklash",
|
||||||
|
"changePasswordSuccess": "Parol muvaffaqiyatli o‘zgartirildi",
|
||||||
|
"changePasswordMessage": "Parolingiz yangilandi. Iltimos, uni eslab qoling. Rahmat!",
|
||||||
|
"login": "Kirish"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,10 @@ abstract class AppLocaleKeys {
|
|||||||
static const String language = 'language';
|
static const String language = 'language';
|
||||||
static const String browseSearchHistory = 'browse-search-history';
|
static const String browseSearchHistory = 'browse-search-history';
|
||||||
static const String token = 'token';
|
static const String token = 'token';
|
||||||
|
static const String theme = 'theme';
|
||||||
|
|
||||||
|
|
||||||
|
static const String appName = "Felix Eats";
|
||||||
|
|
||||||
static const String fontBlack = "fontBlack";
|
static const String fontBlack = "fontBlack";
|
||||||
static const String fontBold = "fontBold";
|
static const String fontBold = "fontBold";
|
||||||
|
|||||||
@@ -13,8 +13,35 @@ import 'package:dio/dio.dart' as _i361;
|
|||||||
import 'package:get_it/get_it.dart' as _i174;
|
import 'package:get_it/get_it.dart' as _i174;
|
||||||
import 'package:injectable/injectable.dart' as _i526;
|
import 'package:injectable/injectable.dart' as _i526;
|
||||||
|
|
||||||
|
import '../../feature/auth/data/datasource/auth_datasource.dart' as _i246;
|
||||||
|
import '../../feature/auth/data/repository/auth_repository_impl.dart' as _i648;
|
||||||
|
import '../../feature/auth/domain/repository/auth_repository.dart' as _i884;
|
||||||
|
import '../../feature/auth/domain/usecases/login_usecase.dart' as _i241;
|
||||||
|
import '../../feature/auth/domain/usecases/register_usecase.dart' as _i607;
|
||||||
|
import '../../feature/auth/domain/usecases/reset_password_usecase.dart'
|
||||||
|
as _i694;
|
||||||
|
import '../../feature/auth/domain/usecases/verify_otp_code_login_usecase.dart'
|
||||||
|
as _i318;
|
||||||
|
import '../../feature/auth/domain/usecases/verify_otp_code_register_usecase.dart'
|
||||||
|
as _i406;
|
||||||
|
import '../../feature/auth/domain/usecases/verify_phone_login_usecase.dart'
|
||||||
|
as _i801;
|
||||||
|
import '../../feature/auth/domain/usecases/verify_phone_register_usecase.dart'
|
||||||
|
as _i664;
|
||||||
|
import '../../feature/auth/presentation/blocs/login_bloc/login_bloc.dart'
|
||||||
|
as _i1065;
|
||||||
|
import '../../feature/auth/presentation/blocs/register_bloc/register_bloc.dart'
|
||||||
|
as _i1050;
|
||||||
|
import '../../feature/auth/presentation/blocs/reset_password_bloc/reset_password_bloc.dart'
|
||||||
|
as _i97;
|
||||||
|
import '../../feature/auth/presentation/blocs/verify_otp_bloc/verify_otp_bloc.dart'
|
||||||
|
as _i323;
|
||||||
|
import '../../feature/auth/presentation/blocs/verify_phone_bloc/verify_phone_bloc.dart'
|
||||||
|
as _i224;
|
||||||
import '../../feature/common/presentation/blocs/language_bloc/language_bloc.dart'
|
import '../../feature/common/presentation/blocs/language_bloc/language_bloc.dart'
|
||||||
as _i942;
|
as _i942;
|
||||||
|
import '../../feature/common/presentation/blocs/theme_bloc/theme_bloc.dart'
|
||||||
|
as _i465;
|
||||||
import '../../feature/main/presentation/blocs/main_bloc/main_bloc.dart'
|
import '../../feature/main/presentation/blocs/main_bloc/main_bloc.dart'
|
||||||
as _i580;
|
as _i580;
|
||||||
import '../../feature/onboarding/presentation/blocs/splash_bloc/splash_bloc.dart'
|
import '../../feature/onboarding/presentation/blocs/splash_bloc/splash_bloc.dart'
|
||||||
@@ -43,10 +70,70 @@ extension GetItInjectableX on _i174.GetIt {
|
|||||||
gh.factory<_i28.SplashBloc>(
|
gh.factory<_i28.SplashBloc>(
|
||||||
() => _i28.SplashBloc(gh<_i321.StorageService>()),
|
() => _i28.SplashBloc(gh<_i321.StorageService>()),
|
||||||
);
|
);
|
||||||
|
gh.factory<_i465.ThemeBloc>(
|
||||||
|
() => _i465.ThemeBloc(gh<_i321.StorageService>()),
|
||||||
|
);
|
||||||
gh.lazySingleton<_i361.Dio>(() => dioModule.dio(gh<_i667.DioClient>()));
|
gh.lazySingleton<_i361.Dio>(() => dioModule.dio(gh<_i667.DioClient>()));
|
||||||
gh.singleton<_i354.RequestHandlerService>(
|
gh.singleton<_i354.RequestHandlerService>(
|
||||||
() => _i354.RequestHandlerService(gh<_i361.Dio>()),
|
() => _i354.RequestHandlerService(gh<_i361.Dio>()),
|
||||||
);
|
);
|
||||||
|
gh.lazySingleton<_i246.AuthDatasource>(
|
||||||
|
() => _i246.AuthDatasourceImpl(gh<_i354.RequestHandlerService>()),
|
||||||
|
);
|
||||||
|
gh.lazySingleton<_i884.AuthRepository>(
|
||||||
|
() => _i648.AuthRepositoryImpl(
|
||||||
|
gh<_i354.RequestHandlerService>(),
|
||||||
|
gh<_i246.AuthDatasource>(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
gh.factory<_i607.RegisterUseCase>(
|
||||||
|
() => _i607.RegisterUseCase(gh<_i884.AuthRepository>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i241.LoginUseCase>(
|
||||||
|
() => _i241.LoginUseCase(gh<_i884.AuthRepository>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i694.ResetPasswordUseCase>(
|
||||||
|
() => _i694.ResetPasswordUseCase(gh<_i884.AuthRepository>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i318.VerifyOtpCodeForgotPasswordUseCase>(
|
||||||
|
() =>
|
||||||
|
_i318.VerifyOtpCodeForgotPasswordUseCase(gh<_i884.AuthRepository>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i801.VerifyPhoneNumberLoginUseCase>(
|
||||||
|
() => _i801.VerifyPhoneNumberLoginUseCase(gh<_i884.AuthRepository>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i664.VerifyPhoneRegisterUseCase>(
|
||||||
|
() => _i664.VerifyPhoneRegisterUseCase(gh<_i884.AuthRepository>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i406.VerifyOtpCodeRegisterUseCase>(
|
||||||
|
() => _i406.VerifyOtpCodeRegisterUseCase(gh<_i884.AuthRepository>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i323.VerifyOtpBloc>(
|
||||||
|
() => _i323.VerifyOtpBloc(
|
||||||
|
gh<_i406.VerifyOtpCodeRegisterUseCase>(),
|
||||||
|
gh<_i318.VerifyOtpCodeForgotPasswordUseCase>(),
|
||||||
|
gh<_i664.VerifyPhoneRegisterUseCase>(),
|
||||||
|
gh<_i801.VerifyPhoneNumberLoginUseCase>(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
gh.factory<_i224.VerifyPhoneBloc>(
|
||||||
|
() => _i224.VerifyPhoneBloc(
|
||||||
|
gh<_i801.VerifyPhoneNumberLoginUseCase>(),
|
||||||
|
gh<_i664.VerifyPhoneRegisterUseCase>(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
gh.factory<_i1050.RegisterBloc>(
|
||||||
|
() => _i1050.RegisterBloc(gh<_i607.RegisterUseCase>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i97.ResetPasswordBloc>(
|
||||||
|
() => _i97.ResetPasswordBloc(gh<_i694.ResetPasswordUseCase>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i1065.LoginBloc>(
|
||||||
|
() => _i1065.LoginBloc(
|
||||||
|
gh<_i241.LoginUseCase>(),
|
||||||
|
gh<_i321.StorageService>(),
|
||||||
|
),
|
||||||
|
);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:food_delivery_client/core/theme/app_theme_colors.dart';
|
||||||
import 'package:food_delivery_client/core/theme/app_theme_textstyles.dart';
|
import 'package:food_delivery_client/core/theme/app_theme_textstyles.dart';
|
||||||
import 'package:food_delivery_client/core/theme/theme_icons.dart';
|
import 'package:food_delivery_client/core/theme/theme_icons.dart';
|
||||||
|
|
||||||
@@ -18,4 +19,6 @@ extension BuildContextExtensions on BuildContext {
|
|||||||
|
|
||||||
AppThemeTextStyles get appThemeTextStyles =>
|
AppThemeTextStyles get appThemeTextStyles =>
|
||||||
theme.extension<AppThemeTextStyles>()!;
|
theme.extension<AppThemeTextStyles>()!;
|
||||||
|
|
||||||
|
AppThemeColors get appThemeColors => theme.extension<AppThemeColors>()!;
|
||||||
}
|
}
|
||||||
|
|||||||
22
lib/core/helpers/string_helpers.dart
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
class StringHelpers {
|
||||||
|
static String formatUzbekPhoneNumber(String input) {
|
||||||
|
final digits = input.replaceAll(RegExp(r'\D'), '');
|
||||||
|
|
||||||
|
String formatted = digits;
|
||||||
|
if (formatted.startsWith('998')) {
|
||||||
|
formatted = formatted.substring(3);
|
||||||
|
} else if (formatted.startsWith('8')) {
|
||||||
|
formatted = formatted.substring(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
final buffer = StringBuffer('+998 ');
|
||||||
|
for (int i = 0; i < formatted.length && i < 9; i++) {
|
||||||
|
buffer.write(formatted[i]);
|
||||||
|
if (i == 1 || i == 4 || i == 6) {
|
||||||
|
buffer.write(' ');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return buffer.toString().trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -135,6 +135,258 @@ abstract class AppLocalizations {
|
|||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'An unexpected error occurred. Please try again.'**
|
/// **'An unexpected error occurred. Please try again.'**
|
||||||
String get unexpected_error;
|
String get unexpected_error;
|
||||||
|
|
||||||
|
/// No description provided for @onboarding_title_1.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Bringing the best flavors food in the world'**
|
||||||
|
String get onboarding_title_1;
|
||||||
|
|
||||||
|
/// No description provided for @onboarding_subtitle_1.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Discover your favorite meals and get them delivered fast wherever you are.'**
|
||||||
|
String get onboarding_subtitle_1;
|
||||||
|
|
||||||
|
/// No description provided for @onboarding_button_next.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Next'**
|
||||||
|
String get onboarding_button_next;
|
||||||
|
|
||||||
|
/// No description provided for @onboarding_title_2.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'A place for extraordinary people in the world'**
|
||||||
|
String get onboarding_title_2;
|
||||||
|
|
||||||
|
/// No description provided for @onboarding_subtitle_2.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Discover your favorite meals and get them delivered fast wherever you are.'**
|
||||||
|
String get onboarding_subtitle_2;
|
||||||
|
|
||||||
|
/// No description provided for @onboarding_button_get_started.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Get Started'**
|
||||||
|
String get onboarding_button_get_started;
|
||||||
|
|
||||||
|
/// No description provided for @welcome_to_volt.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Welcome to {name}'**
|
||||||
|
String welcome_to_volt(String name);
|
||||||
|
|
||||||
|
/// No description provided for @please_login.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Please login to your account'**
|
||||||
|
String get please_login;
|
||||||
|
|
||||||
|
/// No description provided for @email_or_phone.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Phone Number'**
|
||||||
|
String get email_or_phone;
|
||||||
|
|
||||||
|
/// No description provided for @enter_email_or_phone.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Enter your phone number'**
|
||||||
|
String get enter_email_or_phone;
|
||||||
|
|
||||||
|
/// No description provided for @password.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Password'**
|
||||||
|
String get password;
|
||||||
|
|
||||||
|
/// No description provided for @enter_password.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Enter your password'**
|
||||||
|
String get enter_password;
|
||||||
|
|
||||||
|
/// No description provided for @forgot_password.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Forgot Password?'**
|
||||||
|
String get forgot_password;
|
||||||
|
|
||||||
|
/// No description provided for @login.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Login'**
|
||||||
|
String get login;
|
||||||
|
|
||||||
|
/// No description provided for @or_login_with.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Or login with'**
|
||||||
|
String get or_login_with;
|
||||||
|
|
||||||
|
/// No description provided for @google.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Google'**
|
||||||
|
String get google;
|
||||||
|
|
||||||
|
/// No description provided for @facebook.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Facebook'**
|
||||||
|
String get facebook;
|
||||||
|
|
||||||
|
/// No description provided for @dont_have_account.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Don’t have an account?'**
|
||||||
|
String get dont_have_account;
|
||||||
|
|
||||||
|
/// No description provided for @register.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Register'**
|
||||||
|
String get register;
|
||||||
|
|
||||||
|
/// No description provided for @home.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Home'**
|
||||||
|
String get home;
|
||||||
|
|
||||||
|
/// No description provided for @discover.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Discover'**
|
||||||
|
String get discover;
|
||||||
|
|
||||||
|
/// No description provided for @cart.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Cart'**
|
||||||
|
String get cart;
|
||||||
|
|
||||||
|
/// No description provided for @transactions.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Transactions'**
|
||||||
|
String get transactions;
|
||||||
|
|
||||||
|
/// No description provided for @profile.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Profile'**
|
||||||
|
String get profile;
|
||||||
|
|
||||||
|
/// No description provided for @forgotPassword.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Forgot Password'**
|
||||||
|
String get forgotPassword;
|
||||||
|
|
||||||
|
/// No description provided for @forgotPasswordSubtitle.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Please enter your phone number to reset your password.'**
|
||||||
|
String get forgotPasswordSubtitle;
|
||||||
|
|
||||||
|
/// No description provided for @phoneNumber.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Phone Number'**
|
||||||
|
String get phoneNumber;
|
||||||
|
|
||||||
|
/// No description provided for @sendCode.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Send Code'**
|
||||||
|
String get sendCode;
|
||||||
|
|
||||||
|
/// No description provided for @verifyYourAccount.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Verify Your Account'**
|
||||||
|
String get verifyYourAccount;
|
||||||
|
|
||||||
|
/// No description provided for @verifyAccountSubtitle.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'We’ve sent a verification code to'**
|
||||||
|
String get verifyAccountSubtitle;
|
||||||
|
|
||||||
|
/// No description provided for @verifyAccount.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Verify Account'**
|
||||||
|
String get verifyAccount;
|
||||||
|
|
||||||
|
/// No description provided for @didNotReceiveCode.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Didn’t receive the code?'**
|
||||||
|
String get didNotReceiveCode;
|
||||||
|
|
||||||
|
/// No description provided for @resend.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Resend'**
|
||||||
|
String get resend;
|
||||||
|
|
||||||
|
/// No description provided for @createNewPassword.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Create New Password'**
|
||||||
|
String get createNewPassword;
|
||||||
|
|
||||||
|
/// No description provided for @createNewPasswordSubtitle.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Please create your new password.'**
|
||||||
|
String get createNewPasswordSubtitle;
|
||||||
|
|
||||||
|
/// No description provided for @oldPassword.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Old Password'**
|
||||||
|
String get oldPassword;
|
||||||
|
|
||||||
|
/// No description provided for @newPassword.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'New Password'**
|
||||||
|
String get newPassword;
|
||||||
|
|
||||||
|
/// No description provided for @confirmNewPassword.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Confirm New Password'**
|
||||||
|
String get confirmNewPassword;
|
||||||
|
|
||||||
|
/// No description provided for @passwordHint.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'*Password must have at least 8 characters, including number and symbol.'**
|
||||||
|
String get passwordHint;
|
||||||
|
|
||||||
|
/// No description provided for @resetPassword.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Reset Password'**
|
||||||
|
String get resetPassword;
|
||||||
|
|
||||||
|
/// No description provided for @changePasswordSuccess.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Change Password Success'**
|
||||||
|
String get changePasswordSuccess;
|
||||||
|
|
||||||
|
/// No description provided for @changePasswordMessage.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'We have updated your password. Please remember your password, thank you!'**
|
||||||
|
String get changePasswordMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AppLocalizationsDelegate
|
class _AppLocalizationsDelegate
|
||||||
|
|||||||
@@ -27,4 +27,139 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get unexpected_error =>
|
String get unexpected_error =>
|
||||||
'An unexpected error occurred. Please try again.';
|
'An unexpected error occurred. Please try again.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_title_1 =>
|
||||||
|
'Bringing the best flavors food in the world';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_subtitle_1 =>
|
||||||
|
'Discover your favorite meals and get them delivered fast wherever you are.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_button_next => 'Next';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_title_2 =>
|
||||||
|
'A place for extraordinary people in the world';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_subtitle_2 =>
|
||||||
|
'Discover your favorite meals and get them delivered fast wherever you are.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_button_get_started => 'Get Started';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String welcome_to_volt(String name) {
|
||||||
|
return 'Welcome to $name';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get please_login => 'Please login to your account';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get email_or_phone => 'Phone Number';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get enter_email_or_phone => 'Enter your phone number';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get password => 'Password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get enter_password => 'Enter your password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgot_password => 'Forgot Password?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get login => 'Login';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get or_login_with => 'Or login with';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get google => 'Google';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get facebook => 'Facebook';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get dont_have_account => 'Don’t have an account?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get register => 'Register';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get home => 'Home';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get discover => 'Discover';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get cart => 'Cart';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get transactions => 'Transactions';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get profile => 'Profile';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgotPassword => 'Forgot Password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgotPasswordSubtitle =>
|
||||||
|
'Please enter your phone number to reset your password.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get phoneNumber => 'Phone Number';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sendCode => 'Send Code';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyYourAccount => 'Verify Your Account';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyAccountSubtitle => 'We’ve sent a verification code to';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyAccount => 'Verify Account';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get didNotReceiveCode => 'Didn’t receive the code?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resend => 'Resend';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createNewPassword => 'Create New Password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createNewPasswordSubtitle => 'Please create your new password.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get oldPassword => 'Old Password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get newPassword => 'New Password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get confirmNewPassword => 'Confirm New Password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get passwordHint =>
|
||||||
|
'*Password must have at least 8 characters, including number and symbol.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetPassword => 'Reset Password';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get changePasswordSuccess => 'Change Password Success';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get changePasswordMessage =>
|
||||||
|
'We have updated your password. Please remember your password, thank you!';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,4 +27,137 @@ class AppLocalizationsRu extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get unexpected_error =>
|
String get unexpected_error =>
|
||||||
'Произошла непредвиденная ошибка. Пожалуйста, попробуйте снова.';
|
'Произошла непредвиденная ошибка. Пожалуйста, попробуйте снова.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_title_1 => 'Доставка лучших вкусов мира';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_subtitle_1 =>
|
||||||
|
'Находите свои любимые блюда и получайте их быстро, где бы вы ни находились.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_button_next => 'Далее';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_title_2 => 'Место для выдающихся людей по всему миру';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_subtitle_2 =>
|
||||||
|
'Находите свои любимые блюда и получайте их быстро, где бы вы ни находились.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_button_get_started => 'Начать';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String welcome_to_volt(String name) {
|
||||||
|
return 'Добро пожаловать в $name';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get please_login => 'Пожалуйста, войдите в свой аккаунт';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get email_or_phone => 'Номер телефона';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get enter_email_or_phone => 'Введите свою номер телефона';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get password => 'Пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get enter_password => 'Введите свой пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgot_password => 'Забыли пароль?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get login => 'Войти';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get or_login_with => 'Или войдите с помощью';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get google => 'Google';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get facebook => 'Facebook';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get dont_have_account => 'У вас нет аккаунта?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get register => 'Зарегистрироваться';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get home => 'Главная';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get discover => 'Обзор';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get cart => 'Корзина';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get transactions => 'Транзакции';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get profile => 'Профиль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgotPassword => 'Забыли пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgotPasswordSubtitle =>
|
||||||
|
'Пожалуйста, введите свой номер телефона, чтобы сбросить пароль.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get phoneNumber => 'Номер телефона';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sendCode => 'Отправить код';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyYourAccount => 'Подтвердите аккаунт';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyAccountSubtitle => 'Мы отправили код подтверждения на';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyAccount => 'Подтвердить';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get didNotReceiveCode => 'Не получили код?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resend => 'Отправить повторно';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createNewPassword => 'Создайте новый пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createNewPasswordSubtitle => 'Пожалуйста, создайте новый пароль.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get oldPassword => 'Старый пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get newPassword => 'Новый пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get confirmNewPassword => 'Подтвердите пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get passwordHint =>
|
||||||
|
'*Пароль должен содержать не менее 8 символов, включая цифры и символы.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetPassword => 'Сбросить пароль';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get changePasswordSuccess => 'Пароль успешно изменён';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get changePasswordMessage =>
|
||||||
|
'Ваш пароль был обновлён. Пожалуйста, запомните его. Спасибо!';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,4 +27,139 @@ class AppLocalizationsUz extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get unexpected_error =>
|
String get unexpected_error =>
|
||||||
'Kutilmagan xatolik yuz berdi. Iltimos, qayta urinib ko‘ring.';
|
'Kutilmagan xatolik yuz berdi. Iltimos, qayta urinib ko‘ring.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_title_1 => 'Dunyoning eng mazali taomlari siz uchun';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_subtitle_1 =>
|
||||||
|
'Sevimli taomlaringizni toping va ularni tezda yetkazib oling, qaerda bo‘lishingizdan qat’i nazar.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_button_next => 'Keyingi';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_title_2 => 'Butun dunyodagi ajoyib insonlar uchun joy';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_subtitle_2 =>
|
||||||
|
'Sevimli taomlaringizni toping va ularni tezda yetkazib oling, qaerda bo‘lishingizdan qat’i nazar.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get onboarding_button_get_started => 'Boshlash';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String welcome_to_volt(String name) {
|
||||||
|
return '$name ilovasiga xush kelibsiz';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get please_login => 'Iltimos, akkauntingizga kiring';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get email_or_phone => 'Telefon raqami';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get enter_email_or_phone => 'Telefon raqamingizni kiriting';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get password => 'Parol';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get enter_password => 'Parolingizni kiriting';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgot_password => 'Parolni unutdingizmi?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get login => 'Kirish';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get or_login_with => 'Yoki quyidagi orqali kiring';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get google => 'Google';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get facebook => 'Facebook';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get dont_have_account => 'Akkauntingiz yo‘qmi?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get register => 'Ro‘yxatdan o‘tish';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get home => 'Bosh sahifa';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get discover => 'Kashf etish';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get cart => 'Savat';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get transactions => 'Tranzaksiyalar';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get profile => 'Profil';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgotPassword => 'Parolni unutdingizmi';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get forgotPasswordSubtitle =>
|
||||||
|
'Parolingizni tiklash uchun telefon raqamingizni kiriting.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get phoneNumber => 'Telefon raqami';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sendCode => 'Kod yuborish';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyYourAccount => 'Hisobni tasdiqlang';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyAccountSubtitle =>
|
||||||
|
'Tasdiqlash kodi quyidagi raqamga yuborildi';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get verifyAccount => 'Hisobni tasdiqlash';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get didNotReceiveCode => 'Kod kelmadimi?';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resend => 'Qayta yuborish';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createNewPassword => 'Yangi parol yarating';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get createNewPasswordSubtitle =>
|
||||||
|
'Iltimos, yangi parolingizni yarating.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get oldPassword => 'Eski parol';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get newPassword => 'Yangi parol';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get confirmNewPassword => 'Parolni tasdiqlang';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get passwordHint =>
|
||||||
|
'*Parol kamida 8 ta belgi, raqam va belgidan iborat bo‘lishi kerak.';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetPassword => 'Parolni tiklash';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get changePasswordSuccess => 'Parol muvaffaqiyatli o‘zgartirildi';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get changePasswordMessage =>
|
||||||
|
'Parolingiz yangilandi. Iltimos, uni eslab qoling. Rahmat!';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/create_new_password_page/create_new_password_page.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/forgot_password_page/forgot_password_page.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/login_page/login_page.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/verify_account_page/verify_account_page.dart';
|
||||||
import 'package:food_delivery_client/feature/onboarding/presentation/pages/onboarding_page/onboarding_page.dart';
|
import 'package:food_delivery_client/feature/onboarding/presentation/pages/onboarding_page/onboarding_page.dart';
|
||||||
import 'package:food_delivery_client/feature/onboarding/presentation/pages/splash_page/splash_page.dart';
|
import 'package:food_delivery_client/feature/onboarding/presentation/pages/splash_page/splash_page.dart';
|
||||||
|
|
||||||
@@ -20,6 +24,32 @@ class AppRoutes {
|
|||||||
path: Routes.onBoarding,
|
path: Routes.onBoarding,
|
||||||
pageBuilder: (context, state) => CupertinoPage(child: OnboardingPage()),
|
pageBuilder: (context, state) => CupertinoPage(child: OnboardingPage()),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
GoRoute(
|
||||||
|
path: Routes.login,
|
||||||
|
pageBuilder: (context, state) => CupertinoPage(child: LoginPage()),
|
||||||
|
),
|
||||||
|
GoRoute(
|
||||||
|
path: Routes.main,
|
||||||
|
pageBuilder: (context, state) => CupertinoPage(child: MainPage()),
|
||||||
|
),
|
||||||
|
GoRoute(
|
||||||
|
path: Routes.forgotPassword,
|
||||||
|
pageBuilder: (context, state) =>
|
||||||
|
CupertinoPage(child: ForgotPasswordPage()),
|
||||||
|
),
|
||||||
|
GoRoute(
|
||||||
|
path: Routes.verifyAccount,
|
||||||
|
pageBuilder: (context, state) => CupertinoPage(
|
||||||
|
child: VerifyAccountPage(phoneNumber: state.extra as String),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GoRoute(
|
||||||
|
path: Routes.createNewPassword,
|
||||||
|
pageBuilder: (context, state) => CupertinoPage(
|
||||||
|
child: CreateNewPasswordPage(phoneNumber: state.extra as String),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,7 @@ abstract class Routes {
|
|||||||
static const String login = '/login';
|
static const String login = '/login';
|
||||||
static const String register = '/register';
|
static const String register = '/register';
|
||||||
static const String main = '/main';
|
static const String main = '/main';
|
||||||
static const String categories = '/categories';
|
static const String createNewPassword = '/create-new-password';
|
||||||
static const String filters = '/filters';
|
static const String forgotPassword = '/forgot-password';
|
||||||
static const String browse = '/browse';
|
static const String verifyAccount = '/verify-account';
|
||||||
static const String forgotPassword = "/forgot-password";
|
|
||||||
static const String restaurantsByCategory = '/restaurants-by-category';
|
|
||||||
static const String verifyPhoneNumber = "/verify-phone-number";
|
|
||||||
static const String verifyOtpCode = "/verify-otp-code";
|
|
||||||
static const String resetPassword = "/reset-password";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ class StorageService {
|
|||||||
_sharedPreference = await SharedPreferences.getInstance();
|
_sharedPreference = await SharedPreferences.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setBool({required String key, required bool value}) {
|
||||||
|
_sharedPreference.setBool(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
void setString({required String key, required String value}) {
|
void setString({required String key, required String value}) {
|
||||||
_sharedPreference.setString(key, value);
|
_sharedPreference.setString(key, value);
|
||||||
}
|
}
|
||||||
@@ -25,6 +29,10 @@ class StorageService {
|
|||||||
String? getString({required String key}) {
|
String? getString({required String key}) {
|
||||||
return _sharedPreference.getString(key);
|
return _sharedPreference.getString(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool getBool({required String key}) {
|
||||||
|
return _sharedPreference.getBool(key) ?? false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -48,4 +48,15 @@ abstract class AppColors {
|
|||||||
static const Color c9EA5B7 = Color(0xFF9EA5B7);
|
static const Color c9EA5B7 = Color(0xFF9EA5B7);
|
||||||
static const Color c479B36 = Color(0xFF479B36);
|
static const Color c479B36 = Color(0xFF479B36);
|
||||||
static const Color cFFAB40 = Color(0xFFFFAB40);
|
static const Color cFFAB40 = Color(0xFFFFAB40);
|
||||||
|
static const Color cD6D4D4 = Color(0xFFD6D4D4);
|
||||||
|
static const Color c1A202C = Color(0xFF1A202C);
|
||||||
|
static const Color c524242 = Color(0xFF524242);
|
||||||
|
static const Color cE2E4EA = Color(0xFFE2E4EA);
|
||||||
|
static const Color cA7AEC1 = Color(0xFFA7AEC1);
|
||||||
|
static const Color c151B33 = Color(0xFF151B33);
|
||||||
|
static const Color cE5E7EB = Color(0xFFE5E7EB);
|
||||||
|
static const Color cE2E8F0 = Color(0xFFE2E8F0);
|
||||||
|
static const Color cDFE2EB = Color(0xFFDFE2EB);
|
||||||
|
static const Color c9FB6FA = Color(0xFF9FB6FA);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,42 @@
|
|||||||
abstract class AppIcons {
|
abstract class AppIcons {
|
||||||
static const String baseUrl = "assets/icons/common";
|
static const String baseUrl = "assets/icons/common";
|
||||||
static const String icLogo = "$baseUrl/ic_logo.svg";
|
static const String icLogo = "$baseUrl/ic_logo.svg";
|
||||||
|
static const String icOnBoarding1 = "$baseUrl/ic_onboarding1.svg";
|
||||||
|
static const String icOnBoarding2 = "$baseUrl/ic_onboarding2.svg";
|
||||||
|
static const String icOnBoarding3 = "$baseUrl/ic_onboarding3.svg";
|
||||||
|
static const String icLogin = "$baseUrl/ic_login.svg";
|
||||||
|
static const String icVisibility = "$baseUrl/ic_visibility.svg";
|
||||||
|
static const String icVisibilityOff = "$baseUrl/ic_visibility_off.svg";
|
||||||
|
static const String icHome = "$baseUrl/ic_home.svg";
|
||||||
|
static const String icDiscover = "$baseUrl/ic_discover.svg";
|
||||||
|
static const String icCart = "$baseUrl/ic_cart.svg";
|
||||||
|
static const String icCart1 = "$baseUrl/ic_cart1.svg";
|
||||||
|
static const String icTransactions = "$baseUrl/ic_transactions.svg";
|
||||||
|
static const String icProfile = "$baseUrl/ic_profile.svg";
|
||||||
|
static const String icClock = "$baseUrl/ic_clock.svg";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppLightSvgs {
|
abstract class AppLightSvgs {
|
||||||
static const String baseUrl = "assets/icons/light";
|
static const String baseUrl = "assets/icons/light";
|
||||||
|
|
||||||
static const String icSplash = "$baseUrl/ic_splash.svg";
|
static const String icSplash = "$baseUrl/ic_splash.svg";
|
||||||
|
static const String icArrowLeft = "$baseUrl/ic_arrow_left.svg";
|
||||||
|
static const String icHome = "$baseUrl/ic_home.svg";
|
||||||
|
static const String icDiscover = "$baseUrl/ic_discover.svg";
|
||||||
|
static const String icCart = "$baseUrl/ic_cart.svg";
|
||||||
|
static const String icCart1 = "$baseUrl/ic_cart1.svg";
|
||||||
|
static const String icTransactions = "$baseUrl/ic_transactions.svg";
|
||||||
|
static const String icProfile = "$baseUrl/ic_profile.svg";
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppDarkSvgs {
|
abstract class AppDarkSvgs {
|
||||||
static const String baseUrl = "assets/icons/dark";
|
static const String baseUrl = "assets/icons/dark";
|
||||||
static const String icSplash = "$baseUrl/ic_splash.svg";
|
static const String icSplash = "$baseUrl/ic_splash.svg";
|
||||||
|
static const String icArrowLeft = "$baseUrl/ic_arrow_left.svg";
|
||||||
|
static const String icHome = "$baseUrl/ic_home.svg";
|
||||||
|
static const String icDiscover = "$baseUrl/ic_discover.svg";
|
||||||
|
static const String icCart = "$baseUrl/ic_cart.svg";
|
||||||
|
static const String icCart1 = "$baseUrl/ic_cart1.svg";
|
||||||
|
static const String icTransactions = "$baseUrl/ic_transactions.svg";
|
||||||
|
static const String icProfile = "$baseUrl/ic_profile.svg";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:food_delivery_client/core/theme/app_theme_colors.dart';
|
||||||
import 'package:food_delivery_client/core/theme/app_theme_textstyles.dart';
|
import 'package:food_delivery_client/core/theme/app_theme_textstyles.dart';
|
||||||
import 'package:food_delivery_client/core/theme/theme_icons.dart';
|
import 'package:food_delivery_client/core/theme/theme_icons.dart';
|
||||||
|
|
||||||
@@ -6,7 +7,11 @@ import '../../food_delivery_client.dart';
|
|||||||
abstract class AppTheme {
|
abstract class AppTheme {
|
||||||
static ThemeData get lightTheme => ThemeData.light().copyWith(
|
static ThemeData get lightTheme => ThemeData.light().copyWith(
|
||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
extensions: [AppThemeIcons.light, AppThemeTextStyles.light],
|
extensions: [
|
||||||
|
AppThemeIcons.light,
|
||||||
|
AppThemeTextStyles.light,
|
||||||
|
AppThemeColors.light,
|
||||||
|
],
|
||||||
|
|
||||||
// colorScheme: ColorScheme(
|
// colorScheme: ColorScheme(
|
||||||
// brightness: Brightness.light,
|
// brightness: Brightness.light,
|
||||||
@@ -41,17 +46,17 @@ abstract class AppTheme {
|
|||||||
),
|
),
|
||||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
showSelectedLabels: true,
|
showSelectedLabels: false,
|
||||||
showUnselectedLabels: true,
|
showUnselectedLabels: false,
|
||||||
backgroundColor: AppColors.cFFFFFF,
|
backgroundColor: AppColors.cFFFFFF,
|
||||||
type: BottomNavigationBarType.fixed,
|
type: BottomNavigationBarType.fixed,
|
||||||
unselectedItemColor: AppColors.cB5B5B5,
|
unselectedItemColor: AppColors.cA9A9A9,
|
||||||
selectedItemColor: AppColors.c000000,
|
selectedItemColor: AppColors.cFF6F00,
|
||||||
selectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
selectedLabelStyle: AppTextStyles.size12Medium.copyWith(
|
||||||
color: Colors.red,
|
color: AppColors.cFF6F00,
|
||||||
),
|
),
|
||||||
unselectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
unselectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
||||||
color: AppColors.c000000,
|
color: AppColors.cA9A9A9,
|
||||||
),
|
),
|
||||||
// unselectedLabelStyle: AppTextStyles.size14Medium.copyWith(
|
// unselectedLabelStyle: AppTextStyles.size14Medium.copyWith(
|
||||||
// color: AppColors.c888888,
|
// color: AppColors.c888888,
|
||||||
@@ -93,7 +98,11 @@ abstract class AppTheme {
|
|||||||
|
|
||||||
static ThemeData get darkTheme => ThemeData.light().copyWith(
|
static ThemeData get darkTheme => ThemeData.light().copyWith(
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
extensions: [AppThemeIcons.dark, AppThemeTextStyles.dark],
|
extensions: [
|
||||||
|
AppThemeIcons.dark,
|
||||||
|
AppThemeTextStyles.dark,
|
||||||
|
AppThemeColors.dark,
|
||||||
|
],
|
||||||
|
|
||||||
// colorScheme: ColorScheme(
|
// colorScheme: ColorScheme(
|
||||||
// brightness: Brightness.light,
|
// brightness: Brightness.light,
|
||||||
@@ -129,17 +138,17 @@ abstract class AppTheme {
|
|||||||
),
|
),
|
||||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
showSelectedLabels: true,
|
showSelectedLabels: false,
|
||||||
showUnselectedLabels: true,
|
showUnselectedLabels: false,
|
||||||
backgroundColor: AppColors.cFFFFFF,
|
backgroundColor: AppColors.c131720,
|
||||||
type: BottomNavigationBarType.fixed,
|
type: BottomNavigationBarType.fixed,
|
||||||
unselectedItemColor: AppColors.cB5B5B5,
|
unselectedItemColor: AppColors.c626262,
|
||||||
selectedItemColor: AppColors.c000000,
|
selectedItemColor: AppColors.cFF6F00,
|
||||||
selectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
selectedLabelStyle: AppTextStyles.size12Medium.copyWith(
|
||||||
color: Colors.red,
|
color: AppColors.cFF6F00,
|
||||||
),
|
),
|
||||||
unselectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
unselectedLabelStyle: AppTextStyles.size12Medium.copyWith(
|
||||||
color: AppColors.c000000,
|
color: AppColors.c626262,
|
||||||
),
|
),
|
||||||
// unselectedLabelStyle: AppTextStyles.size14Medium.copyWith(
|
// unselectedLabelStyle: AppTextStyles.size14Medium.copyWith(
|
||||||
// color: AppColors.c888888,
|
// color: AppColors.c888888,
|
||||||
|
|||||||
84
lib/core/theme/app_theme_colors.dart
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
class AppThemeColors extends ThemeExtension<AppThemeColors> {
|
||||||
|
final Color onBoardingColor;
|
||||||
|
final Color boxShadow;
|
||||||
|
final Color iconColor;
|
||||||
|
final Color buttonInactiveColor;
|
||||||
|
final Color borderColor;
|
||||||
|
final Color inActiveColor;
|
||||||
|
final Color inActiveColor1;
|
||||||
|
final Color inActiveColor2;
|
||||||
|
final Color rippleColor;
|
||||||
|
|
||||||
|
AppThemeColors({
|
||||||
|
required this.onBoardingColor,
|
||||||
|
required this.boxShadow,
|
||||||
|
required this.iconColor,
|
||||||
|
required this.buttonInactiveColor,
|
||||||
|
required this.borderColor,
|
||||||
|
required this.inActiveColor,
|
||||||
|
required this.inActiveColor1,
|
||||||
|
required this.inActiveColor2,
|
||||||
|
required this.rippleColor,
|
||||||
|
});
|
||||||
|
|
||||||
|
static AppThemeColors light = AppThemeColors(
|
||||||
|
onBoardingColor: AppColors.cFFFFFF,
|
||||||
|
boxShadow: AppColors.cD6D4D4,
|
||||||
|
buttonInactiveColor: AppColors.cE2E4EA,
|
||||||
|
iconColor: AppColors.cFFFFFF,
|
||||||
|
borderColor: AppColors.cE2E4EA,
|
||||||
|
inActiveColor: AppColors.cE2E4EA,
|
||||||
|
inActiveColor1: AppColors.cA9A9A9,
|
||||||
|
inActiveColor2: AppColors.cE5E7EB,
|
||||||
|
rippleColor: AppColors.c9FB6FA,
|
||||||
|
);
|
||||||
|
|
||||||
|
static AppThemeColors dark = AppThemeColors(
|
||||||
|
onBoardingColor: AppColors.c131720,
|
||||||
|
boxShadow: AppColors.c524242,
|
||||||
|
buttonInactiveColor: AppColors.c292F3D,
|
||||||
|
iconColor: AppColors.c131720,
|
||||||
|
borderColor: AppColors.c292F3D,
|
||||||
|
inActiveColor: AppColors.c292F3D,
|
||||||
|
inActiveColor1: AppColors.c626262,
|
||||||
|
inActiveColor2: AppColors.c292F3D,
|
||||||
|
rippleColor: AppColors.cFF6F00,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
ThemeExtension<AppThemeColors> copyWith({
|
||||||
|
Color? onBoardingColor,
|
||||||
|
Color? boxShadow,
|
||||||
|
Color? iconColor,
|
||||||
|
Color? buttonInactiveColor,
|
||||||
|
Color? borderColor,
|
||||||
|
Color? inActiveColor,
|
||||||
|
Color? inActiveColor1,
|
||||||
|
Color? inActiveColor2,
|
||||||
|
Color? rippleColor,
|
||||||
|
}) {
|
||||||
|
return AppThemeColors(
|
||||||
|
onBoardingColor: onBoardingColor ?? this.onBoardingColor,
|
||||||
|
boxShadow: boxShadow ?? this.boxShadow,
|
||||||
|
iconColor: iconColor ?? this.iconColor,
|
||||||
|
buttonInactiveColor: buttonInactiveColor ?? this.buttonInactiveColor,
|
||||||
|
borderColor: borderColor ?? this.borderColor,
|
||||||
|
inActiveColor: inActiveColor ?? this.inActiveColor,
|
||||||
|
inActiveColor1: inActiveColor1 ?? this.inActiveColor1,
|
||||||
|
inActiveColor2: inActiveColor2 ?? this.inActiveColor2,
|
||||||
|
rippleColor: rippleColor ?? this.rippleColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ThemeExtension<AppThemeColors> lerp(
|
||||||
|
covariant ThemeExtension<AppThemeColors>? other,
|
||||||
|
double t,
|
||||||
|
) {
|
||||||
|
if (other is! AppThemeColors) return this;
|
||||||
|
return t < 0.5 ? this : other;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,8 @@ import 'package:food_delivery_client/core/core.dart';
|
|||||||
class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
||||||
//Regular fonts
|
//Regular fonts
|
||||||
final TextStyle size14Regular;
|
final TextStyle size14Regular;
|
||||||
|
final TextStyle size14Regular1;
|
||||||
|
|
||||||
|
|
||||||
//Medium
|
//Medium
|
||||||
|
|
||||||
@@ -14,6 +16,8 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
|
|
||||||
final TextStyle size16SemiBold;
|
final TextStyle size16SemiBold;
|
||||||
final TextStyle size24SemiBold;
|
final TextStyle size24SemiBold;
|
||||||
|
final TextStyle size24SemiBold1;
|
||||||
|
|
||||||
|
|
||||||
//Bold
|
//Bold
|
||||||
|
|
||||||
@@ -25,9 +29,11 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
|
|
||||||
AppThemeTextStyles({
|
AppThemeTextStyles({
|
||||||
required this.size14Regular,
|
required this.size14Regular,
|
||||||
|
required this.size14Regular1,
|
||||||
required this.size16Medium,
|
required this.size16Medium,
|
||||||
required this.size16SemiBold,
|
required this.size16SemiBold,
|
||||||
required this.size24SemiBold,
|
required this.size24SemiBold,
|
||||||
|
required this.size24SemiBold1,
|
||||||
required this.size14Bold,
|
required this.size14Bold,
|
||||||
required this.size24Bold,
|
required this.size24Bold,
|
||||||
required this.size64Black,
|
required this.size64Black,
|
||||||
@@ -42,13 +48,24 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
static AppThemeTextStyles light = AppThemeTextStyles(
|
static AppThemeTextStyles light = AppThemeTextStyles(
|
||||||
size14Regular: TextStyle(
|
size14Regular: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
height: 1.6,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontFamily: _fontRegular,
|
fontFamily: _fontRegular,
|
||||||
|
color: AppColors.c151B33,
|
||||||
|
),
|
||||||
|
size14Regular1: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
height: 1.6,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontFamily: _fontRegular,
|
||||||
|
color: AppColors.c151B33,
|
||||||
),
|
),
|
||||||
size16Medium: TextStyle(
|
size16Medium: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
height: 1.3,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontFamily: _fontMedium,
|
fontFamily: _fontMedium,
|
||||||
|
color: AppColors.c151B33,
|
||||||
),
|
),
|
||||||
size16SemiBold: TextStyle(
|
size16SemiBold: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -57,8 +74,19 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
),
|
),
|
||||||
size24SemiBold: TextStyle(
|
size24SemiBold: TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
|
height: 1.3,
|
||||||
|
letterSpacing: -.48,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontFamily: _fontSemiBold,
|
fontFamily: _fontSemiBold,
|
||||||
|
color: AppColors.c1A202C,
|
||||||
|
),
|
||||||
|
size24SemiBold1: TextStyle(
|
||||||
|
fontSize: 24,
|
||||||
|
height: 1.25,
|
||||||
|
letterSpacing: -.48,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontFamily: _fontSemiBold,
|
||||||
|
color: AppColors.c000000,
|
||||||
),
|
),
|
||||||
size14Bold: TextStyle(
|
size14Bold: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@@ -67,8 +95,10 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
),
|
),
|
||||||
size24Bold: TextStyle(
|
size24Bold: TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
|
height: 1.3,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontFamily: _fontBold,
|
fontFamily: _fontBold,
|
||||||
|
color: AppColors.c151B33,
|
||||||
),
|
),
|
||||||
size64Black: TextStyle(
|
size64Black: TextStyle(
|
||||||
fontSize: 64,
|
fontSize: 64,
|
||||||
@@ -81,13 +111,24 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
static AppThemeTextStyles dark = AppThemeTextStyles(
|
static AppThemeTextStyles dark = AppThemeTextStyles(
|
||||||
size14Regular: TextStyle(
|
size14Regular: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
height: 1.6,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontFamily: _fontRegular,
|
fontFamily: _fontRegular,
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
|
),
|
||||||
|
size14Regular1: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
height: 1.6,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontFamily: _fontRegular,
|
||||||
|
color: AppColors.cA9A9A9,
|
||||||
),
|
),
|
||||||
size16Medium: TextStyle(
|
size16Medium: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
height: 1.3,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontFamily: _fontMedium,
|
fontFamily: _fontMedium,
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
),
|
),
|
||||||
size16SemiBold: TextStyle(
|
size16SemiBold: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -96,8 +137,19 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
),
|
),
|
||||||
size24SemiBold: TextStyle(
|
size24SemiBold: TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
|
height: 1.3,
|
||||||
|
letterSpacing: -.48,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontFamily: _fontSemiBold,
|
fontFamily: _fontSemiBold,
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
|
),
|
||||||
|
size24SemiBold1: TextStyle(
|
||||||
|
fontSize: 24,
|
||||||
|
height: 1.25,
|
||||||
|
letterSpacing: -.48,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontFamily: _fontSemiBold,
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
),
|
),
|
||||||
size14Bold: TextStyle(
|
size14Bold: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@@ -106,8 +158,10 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
),
|
),
|
||||||
size24Bold: TextStyle(
|
size24Bold: TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
|
height: 1.3,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontFamily: _fontBold,
|
fontFamily: _fontBold,
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
),
|
),
|
||||||
size64Black: TextStyle(
|
size64Black: TextStyle(
|
||||||
fontSize: 64,
|
fontSize: 64,
|
||||||
@@ -120,18 +174,22 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
@override
|
@override
|
||||||
ThemeExtension<AppThemeTextStyles> copyWith({
|
ThemeExtension<AppThemeTextStyles> copyWith({
|
||||||
TextStyle? size14Regular,
|
TextStyle? size14Regular,
|
||||||
|
TextStyle? size14Regular1,
|
||||||
TextStyle? size16Medium,
|
TextStyle? size16Medium,
|
||||||
TextStyle? size16SemiBold,
|
TextStyle? size16SemiBold,
|
||||||
TextStyle? size24SemiBold,
|
TextStyle? size24SemiBold,
|
||||||
|
TextStyle? size24SemiBold1,
|
||||||
TextStyle? size14Bold,
|
TextStyle? size14Bold,
|
||||||
TextStyle? size24Bold,
|
TextStyle? size24Bold,
|
||||||
TextStyle? size64Black,
|
TextStyle? size64Black,
|
||||||
}) {
|
}) {
|
||||||
return AppThemeTextStyles(
|
return AppThemeTextStyles(
|
||||||
size14Regular: size14Regular ?? this.size14Regular,
|
size14Regular: size14Regular ?? this.size14Regular,
|
||||||
|
size14Regular1: size14Regular1 ?? this.size14Regular1,
|
||||||
size16Medium: size16Medium ?? this.size16Medium,
|
size16Medium: size16Medium ?? this.size16Medium,
|
||||||
size16SemiBold: size16SemiBold ?? this.size16SemiBold,
|
size16SemiBold: size16SemiBold ?? this.size16SemiBold,
|
||||||
size24SemiBold: size24SemiBold ?? this.size24SemiBold,
|
size24SemiBold: size24SemiBold ?? this.size24SemiBold,
|
||||||
|
size24SemiBold1: size24SemiBold1 ?? this.size24SemiBold1,
|
||||||
size14Bold: size14Bold ?? this.size14Bold,
|
size14Bold: size14Bold ?? this.size14Bold,
|
||||||
size24Bold: size24Bold ?? this.size24Bold,
|
size24Bold: size24Bold ?? this.size24Bold,
|
||||||
size64Black: size64Black ?? this.size64Black,
|
size64Black: size64Black ?? this.size64Black,
|
||||||
@@ -146,9 +204,11 @@ class AppThemeTextStyles extends ThemeExtension<AppThemeTextStyles> {
|
|||||||
if (other is! AppThemeTextStyles) return this;
|
if (other is! AppThemeTextStyles) return this;
|
||||||
return AppThemeTextStyles(
|
return AppThemeTextStyles(
|
||||||
size14Regular: TextStyle.lerp(size14Regular, other.size14Regular, t)!,
|
size14Regular: TextStyle.lerp(size14Regular, other.size14Regular, t)!,
|
||||||
|
size14Regular1: TextStyle.lerp(size14Regular1, other.size14Regular1, t)!,
|
||||||
size16Medium: TextStyle.lerp(size16Medium, other.size16Medium, t)!,
|
size16Medium: TextStyle.lerp(size16Medium, other.size16Medium, t)!,
|
||||||
size16SemiBold: TextStyle.lerp(size16SemiBold, other.size16SemiBold, t)!,
|
size16SemiBold: TextStyle.lerp(size16SemiBold, other.size16SemiBold, t)!,
|
||||||
size24SemiBold: TextStyle.lerp(size24SemiBold, other.size24SemiBold, t)!,
|
size24SemiBold: TextStyle.lerp(size24SemiBold, other.size24SemiBold, t)!,
|
||||||
|
size24SemiBold1: TextStyle.lerp(size24SemiBold1, other.size24SemiBold1, t)!,
|
||||||
size14Bold: TextStyle.lerp(size14Bold, other.size14Bold, t)!,
|
size14Bold: TextStyle.lerp(size14Bold, other.size14Bold, t)!,
|
||||||
size24Bold: TextStyle.lerp(size24Bold, other.size24Bold, t)!,
|
size24Bold: TextStyle.lerp(size24Bold, other.size24Bold, t)!,
|
||||||
size64Black: TextStyle.lerp(size64Black, other.size64Black, t)!,
|
size64Black: TextStyle.lerp(size64Black, other.size64Black, t)!,
|
||||||
|
|||||||
@@ -3,16 +3,68 @@ import 'package:food_delivery_client/core/core.dart';
|
|||||||
|
|
||||||
class AppThemeIcons extends ThemeExtension<AppThemeIcons> {
|
class AppThemeIcons extends ThemeExtension<AppThemeIcons> {
|
||||||
final String icSplash;
|
final String icSplash;
|
||||||
|
final String icArrowLeft;
|
||||||
|
final String icHome;
|
||||||
|
final String icDiscover;
|
||||||
|
final String icCart;
|
||||||
|
final String icCart1;
|
||||||
|
final String icTransactions;
|
||||||
|
final String icProfile;
|
||||||
|
|
||||||
AppThemeIcons({required this.icSplash});
|
AppThemeIcons({
|
||||||
|
required this.icSplash,
|
||||||
|
required this.icArrowLeft,
|
||||||
|
required this.icHome,
|
||||||
|
required this.icDiscover,
|
||||||
|
required this.icCart,
|
||||||
|
required this.icTransactions,
|
||||||
|
required this.icProfile,
|
||||||
|
required this.icCart1,
|
||||||
|
});
|
||||||
|
|
||||||
static AppThemeIcons light = AppThemeIcons(icSplash: AppLightSvgs.icSplash);
|
static AppThemeIcons light = AppThemeIcons(
|
||||||
|
icSplash: AppLightSvgs.icSplash,
|
||||||
|
icArrowLeft: AppLightSvgs.icArrowLeft,
|
||||||
|
icHome: AppLightSvgs.icHome,
|
||||||
|
icDiscover: AppLightSvgs.icDiscover,
|
||||||
|
icCart: AppLightSvgs.icCart,
|
||||||
|
icTransactions: AppLightSvgs.icTransactions,
|
||||||
|
icProfile: AppLightSvgs.icProfile,
|
||||||
|
icCart1: AppLightSvgs.icCart1,
|
||||||
|
);
|
||||||
|
|
||||||
static AppThemeIcons dark = AppThemeIcons(icSplash: AppDarkSvgs.icSplash);
|
static AppThemeIcons dark = AppThemeIcons(
|
||||||
|
icSplash: AppDarkSvgs.icSplash,
|
||||||
|
icArrowLeft: AppDarkSvgs.icArrowLeft,
|
||||||
|
icHome: AppDarkSvgs.icHome,
|
||||||
|
icDiscover: AppDarkSvgs.icDiscover,
|
||||||
|
icCart: AppDarkSvgs.icCart,
|
||||||
|
icTransactions: AppDarkSvgs.icTransactions,
|
||||||
|
icProfile: AppDarkSvgs.icProfile,
|
||||||
|
icCart1: AppDarkSvgs.icCart1,
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ThemeExtension<AppThemeIcons> copyWith({String? icSplash}) {
|
ThemeExtension<AppThemeIcons> copyWith({
|
||||||
return AppThemeIcons(icSplash: icSplash ?? this.icSplash);
|
String? icSplash,
|
||||||
|
String? icArrowLeft,
|
||||||
|
String? icHome,
|
||||||
|
String? icDiscover,
|
||||||
|
String? icCart,
|
||||||
|
String? icCart1,
|
||||||
|
String? icTransactions,
|
||||||
|
String? icProfile,
|
||||||
|
}) {
|
||||||
|
return AppThemeIcons(
|
||||||
|
icSplash: icSplash ?? this.icSplash,
|
||||||
|
icArrowLeft: icArrowLeft ?? this.icArrowLeft,
|
||||||
|
icHome: icHome ?? this.icHome,
|
||||||
|
icDiscover: icDiscover ?? this.icDiscover,
|
||||||
|
icCart: icCart ?? this.icCart,
|
||||||
|
icTransactions: icTransactions ?? this.icTransactions,
|
||||||
|
icProfile: icProfile ?? this.icProfile,
|
||||||
|
icCart1: icCart ?? this.icCart1,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import '../../food_delivery_client.dart';
|
import '../../food_delivery_client.dart';
|
||||||
|
|
||||||
abstract class AppUtils {
|
abstract class AppUtils {
|
||||||
|
static const Gradient kGradient = LinearGradient(
|
||||||
|
end: AlignmentGeometry.bottomCenter,
|
||||||
|
begin: AlignmentGeometry.topCenter,
|
||||||
|
colors: [AppColors.cFF6F00, AppColors.cFFAB40],
|
||||||
|
);
|
||||||
|
|
||||||
static const SizedBox kSizedBox = SizedBox.shrink();
|
static const SizedBox kSizedBox = SizedBox.shrink();
|
||||||
|
|
||||||
static const Radius kRadius = Radius.zero;
|
static const Radius kRadius = Radius.zero;
|
||||||
|
|||||||
138
lib/feature/auth/data/datasource/auth_datasource.dart
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
import 'package:food_delivery_client/core/services/request_handler_service.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/data/models/response/login_response.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/register_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/reset_password_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_otp_code_login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_phone_login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
abstract class AuthDatasource {
|
||||||
|
Future<LoginResponseModel> login({
|
||||||
|
required String phoneNumber,
|
||||||
|
required String password,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<SuccessModel> verifyPhoneResetPassword({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<SuccessModel> verifyOtpCodeResetPassword({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<SuccessModel> resetPassword({required ResetPasswordParams params});
|
||||||
|
|
||||||
|
Future<SuccessModel> verifyPhoneRegister({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<SuccessModel> verifyOtpCodeRegister({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<SuccessModel> register({required RegisterParams params});
|
||||||
|
}
|
||||||
|
|
||||||
|
@LazySingleton(as: AuthDatasource)
|
||||||
|
class AuthDatasourceImpl implements AuthDatasource {
|
||||||
|
final RequestHandlerService _requestHandlerService;
|
||||||
|
|
||||||
|
AuthDatasourceImpl(this._requestHandlerService);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<LoginResponseModel> login({
|
||||||
|
required String phoneNumber,
|
||||||
|
required String password,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequest(
|
||||||
|
path: ApiConst.login,
|
||||||
|
method: RequestMethodEnum.post,
|
||||||
|
data: {"password": password, "phoneNumber": phoneNumber},
|
||||||
|
fromJson: (response) async => LoginResponseModel.fromJson(response.data),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<SuccessModel> register({required RegisterParams params}) async {
|
||||||
|
return _requestHandlerService.handleRequest(
|
||||||
|
path: ApiConst.register,
|
||||||
|
method: RequestMethodEnum.post,
|
||||||
|
|
||||||
|
data: {
|
||||||
|
"firstName": params.firstName,
|
||||||
|
"lastName": params.lastName,
|
||||||
|
"password": params.password,
|
||||||
|
"phoneNumber": params.phoneNumber,
|
||||||
|
},
|
||||||
|
|
||||||
|
fromJson: (response) async {
|
||||||
|
return SuccessModel.fromJson(response.data);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<SuccessModel> resetPassword({
|
||||||
|
required ResetPasswordParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequest(
|
||||||
|
path: ApiConst.resetPassword,
|
||||||
|
method: RequestMethodEnum.post,
|
||||||
|
data: {
|
||||||
|
"newPassword": params.newPassword,
|
||||||
|
"phoneNumber": params.phoneNumber,
|
||||||
|
},
|
||||||
|
|
||||||
|
fromJson: (response) async => SuccessModel.fromJson(response.data),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<SuccessModel> verifyOtpCodeRegister({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequest(
|
||||||
|
path: ApiConst.verifyCode,
|
||||||
|
method: RequestMethodEnum.post,
|
||||||
|
data: {"code": params.otpCode, "phoneNumber": params.phoneNumber},
|
||||||
|
fromJson: (response) async => SuccessModel.fromJson(response.data),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<SuccessModel> verifyOtpCodeResetPassword({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequest(
|
||||||
|
path: ApiConst.forgotPassword,
|
||||||
|
method: RequestMethodEnum.post,
|
||||||
|
data: {"code": params.otpCode, "phoneNumber": params.phoneNumber},
|
||||||
|
fromJson: (response) async => SuccessModel.fromJson(response.data),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<SuccessModel> verifyPhoneRegister({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequest(
|
||||||
|
path: ApiConst.verifyPhone,
|
||||||
|
method: RequestMethodEnum.post,
|
||||||
|
|
||||||
|
data: {"phoneNumber": params.phoneNumber},
|
||||||
|
fromJson: (response) async => SuccessModel.fromJson(response.data),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<SuccessModel> verifyPhoneResetPassword({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequest(
|
||||||
|
path: ApiConst.sendCode,
|
||||||
|
method: RequestMethodEnum.post,
|
||||||
|
data: {"phoneNumber": params.phoneNumber},
|
||||||
|
fromJson: (response) async => SuccessModel.fromJson(response.data),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
lib/feature/auth/data/models/response/login_response.dart
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import 'package:equatable/equatable.dart';
|
||||||
|
|
||||||
|
class LoginResponseModel extends Equatable {
|
||||||
|
final String token;
|
||||||
|
|
||||||
|
const LoginResponseModel({required this.token});
|
||||||
|
|
||||||
|
factory LoginResponseModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
return LoginResponseModel(
|
||||||
|
token: json['token'] as String,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
'token': token,
|
||||||
|
};
|
||||||
|
|
||||||
|
LoginResponseModel copyWith({String? token}) {
|
||||||
|
return LoginResponseModel(
|
||||||
|
token: token ?? this.token,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [token];
|
||||||
|
}
|
||||||
90
lib/feature/auth/data/repository/auth_repository_impl.dart
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/core/services/request_handler_service.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/data/datasource/auth_datasource.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/data/models/response/login_response.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../../domain/repository/auth_repository.dart';
|
||||||
|
import '../../domain/usecases/register_usecase.dart';
|
||||||
|
import '../../domain/usecases/reset_password_usecase.dart';
|
||||||
|
import '../../domain/usecases/verify_otp_code_login_usecase.dart';
|
||||||
|
import '../../domain/usecases/verify_phone_login_usecase.dart';
|
||||||
|
|
||||||
|
|
||||||
|
@LazySingleton(as: AuthRepository)
|
||||||
|
class AuthRepositoryImpl implements AuthRepository {
|
||||||
|
final RequestHandlerService _requestHandlerService;
|
||||||
|
final AuthDatasource _authDatasource;
|
||||||
|
|
||||||
|
AuthRepositoryImpl(this._requestHandlerService, this._authDatasource);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, LoginResponseModel>> login({
|
||||||
|
required String phoneNumber,
|
||||||
|
required String password,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequestInRepository(
|
||||||
|
onRequest: () async {
|
||||||
|
return _authDatasource.login(
|
||||||
|
phoneNumber: phoneNumber,
|
||||||
|
password: password,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> register({
|
||||||
|
required RegisterParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequestInRepository(
|
||||||
|
onRequest: () async => _authDatasource.register(params: params),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> resetPassword({
|
||||||
|
required ResetPasswordParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequestInRepository(
|
||||||
|
onRequest: () => _authDatasource.resetPassword(params: params),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyOtpCodeRegister({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequestInRepository(
|
||||||
|
onRequest: () => _authDatasource.verifyOtpCodeRegister(params: params),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyOtpCodeResetPassword({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequestInRepository(
|
||||||
|
onRequest: () =>
|
||||||
|
_authDatasource.verifyOtpCodeResetPassword(params: params),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyPhoneRegister({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequestInRepository(
|
||||||
|
onRequest: () => _authDatasource.verifyPhoneRegister(params: params),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyPhoneResetPassword({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
}) async {
|
||||||
|
return _requestHandlerService.handleRequestInRepository(
|
||||||
|
onRequest: () => _authDatasource.verifyPhoneResetPassword(params: params),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
43
lib/feature/auth/domain/repository/auth_repository.dart
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/core/services/request_handler_service.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/data/datasource/auth_datasource.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/data/models/response/login_response.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../usecases/register_usecase.dart';
|
||||||
|
import '../usecases/reset_password_usecase.dart';
|
||||||
|
import '../usecases/verify_otp_code_login_usecase.dart';
|
||||||
|
import '../usecases/verify_phone_login_usecase.dart';
|
||||||
|
|
||||||
|
abstract class AuthRepository {
|
||||||
|
Future<Either<Failure, LoginResponseModel>> login({
|
||||||
|
required String phoneNumber,
|
||||||
|
required String password,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyPhoneResetPassword({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyOtpCodeResetPassword({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Either<Failure, SuccessModel>> resetPassword({
|
||||||
|
required ResetPasswordParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyPhoneRegister({
|
||||||
|
required VerifyPhoneNumberParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Either<Failure, SuccessModel>> verifyOtpCodeRegister({
|
||||||
|
required VerifyOtpCodeParams params,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Either<Failure, SuccessModel>> register({
|
||||||
|
required RegisterParams params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
26
lib/feature/auth/domain/usecases/login_usecase.dart
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/core/usecase/usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/data/models/response/login_response.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
@injectable
|
||||||
|
class LoginUseCase implements UseCase<LoginResponseModel, LoginParams> {
|
||||||
|
final AuthRepository _authRepository;
|
||||||
|
|
||||||
|
LoginUseCase(this._authRepository);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, LoginResponseModel>> call(LoginParams params) async {
|
||||||
|
return _authRepository.login(
|
||||||
|
phoneNumber: params.phoneNumber,
|
||||||
|
password: params.password,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LoginParams {
|
||||||
|
final String phoneNumber;
|
||||||
|
final String password;
|
||||||
|
|
||||||
|
LoginParams({required this.phoneNumber, required this.password});
|
||||||
|
}
|
||||||
32
lib/feature/auth/domain/usecases/register_usecase.dart
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/core/exceptions/failure.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/common.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../../../../core/usecase/usecase.dart';
|
||||||
|
@injectable
|
||||||
|
class RegisterUseCase implements UseCase<SuccessModel, RegisterParams> {
|
||||||
|
final AuthRepository _authRepository;
|
||||||
|
|
||||||
|
RegisterUseCase(this._authRepository);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> call(RegisterParams params) async {
|
||||||
|
return _authRepository.register(params: params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RegisterParams {
|
||||||
|
final String firstName;
|
||||||
|
final String lastName;
|
||||||
|
final String phoneNumber;
|
||||||
|
final String password;
|
||||||
|
|
||||||
|
RegisterParams({
|
||||||
|
required this.firstName,
|
||||||
|
required this.lastName,
|
||||||
|
required this.phoneNumber,
|
||||||
|
required this.password,
|
||||||
|
});
|
||||||
|
}
|
||||||
26
lib/feature/auth/domain/usecases/reset_password_usecase.dart
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/core/exceptions/failure.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/common.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../../../../core/usecase/usecase.dart';
|
||||||
|
@injectable
|
||||||
|
class ResetPasswordUseCase
|
||||||
|
implements UseCase<SuccessModel, ResetPasswordParams> {
|
||||||
|
final AuthRepository _authRepository;
|
||||||
|
|
||||||
|
ResetPasswordUseCase(this._authRepository);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> call(ResetPasswordParams params) async {
|
||||||
|
return _authRepository.resetPassword(params: params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ResetPasswordParams {
|
||||||
|
final String newPassword;
|
||||||
|
final String phoneNumber;
|
||||||
|
|
||||||
|
ResetPasswordParams({required this.newPassword, required this.phoneNumber});
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../../../../core/usecase/usecase.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class VerifyOtpCodeForgotPasswordUseCase
|
||||||
|
implements UseCase<SuccessModel, VerifyOtpCodeParams> {
|
||||||
|
final AuthRepository _authRepository;
|
||||||
|
|
||||||
|
VerifyOtpCodeForgotPasswordUseCase(this._authRepository);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> call(VerifyOtpCodeParams params) async {
|
||||||
|
return _authRepository.verifyOtpCodeResetPassword(params: params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class VerifyOtpCodeParams {
|
||||||
|
final dynamic otpCode;
|
||||||
|
final String phoneNumber;
|
||||||
|
|
||||||
|
VerifyOtpCodeParams({required this.otpCode, required this.phoneNumber});
|
||||||
|
}
|
||||||
|
|
||||||
|
class OtpCodePageParams {
|
||||||
|
final String phoneNumber;
|
||||||
|
final bool isRegister;
|
||||||
|
|
||||||
|
OtpCodePageParams({required this.phoneNumber, required this.isRegister});
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_otp_code_login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../../../../core/usecase/usecase.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class VerifyOtpCodeRegisterUseCase
|
||||||
|
implements UseCase<SuccessModel, VerifyOtpCodeParams> {
|
||||||
|
final AuthRepository _authRepository;
|
||||||
|
|
||||||
|
VerifyOtpCodeRegisterUseCase(this._authRepository);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> call(VerifyOtpCodeParams params) async {
|
||||||
|
return _authRepository.verifyOtpCodeRegister(params: params);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/core/exceptions/failure.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/common.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../../../../core/usecase/usecase.dart';
|
||||||
|
@injectable
|
||||||
|
class VerifyPhoneNumberLoginUseCase
|
||||||
|
implements UseCase<SuccessModel, VerifyPhoneNumberParams> {
|
||||||
|
final AuthRepository _authRepository;
|
||||||
|
|
||||||
|
VerifyPhoneNumberLoginUseCase(this._authRepository);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> call(
|
||||||
|
VerifyPhoneNumberParams params,
|
||||||
|
) async {
|
||||||
|
return _authRepository.verifyPhoneResetPassword(params: params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class VerifyPhoneNumberParams {
|
||||||
|
final String phoneNumber;
|
||||||
|
|
||||||
|
VerifyPhoneNumberParams({required this.phoneNumber});
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_phone_login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
import '../../../../core/usecase/usecase.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class VerifyPhoneRegisterUseCase
|
||||||
|
implements UseCase<SuccessModel, VerifyPhoneNumberParams> {
|
||||||
|
final AuthRepository _authRepository;
|
||||||
|
|
||||||
|
VerifyPhoneRegisterUseCase(this._authRepository);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<Failure, SuccessModel>> call(
|
||||||
|
VerifyPhoneNumberParams params,
|
||||||
|
) async {
|
||||||
|
return _authRepository.verifyPhoneRegister(params: params);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/w_toastification.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
part 'login_event.dart';
|
||||||
|
|
||||||
|
part 'login_state.dart';
|
||||||
|
|
||||||
|
part 'login_bloc.freezed.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class LoginBloc extends Bloc<LoginEvent, LoginState> {
|
||||||
|
final LoginUseCase _loginUseCase;
|
||||||
|
final StorageService _storageService;
|
||||||
|
|
||||||
|
LoginBloc(this._loginUseCase, this._storageService)
|
||||||
|
: super(const LoginState()) {
|
||||||
|
on<_Login>(_onLogin);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onLogin(_Login event, Emitter<LoginState> emit) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
|
||||||
|
final response = await _loginUseCase.call(event.params);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
log("${l.errorMessage}");
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(status: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
showSuccessToast("Login success");
|
||||||
|
_storageService.setString(key: AppLocaleKeys.token, value: r.token);
|
||||||
|
final token = _storageService.getString(key: AppLocaleKeys.token);
|
||||||
|
log('Token:$token');
|
||||||
|
emit(state.copyWith(status: RequestStatus.loaded));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,535 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
|
part of 'login_bloc.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$LoginEvent {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoginEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'LoginEvent()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $LoginEventCopyWith<$Res> {
|
||||||
|
$LoginEventCopyWith(LoginEvent _, $Res Function(LoginEvent) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [LoginEvent].
|
||||||
|
extension LoginEventPatterns on LoginEvent {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _Checked value)? checked,TResult Function( _Login value)? login,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Checked() when checked != null:
|
||||||
|
return checked(_that);case _Login() when login != null:
|
||||||
|
return login(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _Checked value) checked,required TResult Function( _Login value) login,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Checked():
|
||||||
|
return checked(_that);case _Login():
|
||||||
|
return login(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _Checked value)? checked,TResult? Function( _Login value)? login,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Checked() when checked != null:
|
||||||
|
return checked(_that);case _Login() when login != null:
|
||||||
|
return login(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? checked,TResult Function( LoginParams params)? login,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Checked() when checked != null:
|
||||||
|
return checked();case _Login() when login != null:
|
||||||
|
return login(_that.params);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() checked,required TResult Function( LoginParams params) login,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Checked():
|
||||||
|
return checked();case _Login():
|
||||||
|
return login(_that.params);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? checked,TResult? Function( LoginParams params)? login,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Checked() when checked != null:
|
||||||
|
return checked();case _Login() when login != null:
|
||||||
|
return login(_that.params);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Checked implements LoginEvent {
|
||||||
|
const _Checked();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'LoginEvent.checked()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Login implements LoginEvent {
|
||||||
|
const _Login(this.params);
|
||||||
|
|
||||||
|
|
||||||
|
final LoginParams params;
|
||||||
|
|
||||||
|
/// Create a copy of LoginEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$LoginCopyWith<_Login> get copyWith => __$LoginCopyWithImpl<_Login>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Login&&(identical(other.params, params) || other.params == params));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,params);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'LoginEvent.login(params: $params)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$LoginCopyWith<$Res> implements $LoginEventCopyWith<$Res> {
|
||||||
|
factory _$LoginCopyWith(_Login value, $Res Function(_Login) _then) = __$LoginCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
LoginParams params
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$LoginCopyWithImpl<$Res>
|
||||||
|
implements _$LoginCopyWith<$Res> {
|
||||||
|
__$LoginCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _Login _self;
|
||||||
|
final $Res Function(_Login) _then;
|
||||||
|
|
||||||
|
/// Create a copy of LoginEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? params = null,}) {
|
||||||
|
return _then(_Login(
|
||||||
|
null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable
|
||||||
|
as LoginParams,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$LoginState {
|
||||||
|
|
||||||
|
RequestStatus get status;
|
||||||
|
/// Create a copy of LoginState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$LoginStateCopyWith<LoginState> get copyWith => _$LoginStateCopyWithImpl<LoginState>(this as LoginState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoginState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'LoginState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $LoginStateCopyWith<$Res> {
|
||||||
|
factory $LoginStateCopyWith(LoginState value, $Res Function(LoginState) _then) = _$LoginStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$LoginStateCopyWithImpl<$Res>
|
||||||
|
implements $LoginStateCopyWith<$Res> {
|
||||||
|
_$LoginStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final LoginState _self;
|
||||||
|
final $Res Function(LoginState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of LoginState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [LoginState].
|
||||||
|
extension LoginStatePatterns on LoginState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _LoginState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LoginState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _LoginState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LoginState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _LoginState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LoginState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( RequestStatus status)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LoginState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( RequestStatus status) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LoginState():
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( RequestStatus status)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LoginState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _LoginState implements LoginState {
|
||||||
|
const _LoginState({this.status = RequestStatus.initial});
|
||||||
|
|
||||||
|
|
||||||
|
@override@JsonKey() final RequestStatus status;
|
||||||
|
|
||||||
|
/// Create a copy of LoginState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$LoginStateCopyWith<_LoginState> get copyWith => __$LoginStateCopyWithImpl<_LoginState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoginState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'LoginState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$LoginStateCopyWith<$Res> implements $LoginStateCopyWith<$Res> {
|
||||||
|
factory _$LoginStateCopyWith(_LoginState value, $Res Function(_LoginState) _then) = __$LoginStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$LoginStateCopyWithImpl<$Res>
|
||||||
|
implements _$LoginStateCopyWith<$Res> {
|
||||||
|
__$LoginStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _LoginState _self;
|
||||||
|
final $Res Function(_LoginState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of LoginState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,}) {
|
||||||
|
return _then(_LoginState(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'login_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class LoginEvent with _$LoginEvent {
|
||||||
|
const factory LoginEvent.checked() = _Checked;
|
||||||
|
|
||||||
|
const factory LoginEvent.login(LoginParams params) = _Login;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'login_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class LoginState with _$LoginState {
|
||||||
|
const factory LoginState({
|
||||||
|
@Default(RequestStatus.initial) RequestStatus status,
|
||||||
|
}) = _LoginState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/register_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/w_toastification.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
part 'register_event.dart';
|
||||||
|
|
||||||
|
part 'register_state.dart';
|
||||||
|
|
||||||
|
part 'register_bloc.freezed.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class RegisterBloc extends Bloc<RegisterEvent, RegisterState> {
|
||||||
|
final RegisterUseCase _registerUseCase;
|
||||||
|
|
||||||
|
RegisterBloc(this._registerUseCase) : super(const RegisterState()) {
|
||||||
|
on<_Loaded>(_onLoaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onLoaded(_Loaded event, Emitter<RegisterState> emit) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
|
||||||
|
final response = await _registerUseCase.call(event.params);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(status: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
showSuccessToast(r.message);
|
||||||
|
emit(state.copyWith(status: RequestStatus.loaded));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,535 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
|
part of 'register_bloc.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$RegisterEvent {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is RegisterEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RegisterEvent()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $RegisterEventCopyWith<$Res> {
|
||||||
|
$RegisterEventCopyWith(RegisterEvent _, $Res Function(RegisterEvent) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [RegisterEvent].
|
||||||
|
extension RegisterEventPatterns on RegisterEvent {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _Started value)? started,TResult Function( _Loaded value)? loaded,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _Started value) started,required TResult Function( _Loaded value) loaded,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started(_that);case _Loaded():
|
||||||
|
return loaded(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _Started value)? started,TResult? Function( _Loaded value)? loaded,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? started,TResult Function( RegisterParams params)? loaded,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that.params);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() started,required TResult Function( RegisterParams params) loaded,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started();case _Loaded():
|
||||||
|
return loaded(_that.params);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? started,TResult? Function( RegisterParams params)? loaded,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that.params);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Started implements RegisterEvent {
|
||||||
|
const _Started();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RegisterEvent.started()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Loaded implements RegisterEvent {
|
||||||
|
const _Loaded(this.params);
|
||||||
|
|
||||||
|
|
||||||
|
final RegisterParams params;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$LoadedCopyWith<_Loaded> get copyWith => __$LoadedCopyWithImpl<_Loaded>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Loaded&&(identical(other.params, params) || other.params == params));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,params);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RegisterEvent.loaded(params: $params)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$LoadedCopyWith<$Res> implements $RegisterEventCopyWith<$Res> {
|
||||||
|
factory _$LoadedCopyWith(_Loaded value, $Res Function(_Loaded) _then) = __$LoadedCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
RegisterParams params
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$LoadedCopyWithImpl<$Res>
|
||||||
|
implements _$LoadedCopyWith<$Res> {
|
||||||
|
__$LoadedCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _Loaded _self;
|
||||||
|
final $Res Function(_Loaded) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? params = null,}) {
|
||||||
|
return _then(_Loaded(
|
||||||
|
null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RegisterParams,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$RegisterState {
|
||||||
|
|
||||||
|
RequestStatus get status;
|
||||||
|
/// Create a copy of RegisterState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$RegisterStateCopyWith<RegisterState> get copyWith => _$RegisterStateCopyWithImpl<RegisterState>(this as RegisterState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is RegisterState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RegisterState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $RegisterStateCopyWith<$Res> {
|
||||||
|
factory $RegisterStateCopyWith(RegisterState value, $Res Function(RegisterState) _then) = _$RegisterStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$RegisterStateCopyWithImpl<$Res>
|
||||||
|
implements $RegisterStateCopyWith<$Res> {
|
||||||
|
_$RegisterStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final RegisterState _self;
|
||||||
|
final $Res Function(RegisterState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [RegisterState].
|
||||||
|
extension RegisterStatePatterns on RegisterState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RegisterState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RegisterState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RegisterState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RegisterState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RegisterState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RegisterState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( RequestStatus status)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RegisterState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( RequestStatus status) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RegisterState():
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( RequestStatus status)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RegisterState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _RegisterState implements RegisterState {
|
||||||
|
const _RegisterState({this.status = RequestStatus.initial});
|
||||||
|
|
||||||
|
|
||||||
|
@override@JsonKey() final RequestStatus status;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$RegisterStateCopyWith<_RegisterState> get copyWith => __$RegisterStateCopyWithImpl<_RegisterState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RegisterState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RegisterState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$RegisterStateCopyWith<$Res> implements $RegisterStateCopyWith<$Res> {
|
||||||
|
factory _$RegisterStateCopyWith(_RegisterState value, $Res Function(_RegisterState) _then) = __$RegisterStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$RegisterStateCopyWithImpl<$Res>
|
||||||
|
implements _$RegisterStateCopyWith<$Res> {
|
||||||
|
__$RegisterStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _RegisterState _self;
|
||||||
|
final $Res Function(_RegisterState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,}) {
|
||||||
|
return _then(_RegisterState(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'register_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class RegisterEvent with _$RegisterEvent {
|
||||||
|
const factory RegisterEvent.started() = _Started;
|
||||||
|
const factory RegisterEvent.loaded(RegisterParams params) = _Loaded;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'register_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class RegisterState with _$RegisterState {
|
||||||
|
const factory RegisterState({
|
||||||
|
@Default(RequestStatus.initial) RequestStatus status,
|
||||||
|
}) = _RegisterState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/reset_password_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/w_toastification.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
part 'reset_password_event.dart';
|
||||||
|
|
||||||
|
part 'reset_password_state.dart';
|
||||||
|
|
||||||
|
part 'reset_password_bloc.freezed.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class ResetPasswordBloc extends Bloc<ResetPasswordEvent, ResetPasswordState> {
|
||||||
|
final ResetPasswordUseCase _passwordUseCase;
|
||||||
|
|
||||||
|
ResetPasswordBloc(this._passwordUseCase) : super(const ResetPasswordState()) {
|
||||||
|
on<_Loaded>(_onLoaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onLoaded(
|
||||||
|
_Loaded event,
|
||||||
|
Emitter<ResetPasswordState> emit,
|
||||||
|
) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
final response = await _passwordUseCase.call(event.params);
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(status: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
showSuccessToast(r.message);
|
||||||
|
emit(state.copyWith(status: RequestStatus.loaded));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,535 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
|
part of 'reset_password_bloc.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ResetPasswordEvent {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ResetPasswordEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ResetPasswordEvent()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $ResetPasswordEventCopyWith<$Res> {
|
||||||
|
$ResetPasswordEventCopyWith(ResetPasswordEvent _, $Res Function(ResetPasswordEvent) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [ResetPasswordEvent].
|
||||||
|
extension ResetPasswordEventPatterns on ResetPasswordEvent {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _Started value)? started,TResult Function( _Loaded value)? loaded,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _Started value) started,required TResult Function( _Loaded value) loaded,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started(_that);case _Loaded():
|
||||||
|
return loaded(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _Started value)? started,TResult? Function( _Loaded value)? loaded,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? started,TResult Function( ResetPasswordParams params)? loaded,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that.params);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() started,required TResult Function( ResetPasswordParams params) loaded,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started();case _Loaded():
|
||||||
|
return loaded(_that.params);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? started,TResult? Function( ResetPasswordParams params)? loaded,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _Loaded() when loaded != null:
|
||||||
|
return loaded(_that.params);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Started implements ResetPasswordEvent {
|
||||||
|
const _Started();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ResetPasswordEvent.started()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Loaded implements ResetPasswordEvent {
|
||||||
|
const _Loaded(this.params);
|
||||||
|
|
||||||
|
|
||||||
|
final ResetPasswordParams params;
|
||||||
|
|
||||||
|
/// Create a copy of ResetPasswordEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$LoadedCopyWith<_Loaded> get copyWith => __$LoadedCopyWithImpl<_Loaded>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Loaded&&(identical(other.params, params) || other.params == params));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,params);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ResetPasswordEvent.loaded(params: $params)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$LoadedCopyWith<$Res> implements $ResetPasswordEventCopyWith<$Res> {
|
||||||
|
factory _$LoadedCopyWith(_Loaded value, $Res Function(_Loaded) _then) = __$LoadedCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
ResetPasswordParams params
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$LoadedCopyWithImpl<$Res>
|
||||||
|
implements _$LoadedCopyWith<$Res> {
|
||||||
|
__$LoadedCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _Loaded _self;
|
||||||
|
final $Res Function(_Loaded) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ResetPasswordEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? params = null,}) {
|
||||||
|
return _then(_Loaded(
|
||||||
|
null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable
|
||||||
|
as ResetPasswordParams,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ResetPasswordState {
|
||||||
|
|
||||||
|
RequestStatus get status;
|
||||||
|
/// Create a copy of ResetPasswordState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ResetPasswordStateCopyWith<ResetPasswordState> get copyWith => _$ResetPasswordStateCopyWithImpl<ResetPasswordState>(this as ResetPasswordState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ResetPasswordState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ResetPasswordState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ResetPasswordStateCopyWith<$Res> {
|
||||||
|
factory $ResetPasswordStateCopyWith(ResetPasswordState value, $Res Function(ResetPasswordState) _then) = _$ResetPasswordStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ResetPasswordStateCopyWithImpl<$Res>
|
||||||
|
implements $ResetPasswordStateCopyWith<$Res> {
|
||||||
|
_$ResetPasswordStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ResetPasswordState _self;
|
||||||
|
final $Res Function(ResetPasswordState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ResetPasswordState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [ResetPasswordState].
|
||||||
|
extension ResetPasswordStatePatterns on ResetPasswordState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ResetPasswordState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ResetPasswordState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ResetPasswordState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ResetPasswordState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ResetPasswordState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ResetPasswordState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( RequestStatus status)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ResetPasswordState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( RequestStatus status) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ResetPasswordState():
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( RequestStatus status)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ResetPasswordState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _ResetPasswordState implements ResetPasswordState {
|
||||||
|
const _ResetPasswordState({this.status = RequestStatus.initial});
|
||||||
|
|
||||||
|
|
||||||
|
@override@JsonKey() final RequestStatus status;
|
||||||
|
|
||||||
|
/// Create a copy of ResetPasswordState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$ResetPasswordStateCopyWith<_ResetPasswordState> get copyWith => __$ResetPasswordStateCopyWithImpl<_ResetPasswordState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ResetPasswordState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ResetPasswordState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$ResetPasswordStateCopyWith<$Res> implements $ResetPasswordStateCopyWith<$Res> {
|
||||||
|
factory _$ResetPasswordStateCopyWith(_ResetPasswordState value, $Res Function(_ResetPasswordState) _then) = __$ResetPasswordStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$ResetPasswordStateCopyWithImpl<$Res>
|
||||||
|
implements _$ResetPasswordStateCopyWith<$Res> {
|
||||||
|
__$ResetPasswordStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _ResetPasswordState _self;
|
||||||
|
final $Res Function(_ResetPasswordState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ResetPasswordState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,}) {
|
||||||
|
return _then(_ResetPasswordState(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'reset_password_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class ResetPasswordEvent with _$ResetPasswordEvent {
|
||||||
|
const factory ResetPasswordEvent.started() = _Started;
|
||||||
|
|
||||||
|
const factory ResetPasswordEvent.loaded(ResetPasswordParams params) = _Loaded;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'reset_password_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class ResetPasswordState with _$ResetPasswordState {
|
||||||
|
const factory ResetPasswordState({
|
||||||
|
@Default(RequestStatus.initial) RequestStatus status,
|
||||||
|
}) = _ResetPasswordState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_otp_code_login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_otp_code_register_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_phone_login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_phone_register_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/w_toastification.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
part 'verify_otp_event.dart';
|
||||||
|
|
||||||
|
part 'verify_otp_state.dart';
|
||||||
|
|
||||||
|
part 'verify_otp_bloc.freezed.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class VerifyOtpBloc extends Bloc<VerifyOtpEvent, VerifyOtpState> {
|
||||||
|
final VerifyOtpCodeRegisterUseCase _registerUseCase;
|
||||||
|
final VerifyOtpCodeForgotPasswordUseCase _passwordUseCase;
|
||||||
|
final VerifyPhoneRegisterUseCase _phoneRegisterUseCase;
|
||||||
|
final VerifyPhoneNumberLoginUseCase _phoneNumberLoginUseCase;
|
||||||
|
|
||||||
|
VerifyOtpBloc(
|
||||||
|
this._registerUseCase,
|
||||||
|
this._passwordUseCase,
|
||||||
|
this._phoneRegisterUseCase,
|
||||||
|
this._phoneNumberLoginUseCase,
|
||||||
|
) : super(const VerifyOtpState()) {
|
||||||
|
Timer? timer1;
|
||||||
|
|
||||||
|
on<_CancelTimer>((event, emit) {
|
||||||
|
timer1?.cancel();
|
||||||
|
});
|
||||||
|
|
||||||
|
on<_Started>((event, emit) {
|
||||||
|
int seconds = state.time;
|
||||||
|
emit(state.copyWith(time: seconds));
|
||||||
|
timer1 = Timer.periodic(TimeDelayConst.duration1, (timer) {
|
||||||
|
if (seconds == 0) {
|
||||||
|
timer.cancel();
|
||||||
|
} else {
|
||||||
|
seconds--;
|
||||||
|
add(VerifyOtpEvent.ticked(seconds));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
on<_Ticked>(_onTicked);
|
||||||
|
on<_VerifyOtpReset>(_onVerifyOtpReset);
|
||||||
|
on<_VerifyOtpRegister>(_onVerifyOtpRegister);
|
||||||
|
on<_ResendRegister>(_onResendVerifyPhoneRegister);
|
||||||
|
on<_ResendForgot>(_onResendVerifyPhoneForgot);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onTicked(_Ticked event, Emitter<VerifyOtpState> emit) {
|
||||||
|
emit(state.copyWith(time: event.seconds));
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onVerifyOtpReset(
|
||||||
|
_VerifyOtpReset event,
|
||||||
|
Emitter<VerifyOtpState> emit,
|
||||||
|
) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
final response = await _passwordUseCase.call(event.params);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(status: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
showSuccessToast(r.message);
|
||||||
|
emit(state.copyWith(status: RequestStatus.loaded));
|
||||||
|
add(VerifyOtpEvent.cancelTimer());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onVerifyOtpRegister(
|
||||||
|
_VerifyOtpRegister event,
|
||||||
|
Emitter<VerifyOtpState> emit,
|
||||||
|
) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
final response = await _registerUseCase.call(event.params);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(status: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
showSuccessToast(r.message);
|
||||||
|
emit(state.copyWith(status: RequestStatus.loaded));
|
||||||
|
add(VerifyOtpEvent.cancelTimer());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onResendVerifyPhoneRegister(
|
||||||
|
_ResendRegister event,
|
||||||
|
Emitter<VerifyOtpState> emit,
|
||||||
|
) async {
|
||||||
|
emit(state.copyWith(resendStatus: RequestStatus.loading));
|
||||||
|
final response = await _phoneRegisterUseCase.call(
|
||||||
|
VerifyPhoneNumberParams(phoneNumber: event.phoneNUmber),
|
||||||
|
);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(resendStatus: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
emit(state.copyWith(resendStatus: RequestStatus.loaded));
|
||||||
|
add(VerifyOtpEvent.ticked(120));
|
||||||
|
add(VerifyOtpEvent.started());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onResendVerifyPhoneForgot(
|
||||||
|
_ResendForgot event,
|
||||||
|
Emitter<VerifyOtpState> emit,
|
||||||
|
) async {
|
||||||
|
emit(state.copyWith(resendStatus: RequestStatus.loading));
|
||||||
|
final response = await _phoneNumberLoginUseCase.call(
|
||||||
|
VerifyPhoneNumberParams(phoneNumber: event.phoneNUmber),
|
||||||
|
);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(resendStatus: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
emit(state.copyWith(resendStatus: RequestStatus.loaded));
|
||||||
|
add(VerifyOtpEvent.ticked(120));
|
||||||
|
add(VerifyOtpEvent.started());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,867 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
|
part of 'verify_otp_bloc.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$VerifyOtpEvent {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is VerifyOtpEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $VerifyOtpEventCopyWith<$Res> {
|
||||||
|
$VerifyOtpEventCopyWith(VerifyOtpEvent _, $Res Function(VerifyOtpEvent) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [VerifyOtpEvent].
|
||||||
|
extension VerifyOtpEventPatterns on VerifyOtpEvent {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _Started value)? started,TResult Function( _CancelTimer value)? cancelTimer,TResult Function( _ResendRegister value)? resendRegister,TResult Function( _ResendForgot value)? resendForgot,TResult Function( _Ticked value)? ticked,TResult Function( _VerifyOtpReset value)? verifyOtpReset,TResult Function( _VerifyOtpRegister value)? verifyOtpRegister,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _CancelTimer() when cancelTimer != null:
|
||||||
|
return cancelTimer(_that);case _ResendRegister() when resendRegister != null:
|
||||||
|
return resendRegister(_that);case _ResendForgot() when resendForgot != null:
|
||||||
|
return resendForgot(_that);case _Ticked() when ticked != null:
|
||||||
|
return ticked(_that);case _VerifyOtpReset() when verifyOtpReset != null:
|
||||||
|
return verifyOtpReset(_that);case _VerifyOtpRegister() when verifyOtpRegister != null:
|
||||||
|
return verifyOtpRegister(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _Started value) started,required TResult Function( _CancelTimer value) cancelTimer,required TResult Function( _ResendRegister value) resendRegister,required TResult Function( _ResendForgot value) resendForgot,required TResult Function( _Ticked value) ticked,required TResult Function( _VerifyOtpReset value) verifyOtpReset,required TResult Function( _VerifyOtpRegister value) verifyOtpRegister,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started(_that);case _CancelTimer():
|
||||||
|
return cancelTimer(_that);case _ResendRegister():
|
||||||
|
return resendRegister(_that);case _ResendForgot():
|
||||||
|
return resendForgot(_that);case _Ticked():
|
||||||
|
return ticked(_that);case _VerifyOtpReset():
|
||||||
|
return verifyOtpReset(_that);case _VerifyOtpRegister():
|
||||||
|
return verifyOtpRegister(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _Started value)? started,TResult? Function( _CancelTimer value)? cancelTimer,TResult? Function( _ResendRegister value)? resendRegister,TResult? Function( _ResendForgot value)? resendForgot,TResult? Function( _Ticked value)? ticked,TResult? Function( _VerifyOtpReset value)? verifyOtpReset,TResult? Function( _VerifyOtpRegister value)? verifyOtpRegister,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _CancelTimer() when cancelTimer != null:
|
||||||
|
return cancelTimer(_that);case _ResendRegister() when resendRegister != null:
|
||||||
|
return resendRegister(_that);case _ResendForgot() when resendForgot != null:
|
||||||
|
return resendForgot(_that);case _Ticked() when ticked != null:
|
||||||
|
return ticked(_that);case _VerifyOtpReset() when verifyOtpReset != null:
|
||||||
|
return verifyOtpReset(_that);case _VerifyOtpRegister() when verifyOtpRegister != null:
|
||||||
|
return verifyOtpRegister(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? started,TResult Function()? cancelTimer,TResult Function( String phoneNUmber)? resendRegister,TResult Function( String phoneNUmber)? resendForgot,TResult Function( int seconds)? ticked,TResult Function( VerifyOtpCodeParams params)? verifyOtpReset,TResult Function( VerifyOtpCodeParams params)? verifyOtpRegister,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _CancelTimer() when cancelTimer != null:
|
||||||
|
return cancelTimer();case _ResendRegister() when resendRegister != null:
|
||||||
|
return resendRegister(_that.phoneNUmber);case _ResendForgot() when resendForgot != null:
|
||||||
|
return resendForgot(_that.phoneNUmber);case _Ticked() when ticked != null:
|
||||||
|
return ticked(_that.seconds);case _VerifyOtpReset() when verifyOtpReset != null:
|
||||||
|
return verifyOtpReset(_that.params);case _VerifyOtpRegister() when verifyOtpRegister != null:
|
||||||
|
return verifyOtpRegister(_that.params);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() started,required TResult Function() cancelTimer,required TResult Function( String phoneNUmber) resendRegister,required TResult Function( String phoneNUmber) resendForgot,required TResult Function( int seconds) ticked,required TResult Function( VerifyOtpCodeParams params) verifyOtpReset,required TResult Function( VerifyOtpCodeParams params) verifyOtpRegister,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started();case _CancelTimer():
|
||||||
|
return cancelTimer();case _ResendRegister():
|
||||||
|
return resendRegister(_that.phoneNUmber);case _ResendForgot():
|
||||||
|
return resendForgot(_that.phoneNUmber);case _Ticked():
|
||||||
|
return ticked(_that.seconds);case _VerifyOtpReset():
|
||||||
|
return verifyOtpReset(_that.params);case _VerifyOtpRegister():
|
||||||
|
return verifyOtpRegister(_that.params);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? started,TResult? Function()? cancelTimer,TResult? Function( String phoneNUmber)? resendRegister,TResult? Function( String phoneNUmber)? resendForgot,TResult? Function( int seconds)? ticked,TResult? Function( VerifyOtpCodeParams params)? verifyOtpReset,TResult? Function( VerifyOtpCodeParams params)? verifyOtpRegister,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _CancelTimer() when cancelTimer != null:
|
||||||
|
return cancelTimer();case _ResendRegister() when resendRegister != null:
|
||||||
|
return resendRegister(_that.phoneNUmber);case _ResendForgot() when resendForgot != null:
|
||||||
|
return resendForgot(_that.phoneNUmber);case _Ticked() when ticked != null:
|
||||||
|
return ticked(_that.seconds);case _VerifyOtpReset() when verifyOtpReset != null:
|
||||||
|
return verifyOtpReset(_that.params);case _VerifyOtpRegister() when verifyOtpRegister != null:
|
||||||
|
return verifyOtpRegister(_that.params);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Started implements VerifyOtpEvent {
|
||||||
|
const _Started();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent.started()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _CancelTimer implements VerifyOtpEvent {
|
||||||
|
const _CancelTimer();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CancelTimer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent.cancelTimer()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _ResendRegister implements VerifyOtpEvent {
|
||||||
|
const _ResendRegister(this.phoneNUmber);
|
||||||
|
|
||||||
|
|
||||||
|
final String phoneNUmber;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$ResendRegisterCopyWith<_ResendRegister> get copyWith => __$ResendRegisterCopyWithImpl<_ResendRegister>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ResendRegister&&(identical(other.phoneNUmber, phoneNUmber) || other.phoneNUmber == phoneNUmber));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,phoneNUmber);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent.resendRegister(phoneNUmber: $phoneNUmber)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$ResendRegisterCopyWith<$Res> implements $VerifyOtpEventCopyWith<$Res> {
|
||||||
|
factory _$ResendRegisterCopyWith(_ResendRegister value, $Res Function(_ResendRegister) _then) = __$ResendRegisterCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String phoneNUmber
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$ResendRegisterCopyWithImpl<$Res>
|
||||||
|
implements _$ResendRegisterCopyWith<$Res> {
|
||||||
|
__$ResendRegisterCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _ResendRegister _self;
|
||||||
|
final $Res Function(_ResendRegister) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? phoneNUmber = null,}) {
|
||||||
|
return _then(_ResendRegister(
|
||||||
|
null == phoneNUmber ? _self.phoneNUmber : phoneNUmber // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _ResendForgot implements VerifyOtpEvent {
|
||||||
|
const _ResendForgot(this.phoneNUmber);
|
||||||
|
|
||||||
|
|
||||||
|
final String phoneNUmber;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$ResendForgotCopyWith<_ResendForgot> get copyWith => __$ResendForgotCopyWithImpl<_ResendForgot>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ResendForgot&&(identical(other.phoneNUmber, phoneNUmber) || other.phoneNUmber == phoneNUmber));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,phoneNUmber);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent.resendForgot(phoneNUmber: $phoneNUmber)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$ResendForgotCopyWith<$Res> implements $VerifyOtpEventCopyWith<$Res> {
|
||||||
|
factory _$ResendForgotCopyWith(_ResendForgot value, $Res Function(_ResendForgot) _then) = __$ResendForgotCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String phoneNUmber
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$ResendForgotCopyWithImpl<$Res>
|
||||||
|
implements _$ResendForgotCopyWith<$Res> {
|
||||||
|
__$ResendForgotCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _ResendForgot _self;
|
||||||
|
final $Res Function(_ResendForgot) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? phoneNUmber = null,}) {
|
||||||
|
return _then(_ResendForgot(
|
||||||
|
null == phoneNUmber ? _self.phoneNUmber : phoneNUmber // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Ticked implements VerifyOtpEvent {
|
||||||
|
const _Ticked(this.seconds);
|
||||||
|
|
||||||
|
|
||||||
|
final int seconds;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$TickedCopyWith<_Ticked> get copyWith => __$TickedCopyWithImpl<_Ticked>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Ticked&&(identical(other.seconds, seconds) || other.seconds == seconds));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,seconds);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent.ticked(seconds: $seconds)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$TickedCopyWith<$Res> implements $VerifyOtpEventCopyWith<$Res> {
|
||||||
|
factory _$TickedCopyWith(_Ticked value, $Res Function(_Ticked) _then) = __$TickedCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
int seconds
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$TickedCopyWithImpl<$Res>
|
||||||
|
implements _$TickedCopyWith<$Res> {
|
||||||
|
__$TickedCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _Ticked _self;
|
||||||
|
final $Res Function(_Ticked) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? seconds = null,}) {
|
||||||
|
return _then(_Ticked(
|
||||||
|
null == seconds ? _self.seconds : seconds // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _VerifyOtpReset implements VerifyOtpEvent {
|
||||||
|
const _VerifyOtpReset(this.params);
|
||||||
|
|
||||||
|
|
||||||
|
final VerifyOtpCodeParams params;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$VerifyOtpResetCopyWith<_VerifyOtpReset> get copyWith => __$VerifyOtpResetCopyWithImpl<_VerifyOtpReset>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _VerifyOtpReset&&(identical(other.params, params) || other.params == params));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,params);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent.verifyOtpReset(params: $params)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$VerifyOtpResetCopyWith<$Res> implements $VerifyOtpEventCopyWith<$Res> {
|
||||||
|
factory _$VerifyOtpResetCopyWith(_VerifyOtpReset value, $Res Function(_VerifyOtpReset) _then) = __$VerifyOtpResetCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
VerifyOtpCodeParams params
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$VerifyOtpResetCopyWithImpl<$Res>
|
||||||
|
implements _$VerifyOtpResetCopyWith<$Res> {
|
||||||
|
__$VerifyOtpResetCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _VerifyOtpReset _self;
|
||||||
|
final $Res Function(_VerifyOtpReset) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? params = null,}) {
|
||||||
|
return _then(_VerifyOtpReset(
|
||||||
|
null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VerifyOtpCodeParams,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _VerifyOtpRegister implements VerifyOtpEvent {
|
||||||
|
const _VerifyOtpRegister(this.params);
|
||||||
|
|
||||||
|
|
||||||
|
final VerifyOtpCodeParams params;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$VerifyOtpRegisterCopyWith<_VerifyOtpRegister> get copyWith => __$VerifyOtpRegisterCopyWithImpl<_VerifyOtpRegister>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _VerifyOtpRegister&&(identical(other.params, params) || other.params == params));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,params);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpEvent.verifyOtpRegister(params: $params)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$VerifyOtpRegisterCopyWith<$Res> implements $VerifyOtpEventCopyWith<$Res> {
|
||||||
|
factory _$VerifyOtpRegisterCopyWith(_VerifyOtpRegister value, $Res Function(_VerifyOtpRegister) _then) = __$VerifyOtpRegisterCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
VerifyOtpCodeParams params
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$VerifyOtpRegisterCopyWithImpl<$Res>
|
||||||
|
implements _$VerifyOtpRegisterCopyWith<$Res> {
|
||||||
|
__$VerifyOtpRegisterCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _VerifyOtpRegister _self;
|
||||||
|
final $Res Function(_VerifyOtpRegister) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? params = null,}) {
|
||||||
|
return _then(_VerifyOtpRegister(
|
||||||
|
null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VerifyOtpCodeParams,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$VerifyOtpState {
|
||||||
|
|
||||||
|
RequestStatus get status; RequestStatus get resendStatus; int get time;
|
||||||
|
/// Create a copy of VerifyOtpState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$VerifyOtpStateCopyWith<VerifyOtpState> get copyWith => _$VerifyOtpStateCopyWithImpl<VerifyOtpState>(this as VerifyOtpState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is VerifyOtpState&&(identical(other.status, status) || other.status == status)&&(identical(other.resendStatus, resendStatus) || other.resendStatus == resendStatus)&&(identical(other.time, time) || other.time == time));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status,resendStatus,time);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpState(status: $status, resendStatus: $resendStatus, time: $time)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $VerifyOtpStateCopyWith<$Res> {
|
||||||
|
factory $VerifyOtpStateCopyWith(VerifyOtpState value, $Res Function(VerifyOtpState) _then) = _$VerifyOtpStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status, RequestStatus resendStatus, int time
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$VerifyOtpStateCopyWithImpl<$Res>
|
||||||
|
implements $VerifyOtpStateCopyWith<$Res> {
|
||||||
|
_$VerifyOtpStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final VerifyOtpState _self;
|
||||||
|
final $Res Function(VerifyOtpState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,Object? resendStatus = null,Object? time = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,resendStatus: null == resendStatus ? _self.resendStatus : resendStatus // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,time: null == time ? _self.time : time // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [VerifyOtpState].
|
||||||
|
extension VerifyOtpStatePatterns on VerifyOtpState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VerifyOtpState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyOtpState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VerifyOtpState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyOtpState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VerifyOtpState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyOtpState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( RequestStatus status, RequestStatus resendStatus, int time)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyOtpState() when $default != null:
|
||||||
|
return $default(_that.status,_that.resendStatus,_that.time);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( RequestStatus status, RequestStatus resendStatus, int time) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyOtpState():
|
||||||
|
return $default(_that.status,_that.resendStatus,_that.time);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( RequestStatus status, RequestStatus resendStatus, int time)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyOtpState() when $default != null:
|
||||||
|
return $default(_that.status,_that.resendStatus,_that.time);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _VerifyOtpState implements VerifyOtpState {
|
||||||
|
const _VerifyOtpState({this.status = RequestStatus.initial, this.resendStatus = RequestStatus.initial, this.time = 120});
|
||||||
|
|
||||||
|
|
||||||
|
@override@JsonKey() final RequestStatus status;
|
||||||
|
@override@JsonKey() final RequestStatus resendStatus;
|
||||||
|
@override@JsonKey() final int time;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$VerifyOtpStateCopyWith<_VerifyOtpState> get copyWith => __$VerifyOtpStateCopyWithImpl<_VerifyOtpState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _VerifyOtpState&&(identical(other.status, status) || other.status == status)&&(identical(other.resendStatus, resendStatus) || other.resendStatus == resendStatus)&&(identical(other.time, time) || other.time == time));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status,resendStatus,time);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyOtpState(status: $status, resendStatus: $resendStatus, time: $time)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$VerifyOtpStateCopyWith<$Res> implements $VerifyOtpStateCopyWith<$Res> {
|
||||||
|
factory _$VerifyOtpStateCopyWith(_VerifyOtpState value, $Res Function(_VerifyOtpState) _then) = __$VerifyOtpStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status, RequestStatus resendStatus, int time
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$VerifyOtpStateCopyWithImpl<$Res>
|
||||||
|
implements _$VerifyOtpStateCopyWith<$Res> {
|
||||||
|
__$VerifyOtpStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _VerifyOtpState _self;
|
||||||
|
final $Res Function(_VerifyOtpState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyOtpState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,Object? resendStatus = null,Object? time = null,}) {
|
||||||
|
return _then(_VerifyOtpState(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,resendStatus: null == resendStatus ? _self.resendStatus : resendStatus // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,time: null == time ? _self.time : time // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
part of 'verify_otp_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class VerifyOtpEvent with _$VerifyOtpEvent {
|
||||||
|
const factory VerifyOtpEvent.started() = _Started;
|
||||||
|
const factory VerifyOtpEvent.cancelTimer() = _CancelTimer;
|
||||||
|
const factory VerifyOtpEvent.resendRegister(String phoneNUmber) =
|
||||||
|
_ResendRegister;
|
||||||
|
|
||||||
|
const factory VerifyOtpEvent.resendForgot(String phoneNUmber) = _ResendForgot;
|
||||||
|
|
||||||
|
const factory VerifyOtpEvent.ticked(int seconds) = _Ticked;
|
||||||
|
|
||||||
|
const factory VerifyOtpEvent.verifyOtpReset(VerifyOtpCodeParams params) =
|
||||||
|
_VerifyOtpReset;
|
||||||
|
|
||||||
|
const factory VerifyOtpEvent.verifyOtpRegister(VerifyOtpCodeParams params) =
|
||||||
|
_VerifyOtpRegister;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
part of 'verify_otp_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class VerifyOtpState with _$VerifyOtpState {
|
||||||
|
const factory VerifyOtpState({
|
||||||
|
@Default(RequestStatus.initial) RequestStatus status,
|
||||||
|
@Default(RequestStatus.initial) RequestStatus resendStatus,
|
||||||
|
@Default(120) int time,
|
||||||
|
}) = _VerifyOtpState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_phone_login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/verify_phone_register_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/w_toastification.dart';
|
||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
part 'verify_phone_event.dart';
|
||||||
|
|
||||||
|
part 'verify_phone_state.dart';
|
||||||
|
|
||||||
|
part 'verify_phone_bloc.freezed.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class VerifyPhoneBloc extends Bloc<VerifyPhoneEvent, VerifyPhoneState> {
|
||||||
|
final VerifyPhoneNumberLoginUseCase _loginUseCase;
|
||||||
|
final VerifyPhoneRegisterUseCase _registerUseCase;
|
||||||
|
|
||||||
|
VerifyPhoneBloc(this._loginUseCase, this._registerUseCase)
|
||||||
|
: super(const VerifyPhoneState()) {
|
||||||
|
on<_VerifyPhoneRegister>(_onVerifyPhoneNumberRegister);
|
||||||
|
on<_VerifyPhoneReset>(_onVerifyPhoneReset);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onVerifyPhoneNumberRegister(
|
||||||
|
_VerifyPhoneRegister event,
|
||||||
|
Emitter<VerifyPhoneState> emit,
|
||||||
|
) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
final response = await _registerUseCase.call(event.params);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(status: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
showSuccessToast(r.message);
|
||||||
|
emit(state.copyWith(status: RequestStatus.loaded));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onVerifyPhoneReset(
|
||||||
|
_VerifyPhoneReset event,
|
||||||
|
Emitter<VerifyPhoneState> emit,
|
||||||
|
) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
final response = await _loginUseCase.call(event.params);
|
||||||
|
|
||||||
|
response.fold(
|
||||||
|
(l) {
|
||||||
|
showErrorToast(l.errorMessage);
|
||||||
|
emit(state.copyWith(status: RequestStatus.error));
|
||||||
|
},
|
||||||
|
(r) {
|
||||||
|
showSuccessToast(r.message);
|
||||||
|
emit(state.copyWith(status: RequestStatus.loaded));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,607 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
|
part of 'verify_phone_bloc.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$VerifyPhoneEvent {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is VerifyPhoneEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyPhoneEvent()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $VerifyPhoneEventCopyWith<$Res> {
|
||||||
|
$VerifyPhoneEventCopyWith(VerifyPhoneEvent _, $Res Function(VerifyPhoneEvent) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [VerifyPhoneEvent].
|
||||||
|
extension VerifyPhoneEventPatterns on VerifyPhoneEvent {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _Started value)? started,TResult Function( _VerifyPhoneRegister value)? verifyPhoneRegister,TResult Function( _VerifyPhoneReset value)? verifyPhoneReset,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _VerifyPhoneRegister() when verifyPhoneRegister != null:
|
||||||
|
return verifyPhoneRegister(_that);case _VerifyPhoneReset() when verifyPhoneReset != null:
|
||||||
|
return verifyPhoneReset(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _Started value) started,required TResult Function( _VerifyPhoneRegister value) verifyPhoneRegister,required TResult Function( _VerifyPhoneReset value) verifyPhoneReset,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started(_that);case _VerifyPhoneRegister():
|
||||||
|
return verifyPhoneRegister(_that);case _VerifyPhoneReset():
|
||||||
|
return verifyPhoneReset(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _Started value)? started,TResult? Function( _VerifyPhoneRegister value)? verifyPhoneRegister,TResult? Function( _VerifyPhoneReset value)? verifyPhoneReset,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _VerifyPhoneRegister() when verifyPhoneRegister != null:
|
||||||
|
return verifyPhoneRegister(_that);case _VerifyPhoneReset() when verifyPhoneReset != null:
|
||||||
|
return verifyPhoneReset(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? started,TResult Function( VerifyPhoneNumberParams params)? verifyPhoneRegister,TResult Function( VerifyPhoneNumberParams params)? verifyPhoneReset,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _VerifyPhoneRegister() when verifyPhoneRegister != null:
|
||||||
|
return verifyPhoneRegister(_that.params);case _VerifyPhoneReset() when verifyPhoneReset != null:
|
||||||
|
return verifyPhoneReset(_that.params);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() started,required TResult Function( VerifyPhoneNumberParams params) verifyPhoneRegister,required TResult Function( VerifyPhoneNumberParams params) verifyPhoneReset,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started();case _VerifyPhoneRegister():
|
||||||
|
return verifyPhoneRegister(_that.params);case _VerifyPhoneReset():
|
||||||
|
return verifyPhoneReset(_that.params);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? started,TResult? Function( VerifyPhoneNumberParams params)? verifyPhoneRegister,TResult? Function( VerifyPhoneNumberParams params)? verifyPhoneReset,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _VerifyPhoneRegister() when verifyPhoneRegister != null:
|
||||||
|
return verifyPhoneRegister(_that.params);case _VerifyPhoneReset() when verifyPhoneReset != null:
|
||||||
|
return verifyPhoneReset(_that.params);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Started implements VerifyPhoneEvent {
|
||||||
|
const _Started();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyPhoneEvent.started()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _VerifyPhoneRegister implements VerifyPhoneEvent {
|
||||||
|
const _VerifyPhoneRegister(this.params);
|
||||||
|
|
||||||
|
|
||||||
|
final VerifyPhoneNumberParams params;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyPhoneEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$VerifyPhoneRegisterCopyWith<_VerifyPhoneRegister> get copyWith => __$VerifyPhoneRegisterCopyWithImpl<_VerifyPhoneRegister>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _VerifyPhoneRegister&&(identical(other.params, params) || other.params == params));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,params);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyPhoneEvent.verifyPhoneRegister(params: $params)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$VerifyPhoneRegisterCopyWith<$Res> implements $VerifyPhoneEventCopyWith<$Res> {
|
||||||
|
factory _$VerifyPhoneRegisterCopyWith(_VerifyPhoneRegister value, $Res Function(_VerifyPhoneRegister) _then) = __$VerifyPhoneRegisterCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
VerifyPhoneNumberParams params
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$VerifyPhoneRegisterCopyWithImpl<$Res>
|
||||||
|
implements _$VerifyPhoneRegisterCopyWith<$Res> {
|
||||||
|
__$VerifyPhoneRegisterCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _VerifyPhoneRegister _self;
|
||||||
|
final $Res Function(_VerifyPhoneRegister) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyPhoneEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? params = null,}) {
|
||||||
|
return _then(_VerifyPhoneRegister(
|
||||||
|
null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VerifyPhoneNumberParams,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _VerifyPhoneReset implements VerifyPhoneEvent {
|
||||||
|
const _VerifyPhoneReset(this.params);
|
||||||
|
|
||||||
|
|
||||||
|
final VerifyPhoneNumberParams params;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyPhoneEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$VerifyPhoneResetCopyWith<_VerifyPhoneReset> get copyWith => __$VerifyPhoneResetCopyWithImpl<_VerifyPhoneReset>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _VerifyPhoneReset&&(identical(other.params, params) || other.params == params));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,params);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyPhoneEvent.verifyPhoneReset(params: $params)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$VerifyPhoneResetCopyWith<$Res> implements $VerifyPhoneEventCopyWith<$Res> {
|
||||||
|
factory _$VerifyPhoneResetCopyWith(_VerifyPhoneReset value, $Res Function(_VerifyPhoneReset) _then) = __$VerifyPhoneResetCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
VerifyPhoneNumberParams params
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$VerifyPhoneResetCopyWithImpl<$Res>
|
||||||
|
implements _$VerifyPhoneResetCopyWith<$Res> {
|
||||||
|
__$VerifyPhoneResetCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _VerifyPhoneReset _self;
|
||||||
|
final $Res Function(_VerifyPhoneReset) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyPhoneEvent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? params = null,}) {
|
||||||
|
return _then(_VerifyPhoneReset(
|
||||||
|
null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VerifyPhoneNumberParams,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$VerifyPhoneState {
|
||||||
|
|
||||||
|
RequestStatus get status;
|
||||||
|
/// Create a copy of VerifyPhoneState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$VerifyPhoneStateCopyWith<VerifyPhoneState> get copyWith => _$VerifyPhoneStateCopyWithImpl<VerifyPhoneState>(this as VerifyPhoneState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is VerifyPhoneState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyPhoneState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $VerifyPhoneStateCopyWith<$Res> {
|
||||||
|
factory $VerifyPhoneStateCopyWith(VerifyPhoneState value, $Res Function(VerifyPhoneState) _then) = _$VerifyPhoneStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$VerifyPhoneStateCopyWithImpl<$Res>
|
||||||
|
implements $VerifyPhoneStateCopyWith<$Res> {
|
||||||
|
_$VerifyPhoneStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final VerifyPhoneState _self;
|
||||||
|
final $Res Function(VerifyPhoneState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyPhoneState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [VerifyPhoneState].
|
||||||
|
extension VerifyPhoneStatePatterns on VerifyPhoneState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VerifyPhoneState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyPhoneState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VerifyPhoneState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyPhoneState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VerifyPhoneState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyPhoneState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( RequestStatus status)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyPhoneState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( RequestStatus status) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyPhoneState():
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( RequestStatus status)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _VerifyPhoneState() when $default != null:
|
||||||
|
return $default(_that.status);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _VerifyPhoneState implements VerifyPhoneState {
|
||||||
|
const _VerifyPhoneState({this.status = RequestStatus.initial});
|
||||||
|
|
||||||
|
|
||||||
|
@override@JsonKey() final RequestStatus status;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyPhoneState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$VerifyPhoneStateCopyWith<_VerifyPhoneState> get copyWith => __$VerifyPhoneStateCopyWithImpl<_VerifyPhoneState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _VerifyPhoneState&&(identical(other.status, status) || other.status == status));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,status);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'VerifyPhoneState(status: $status)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$VerifyPhoneStateCopyWith<$Res> implements $VerifyPhoneStateCopyWith<$Res> {
|
||||||
|
factory _$VerifyPhoneStateCopyWith(_VerifyPhoneState value, $Res Function(_VerifyPhoneState) _then) = __$VerifyPhoneStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
RequestStatus status
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$VerifyPhoneStateCopyWithImpl<$Res>
|
||||||
|
implements _$VerifyPhoneStateCopyWith<$Res> {
|
||||||
|
__$VerifyPhoneStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _VerifyPhoneState _self;
|
||||||
|
final $Res Function(_VerifyPhoneState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of VerifyPhoneState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,}) {
|
||||||
|
return _then(_VerifyPhoneState(
|
||||||
|
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RequestStatus,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
part of 'verify_phone_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class VerifyPhoneEvent with _$VerifyPhoneEvent {
|
||||||
|
const factory VerifyPhoneEvent.started() = _Started;
|
||||||
|
|
||||||
|
const factory VerifyPhoneEvent.verifyPhoneRegister(
|
||||||
|
VerifyPhoneNumberParams params,
|
||||||
|
) = _VerifyPhoneRegister;
|
||||||
|
|
||||||
|
const factory VerifyPhoneEvent.verifyPhoneReset(
|
||||||
|
VerifyPhoneNumberParams params,
|
||||||
|
) = _VerifyPhoneReset;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'verify_phone_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class VerifyPhoneState with _$VerifyPhoneState {
|
||||||
|
const factory VerifyPhoneState({
|
||||||
|
@Default(RequestStatus.initial) RequestStatus status,
|
||||||
|
}) = _VerifyPhoneState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/create_new_password_page/widgets/create_new_password_body.dart';
|
||||||
|
|
||||||
|
import '../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class CreateNewPasswordPage extends StatelessWidget {
|
||||||
|
const CreateNewPasswordPage({super.key, required this.phoneNumber});
|
||||||
|
|
||||||
|
final String phoneNumber;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CreateNewPasswordBody(phoneNumber: phoneNumber );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import '../../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class ChangePasswordSuccessPassword extends StatelessWidget {
|
||||||
|
const ChangePasswordSuccessPassword({super.key});
|
||||||
|
|
||||||
|
void show(BuildContext context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
backgroundColor: AppColors.cTransparent,
|
||||||
|
enableDrag: false,
|
||||||
|
isDismissible: false,
|
||||||
|
useSafeArea: false,
|
||||||
|
builder: (context) => Wrap(children: [this]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: context.w,
|
||||||
|
child: DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: context.theme.scaffoldBackgroundColor,
|
||||||
|
borderRadius: AppUtils.kBorderRadius30,
|
||||||
|
),
|
||||||
|
child: SafeArea(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
10.verticalSpace,
|
||||||
|
SizedBox(
|
||||||
|
height: 6,
|
||||||
|
width: 60,
|
||||||
|
child: DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.cDFE2EB,
|
||||||
|
borderRadius: AppUtils.kBorderRadius10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
54.verticalSpace,
|
||||||
|
SizedBox(
|
||||||
|
height: 162,
|
||||||
|
width: 162,
|
||||||
|
child: DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(160),
|
||||||
|
color: context.appThemeColors.rippleColor.newWithOpacity(
|
||||||
|
.2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
height: 103.74,
|
||||||
|
width: 103.74,
|
||||||
|
child: DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.cFF6F00,
|
||||||
|
borderRadius: BorderRadius.circular(100),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: SvgPicture.asset(AppIcons.icClock),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
54.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.changePasswordSuccess,
|
||||||
|
style: context.appThemeTextStyles.size24Bold,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
14.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.changePasswordMessage,
|
||||||
|
style: context.appThemeTextStyles.size14Regular,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
65.verticalSpace,
|
||||||
|
AppButton(
|
||||||
|
name: context.loc.login,
|
||||||
|
onPressed: () {
|
||||||
|
context.go(Routes.login);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
15.verticalSpace,
|
||||||
|
],
|
||||||
|
).paddingSymmetric(horizontal: 24),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
import 'package:food_delivery_client/core/helpers/validator_helpers.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/app_text_form_field.dart';
|
||||||
|
|
||||||
|
import '../../../../../../food_delivery_client.dart';
|
||||||
|
import 'change_password_success.dart';
|
||||||
|
|
||||||
|
class CreateNewPasswordBody extends StatefulWidget {
|
||||||
|
const CreateNewPasswordBody({super.key, required this.phoneNumber});
|
||||||
|
|
||||||
|
final String phoneNumber;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CreateNewPasswordBody> createState() => _CreateNewPasswordBodyState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CreateNewPasswordBodyState extends State<CreateNewPasswordBody> {
|
||||||
|
late TextEditingController _passwordController;
|
||||||
|
late TextEditingController _repeatPasswordController;
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
bool _isValid = false;
|
||||||
|
|
||||||
|
void _validateForm() {
|
||||||
|
final isValid = _formKey.currentState?.validate() ?? false;
|
||||||
|
if (_isValid != isValid) {
|
||||||
|
setState(() {
|
||||||
|
_isValid = isValid;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_passwordController = TextEditingController();
|
||||||
|
_repeatPasswordController = TextEditingController();
|
||||||
|
_passwordController.addListener(_validateForm);
|
||||||
|
_repeatPasswordController.addListener(_validateForm);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_passwordController.removeListener(_validateForm);
|
||||||
|
_repeatPasswordController.removeListener(_validateForm);
|
||||||
|
_passwordController.dispose();
|
||||||
|
_repeatPasswordController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Form(
|
||||||
|
key: _formKey,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
child: WLayout(
|
||||||
|
child: Scaffold(
|
||||||
|
resizeToAvoidBottomInset: true,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
30.verticalSpace,
|
||||||
|
WBackButton(),
|
||||||
|
20.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.createNewPassword,
|
||||||
|
style: context.appThemeTextStyles.size24Bold,
|
||||||
|
),
|
||||||
|
8.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.createNewPasswordSubtitle,
|
||||||
|
style: context.appThemeTextStyles.size14Regular,
|
||||||
|
),
|
||||||
|
|
||||||
|
40.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.newPassword,
|
||||||
|
style: context.appThemeTextStyles.size16Medium,
|
||||||
|
),
|
||||||
|
10.verticalSpace,
|
||||||
|
AppTextFormField(
|
||||||
|
obscureText: true,
|
||||||
|
controller: _passwordController,
|
||||||
|
keyBoardType: TextInputType.visiblePassword,
|
||||||
|
hintText: context.loc.enter_password,
|
||||||
|
validator: (value) {
|
||||||
|
return Validators.validatePassword(
|
||||||
|
_passwordController.text.trim(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
16.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.confirmNewPassword,
|
||||||
|
style: context.appThemeTextStyles.size16Medium,
|
||||||
|
),
|
||||||
|
10.verticalSpace,
|
||||||
|
AppTextFormField(
|
||||||
|
obscureText: true,
|
||||||
|
controller: _repeatPasswordController,
|
||||||
|
keyBoardType: TextInputType.visiblePassword,
|
||||||
|
hintText: context.loc.enter_password,
|
||||||
|
validator: (value) {
|
||||||
|
return Validators.validateRepeatPassword(
|
||||||
|
_repeatPasswordController.text.trim(),
|
||||||
|
_passwordController.text.trim(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
130.verticalSpace,
|
||||||
|
AppButton(
|
||||||
|
name: context.loc.resetPassword,
|
||||||
|
isActive: _isValid,
|
||||||
|
onPressed: () {
|
||||||
|
ChangePasswordSuccessPassword().show(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingSymmetric(horizontal: 24),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/forgot_password_page/widgets/forgot_password_body.dart';
|
||||||
|
|
||||||
|
import '../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class ForgotPasswordPage extends StatelessWidget {
|
||||||
|
const ForgotPasswordPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ForgotPasswordBody();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
import 'package:food_delivery_client/core/helpers/formatters.dart';
|
||||||
|
import 'package:food_delivery_client/core/helpers/validator_helpers.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/app_text_form_field.dart';
|
||||||
|
|
||||||
|
import '../../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class ForgotPasswordBody extends StatefulWidget {
|
||||||
|
const ForgotPasswordBody({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ForgotPasswordBody> createState() => _ForgotPasswordBodyState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ForgotPasswordBodyState extends State<ForgotPasswordBody> {
|
||||||
|
late final TextEditingController _phoneNumberController;
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
bool _isValid = false;
|
||||||
|
|
||||||
|
void _validateForm() {
|
||||||
|
final isValid = _formKey.currentState?.validate() ?? false;
|
||||||
|
|
||||||
|
if (isValid != _isValid) {
|
||||||
|
setState(() {
|
||||||
|
_isValid = isValid;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_phoneNumberController = TextEditingController();
|
||||||
|
_phoneNumberController.addListener(_validateForm);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_phoneNumberController.removeListener(_validateForm);
|
||||||
|
_phoneNumberController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Form(
|
||||||
|
key: _formKey,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
child: WLayout(
|
||||||
|
child: Scaffold(
|
||||||
|
resizeToAvoidBottomInset: true,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
30.verticalSpace,
|
||||||
|
WBackButton(),
|
||||||
|
20.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.forgotPassword,
|
||||||
|
style: context.appThemeTextStyles.size24Bold,
|
||||||
|
),
|
||||||
|
8.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.forgotPasswordSubtitle,
|
||||||
|
style: AppTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.cA7AEC1,
|
||||||
|
height: 1.6,
|
||||||
|
),
|
||||||
|
).paddingOnly(right: 50),
|
||||||
|
30.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.phoneNumber,
|
||||||
|
style: context.appThemeTextStyles.size16Medium,
|
||||||
|
),
|
||||||
|
10.verticalSpace,
|
||||||
|
AppTextFormField(
|
||||||
|
|
||||||
|
controller: _phoneNumberController,
|
||||||
|
keyBoardType: TextInputType.number,
|
||||||
|
hintText: context.loc.enter_email_or_phone,
|
||||||
|
prefixIcon: Text(
|
||||||
|
"+ 998",
|
||||||
|
style: context.appThemeTextStyles.size14Regular,
|
||||||
|
),
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
Formatters.phoneFormatter,
|
||||||
|
LengthLimitingTextInputFormatter(12),
|
||||||
|
],
|
||||||
|
validator: (value) {
|
||||||
|
return Validators.validatePhoneNumber(
|
||||||
|
_phoneNumberController.text.trim(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
100.verticalSpace,
|
||||||
|
AppButton(
|
||||||
|
name: context.loc.sendCode,
|
||||||
|
isActive: _isValid,
|
||||||
|
onPressed: () {
|
||||||
|
context.push(
|
||||||
|
Routes.verifyAccount,
|
||||||
|
extra:
|
||||||
|
"+998${_phoneNumberController.text.trim().replaceAll(" ", "")}",
|
||||||
|
);
|
||||||
|
if (_formKey.currentState?.validate() ?? false) {}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingSymmetric(horizontal: 24),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/presentation/blocs/login_bloc/login_bloc.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/login_page/widgets/login_body.dart';
|
||||||
|
|
||||||
|
import '../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class LoginPage extends StatelessWidget {
|
||||||
|
const LoginPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocProvider(
|
||||||
|
create: (context) => sl<LoginBloc>(),
|
||||||
|
child: WLoginBody(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,241 @@
|
|||||||
|
import 'package:food_delivery_client/core/helpers/formatters.dart';
|
||||||
|
import 'package:food_delivery_client/core/helpers/validator_helpers.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/domain/usecases/login_usecase.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/login_page/widgets/welcome_text.dart';
|
||||||
|
import 'package:food_delivery_client/feature/common/presentation/widgets/app_text_form_field.dart';
|
||||||
|
|
||||||
|
import '../../../../../../food_delivery_client.dart';
|
||||||
|
import '../../../blocs/login_bloc/login_bloc.dart';
|
||||||
|
|
||||||
|
class WLoginBody extends StatefulWidget {
|
||||||
|
const WLoginBody({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<WLoginBody> createState() => _WLoginBodyState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _WLoginBodyState extends State<WLoginBody> {
|
||||||
|
late TextEditingController _phoneNumberController;
|
||||||
|
late TextEditingController _passwordController;
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
bool _isValidForm = false;
|
||||||
|
|
||||||
|
void _validateForm() {
|
||||||
|
final isValid = _formKey.currentState?.validate() ?? false;
|
||||||
|
if (isValid != _isValidForm) {
|
||||||
|
setState(() {
|
||||||
|
_isValidForm = isValid;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_phoneNumberController = TextEditingController();
|
||||||
|
_passwordController = TextEditingController();
|
||||||
|
_passwordController.addListener(_validateForm);
|
||||||
|
_phoneNumberController.addListener(_validateForm);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_phoneNumberController.removeListener(_validateForm);
|
||||||
|
_passwordController.removeListener(_validateForm);
|
||||||
|
_phoneNumberController.dispose();
|
||||||
|
_passwordController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocConsumer<LoginBloc, LoginState>(
|
||||||
|
listenWhen: (previous, current) => previous.status != current.status,
|
||||||
|
listener: (context, state) {
|
||||||
|
if (state.status.isLoaded()) {
|
||||||
|
context.go(Routes.main);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (context, state) {
|
||||||
|
return Form(
|
||||||
|
key: _formKey,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
child: WLayout(
|
||||||
|
top: false,
|
||||||
|
left: false,
|
||||||
|
right: false,
|
||||||
|
child: Scaffold(
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: context.w,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
AppIcons.icLogin,
|
||||||
|
fit: BoxFit.fitWidth,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
child: Material(
|
||||||
|
color: AppColors.cTransparent,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
keyboardDismissBehavior:
|
||||||
|
ScrollViewKeyboardDismissBehavior.onDrag,
|
||||||
|
child:
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
30.verticalSpace,
|
||||||
|
//WBackButton(),
|
||||||
|
60.verticalSpace,
|
||||||
|
WelcomeText(
|
||||||
|
text: context.loc.welcome_to_volt(
|
||||||
|
AppLocaleKeys.appName,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
8.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.please_login,
|
||||||
|
style: AppTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.cA7AEC1,
|
||||||
|
height: 1.6,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
54.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.email_or_phone,
|
||||||
|
style:
|
||||||
|
context.appThemeTextStyles.size16Medium,
|
||||||
|
),
|
||||||
|
10.verticalSpace,
|
||||||
|
AppTextFormField(
|
||||||
|
prefixIcon: Text(
|
||||||
|
"+ 998",
|
||||||
|
style: context
|
||||||
|
.appThemeTextStyles
|
||||||
|
.size14Regular,
|
||||||
|
),
|
||||||
|
controller: _phoneNumberController,
|
||||||
|
hintText: context.loc.enter_email_or_phone,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
Formatters.phoneFormatter,
|
||||||
|
LengthLimitingTextInputFormatter(12),
|
||||||
|
],
|
||||||
|
validator: (value) {
|
||||||
|
return Validators.validatePhoneNumber(
|
||||||
|
_phoneNumberController.text.trim(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
20.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.password,
|
||||||
|
style:
|
||||||
|
context.appThemeTextStyles.size16Medium,
|
||||||
|
),
|
||||||
|
10.verticalSpace,
|
||||||
|
AppTextFormField(
|
||||||
|
obscureText: true,
|
||||||
|
controller: _passwordController,
|
||||||
|
hintText: context.loc.enter_password,
|
||||||
|
validator: (value) {
|
||||||
|
return Validators.validatePassword(
|
||||||
|
_passwordController.text.trim(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
10.verticalSpace,
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentGeometry.centerRight,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
context.push(Routes.forgotPassword);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
context.loc.forgot_password,
|
||||||
|
style: AppTextStyles.size14Regular
|
||||||
|
.copyWith(color: AppColors.cFF6F00),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
60.verticalSpace,
|
||||||
|
AppButton(
|
||||||
|
name: context.loc.login,
|
||||||
|
isActive: _isValidForm,
|
||||||
|
isLoading: state.status.isLoading(),
|
||||||
|
onPressed: () {
|
||||||
|
if (_formKey.currentState?.validate() ??
|
||||||
|
false) {
|
||||||
|
context.read<LoginBloc>().add(
|
||||||
|
LoginEvent.login(
|
||||||
|
LoginParams(
|
||||||
|
password: _passwordController.text
|
||||||
|
.trim(),
|
||||||
|
phoneNumber:
|
||||||
|
"+998${_phoneNumberController.text.trim().replaceAll(" ", "")}",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
15.verticalSpace,
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentGeometry.center,
|
||||||
|
child: RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
text: context.loc.dont_have_account,
|
||||||
|
style: context
|
||||||
|
.appThemeTextStyles
|
||||||
|
.size14Regular,
|
||||||
|
children: [
|
||||||
|
WidgetSpan(
|
||||||
|
baseline: TextBaseline.alphabetic,
|
||||||
|
alignment:
|
||||||
|
PlaceholderAlignment.baseline,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {},
|
||||||
|
style: ButtonStyle(
|
||||||
|
shadowColor:
|
||||||
|
WidgetStatePropertyAll(
|
||||||
|
AppColors.cFF6F00
|
||||||
|
.newWithOpacity(.2),
|
||||||
|
),
|
||||||
|
padding: WidgetStatePropertyAll(
|
||||||
|
EdgeInsets.symmetric(
|
||||||
|
horizontal: 4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
context.loc.register,
|
||||||
|
style: AppTextStyles.size14Bold
|
||||||
|
.copyWith(
|
||||||
|
color: AppColors.cFF6F00,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingOnly(
|
||||||
|
left: 24,
|
||||||
|
right: 24,
|
||||||
|
top: context.mq.viewPadding.top,
|
||||||
|
bottom: context.mq.viewPadding.bottom,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
import '../../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class WelcomeText extends StatelessWidget {
|
||||||
|
final String text;
|
||||||
|
|
||||||
|
const WelcomeText({Key? key, required this.text}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final voltIndex = text.toLowerCase().indexOf(
|
||||||
|
AppLocaleKeys.appName.toLowerCase(),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (voltIndex == -1) {
|
||||||
|
return Text(
|
||||||
|
text,
|
||||||
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final before = text.substring(0, voltIndex);
|
||||||
|
final volt = text.substring(
|
||||||
|
voltIndex,
|
||||||
|
voltIndex + AppLocaleKeys.appName.length,
|
||||||
|
);
|
||||||
|
final after = text.substring(voltIndex + AppLocaleKeys.appName.length);
|
||||||
|
|
||||||
|
return Text.rich(
|
||||||
|
TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(text: before, style: context.appThemeTextStyles.size24Bold),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.baseline,
|
||||||
|
baseline: TextBaseline.alphabetic,
|
||||||
|
child: ShaderMask(
|
||||||
|
shaderCallback: (bounds) =>
|
||||||
|
AppUtils.kGradient.createShader(bounds),
|
||||||
|
child: Text(
|
||||||
|
volt,
|
||||||
|
style: context.appThemeTextStyles.size24Bold.copyWith(
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// "Volt" dan keyingi text
|
||||||
|
TextSpan(text: after, style: context.appThemeTextStyles.size24Bold),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/verify_account_page/widgets/verify_account_body.dart';
|
||||||
|
import '../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class VerifyAccountPage extends StatelessWidget {
|
||||||
|
const VerifyAccountPage({super.key, required this.phoneNumber});
|
||||||
|
|
||||||
|
final String phoneNumber;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return VerifyAccountBody(phoneNumber: phoneNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
import 'package:food_delivery_client/core/helpers/string_helpers.dart';
|
||||||
|
import 'package:food_delivery_client/core/helpers/validator_helpers.dart';
|
||||||
|
import 'package:pinput/pinput.dart';
|
||||||
|
import '../../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class VerifyAccountBody extends StatefulWidget {
|
||||||
|
const VerifyAccountBody({super.key, required this.phoneNumber});
|
||||||
|
|
||||||
|
final String phoneNumber;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<VerifyAccountBody> createState() => _VerifyAccountBodyState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _VerifyAccountBodyState extends State<VerifyAccountBody> {
|
||||||
|
late TextEditingController _otpController;
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
bool _isValid = false;
|
||||||
|
|
||||||
|
void _formValidator() {
|
||||||
|
final isValid = _formKey.currentState?.validate() ?? false;
|
||||||
|
if (_isValid != isValid) {
|
||||||
|
setState(() {
|
||||||
|
_isValid = isValid;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_otpController = TextEditingController();
|
||||||
|
_otpController.addListener(_formValidator);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_otpController.removeListener(_formValidator);
|
||||||
|
_otpController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final defaultPinTheme = PinTheme(
|
||||||
|
height: 56,
|
||||||
|
width: 56,
|
||||||
|
textStyle: context.appThemeTextStyles.size24SemiBold1,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: context.appThemeColors.borderColor,
|
||||||
|
style: BorderStyle.solid,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
color: context.theme.scaffoldBackgroundColor,
|
||||||
|
borderRadius: AppUtils.kBorderRadius12,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return Form(
|
||||||
|
key: _formKey,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
child: WLayout(
|
||||||
|
child: Scaffold(
|
||||||
|
resizeToAvoidBottomInset: true,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
30.verticalSpace,
|
||||||
|
WBackButton(),
|
||||||
|
20.verticalSpace,
|
||||||
|
Text(
|
||||||
|
context.loc.verifyYourAccount,
|
||||||
|
style: context.appThemeTextStyles.size24Bold,
|
||||||
|
),
|
||||||
|
8.verticalSpace,
|
||||||
|
RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
text: context.loc.verifyAccountSubtitle,
|
||||||
|
style: AppTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.cA7AEC1,
|
||||||
|
height: 1.6,
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: " "),
|
||||||
|
TextSpan(
|
||||||
|
text: StringHelpers.formatUzbekPhoneNumber(
|
||||||
|
widget.phoneNumber,
|
||||||
|
),
|
||||||
|
style: AppTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.cFF6F00,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
50.verticalSpace,
|
||||||
|
Pinput(
|
||||||
|
autofocus: true,
|
||||||
|
enabled: true,
|
||||||
|
length: 5,
|
||||||
|
controller: _otpController,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
LengthLimitingTextInputFormatter(5),
|
||||||
|
],
|
||||||
|
defaultPinTheme: defaultPinTheme,
|
||||||
|
focusedPinTheme: defaultPinTheme.copyWith(
|
||||||
|
decoration: defaultPinTheme.decoration?.copyWith(
|
||||||
|
border: Border.all(color: AppColors.cFF6F00),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
validator: (value) {
|
||||||
|
return Validators.validateOtpFields(
|
||||||
|
_otpController.text.trim(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
90.verticalSpace,
|
||||||
|
AppButton(
|
||||||
|
isActive: _isValid,
|
||||||
|
name: context.loc.verifyAccount,
|
||||||
|
onPressed: () {
|
||||||
|
if (_formKey.currentState?.validate() ?? false) {
|
||||||
|
context.push(
|
||||||
|
Routes.createNewPassword,
|
||||||
|
extra: widget.phoneNumber,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
20.verticalSpace,
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentGeometry.center,
|
||||||
|
child: RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
text: context.loc.didNotReceiveCode,
|
||||||
|
style: context.appThemeTextStyles.size14Regular1,
|
||||||
|
children: [
|
||||||
|
WidgetSpan(
|
||||||
|
baseline: TextBaseline.alphabetic,
|
||||||
|
alignment: PlaceholderAlignment.baseline,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
context.loc.resend,
|
||||||
|
style: AppTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.cFF6F00,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingSymmetric(horizontal: 24),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
10
lib/feature/cart/presentation/pages/cart_page/cart_page.dart
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import '../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class CartPage extends StatelessWidget {
|
||||||
|
const CartPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(body: Column(children: [Center(child: Text("Cart"))]));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
part 'theme_event.dart';
|
||||||
|
|
||||||
|
part 'theme_state.dart';
|
||||||
|
|
||||||
|
part 'theme_bloc.freezed.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class ThemeBloc extends Bloc<ThemeEvent, ThemeState> {
|
||||||
|
final StorageService _storageService;
|
||||||
|
|
||||||
|
ThemeBloc(this._storageService) : super(const ThemeState()) {
|
||||||
|
on<_Started>(_onStarted);
|
||||||
|
on<_Changed>(_onChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onStarted(_Started event, Emitter<ThemeState> emit) {
|
||||||
|
final isDark = _storageService.getBool(key: AppLocaleKeys.theme);
|
||||||
|
|
||||||
|
if (isDark) {
|
||||||
|
emit(state.copyWith(themeMode: ThemeMode.dark));
|
||||||
|
} else {
|
||||||
|
emit(state.copyWith(themeMode: ThemeMode.light));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onChanged(_Changed event, Emitter<ThemeState> emit) {
|
||||||
|
if (state.themeMode == ThemeMode.light) {
|
||||||
|
_storageService.setBool(key: AppLocaleKeys.theme, value: true);
|
||||||
|
emit(state.copyWith(themeMode: ThemeMode.dark));
|
||||||
|
} else {
|
||||||
|
_storageService.setBool(key: AppLocaleKeys.theme, value: false);
|
||||||
|
emit(state.copyWith(themeMode: ThemeMode.light));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,501 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
|
part of 'theme_bloc.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ThemeEvent {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ThemeEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ThemeEvent()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $ThemeEventCopyWith<$Res> {
|
||||||
|
$ThemeEventCopyWith(ThemeEvent _, $Res Function(ThemeEvent) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [ThemeEvent].
|
||||||
|
extension ThemeEventPatterns on ThemeEvent {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _Started value)? started,TResult Function( _Changed value)? changed,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _Changed() when changed != null:
|
||||||
|
return changed(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _Started value) started,required TResult Function( _Changed value) changed,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started(_that);case _Changed():
|
||||||
|
return changed(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _Started value)? started,TResult? Function( _Changed value)? changed,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started(_that);case _Changed() when changed != null:
|
||||||
|
return changed(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? started,TResult Function()? changed,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _Changed() when changed != null:
|
||||||
|
return changed();case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() started,required TResult Function() changed,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started():
|
||||||
|
return started();case _Changed():
|
||||||
|
return changed();case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? started,TResult? Function()? changed,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Started() when started != null:
|
||||||
|
return started();case _Changed() when changed != null:
|
||||||
|
return changed();case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Started implements ThemeEvent {
|
||||||
|
const _Started();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ThemeEvent.started()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _Changed implements ThemeEvent {
|
||||||
|
const _Changed();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Changed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ThemeEvent.changed()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ThemeState {
|
||||||
|
|
||||||
|
ThemeMode get themeMode;
|
||||||
|
/// Create a copy of ThemeState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ThemeStateCopyWith<ThemeState> get copyWith => _$ThemeStateCopyWithImpl<ThemeState>(this as ThemeState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ThemeState&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,themeMode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ThemeState(themeMode: $themeMode)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ThemeStateCopyWith<$Res> {
|
||||||
|
factory $ThemeStateCopyWith(ThemeState value, $Res Function(ThemeState) _then) = _$ThemeStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
ThemeMode themeMode
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ThemeStateCopyWithImpl<$Res>
|
||||||
|
implements $ThemeStateCopyWith<$Res> {
|
||||||
|
_$ThemeStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ThemeState _self;
|
||||||
|
final $Res Function(ThemeState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ThemeState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? themeMode = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
themeMode: null == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable
|
||||||
|
as ThemeMode,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [ThemeState].
|
||||||
|
extension ThemeStatePatterns on ThemeState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ThemeState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ThemeState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ThemeState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ThemeState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ThemeState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ThemeState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ThemeMode themeMode)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ThemeState() when $default != null:
|
||||||
|
return $default(_that.themeMode);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ThemeMode themeMode) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ThemeState():
|
||||||
|
return $default(_that.themeMode);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ThemeMode themeMode)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ThemeState() when $default != null:
|
||||||
|
return $default(_that.themeMode);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _ThemeState implements ThemeState {
|
||||||
|
const _ThemeState({this.themeMode = ThemeMode.light});
|
||||||
|
|
||||||
|
|
||||||
|
@override@JsonKey() final ThemeMode themeMode;
|
||||||
|
|
||||||
|
/// Create a copy of ThemeState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$ThemeStateCopyWith<_ThemeState> get copyWith => __$ThemeStateCopyWithImpl<_ThemeState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ThemeState&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,themeMode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ThemeState(themeMode: $themeMode)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$ThemeStateCopyWith<$Res> implements $ThemeStateCopyWith<$Res> {
|
||||||
|
factory _$ThemeStateCopyWith(_ThemeState value, $Res Function(_ThemeState) _then) = __$ThemeStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
ThemeMode themeMode
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$ThemeStateCopyWithImpl<$Res>
|
||||||
|
implements _$ThemeStateCopyWith<$Res> {
|
||||||
|
__$ThemeStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _ThemeState _self;
|
||||||
|
final $Res Function(_ThemeState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ThemeState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? themeMode = null,}) {
|
||||||
|
return _then(_ThemeState(
|
||||||
|
themeMode: null == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable
|
||||||
|
as ThemeMode,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'theme_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class ThemeEvent with _$ThemeEvent {
|
||||||
|
const factory ThemeEvent.started() = _Started;
|
||||||
|
const factory ThemeEvent.changed() = _Changed;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
part of 'theme_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class ThemeState with _$ThemeState {
|
||||||
|
const factory ThemeState({@Default(ThemeMode.light) ThemeMode themeMode}) =
|
||||||
|
_ThemeState;
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ class AppButton extends StatelessWidget {
|
|||||||
this.leading,
|
this.leading,
|
||||||
this.trailing,
|
this.trailing,
|
||||||
this.mainAxisAlignment,
|
this.mainAxisAlignment,
|
||||||
|
this.isActive = true,
|
||||||
this.isLoading = false,
|
this.isLoading = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -28,12 +29,14 @@ class AppButton extends StatelessWidget {
|
|||||||
final Widget? leading;
|
final Widget? leading;
|
||||||
final Widget? trailing;
|
final Widget? trailing;
|
||||||
final bool isLoading;
|
final bool isLoading;
|
||||||
|
final bool isActive;
|
||||||
|
|
||||||
final MainAxisAlignment? mainAxisAlignment;
|
final MainAxisAlignment? mainAxisAlignment;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Bounceable(
|
return Bounceable(
|
||||||
onTap: onPressed,
|
onTap: isActive ? onPressed : null,
|
||||||
duration: TimeDelayConst.durationMill150,
|
duration: TimeDelayConst.durationMill150,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: width ?? double.infinity,
|
width: width ?? double.infinity,
|
||||||
@@ -42,8 +45,10 @@ class AppButton extends StatelessWidget {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: backgroundColor ?? AppColors.c000000,
|
color: isActive
|
||||||
borderRadius: BorderRadius.circular(borderRadius ?? 0),
|
? backgroundColor ?? AppColors.cFF6F00
|
||||||
|
: context.appThemeColors.inActiveColor,
|
||||||
|
borderRadius: BorderRadius.circular(borderRadius ?? 12),
|
||||||
),
|
),
|
||||||
child: isLoading
|
child: isLoading
|
||||||
? Center(
|
? Center(
|
||||||
@@ -60,7 +65,7 @@ class AppButton extends StatelessWidget {
|
|||||||
leading ?? AppUtils.kSizedBox,
|
leading ?? AppUtils.kSizedBox,
|
||||||
Text(
|
Text(
|
||||||
name,
|
name,
|
||||||
style: AppTextStyles.size16Bold.copyWith(
|
style: AppTextStyles.size14Bold.copyWith(
|
||||||
color: AppColors.cFFFFFF,
|
color: AppColors.cFFFFFF,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:food_delivery_client/core/core.dart';
|
||||||
|
|
||||||
|
class GradientSwitch extends StatefulWidget {
|
||||||
|
final bool value;
|
||||||
|
final ValueChanged<bool> onChanged;
|
||||||
|
final double width;
|
||||||
|
final double height;
|
||||||
|
final Duration duration;
|
||||||
|
|
||||||
|
const GradientSwitch({
|
||||||
|
super.key,
|
||||||
|
required this.value,
|
||||||
|
required this.onChanged,
|
||||||
|
this.width = 48,
|
||||||
|
this.height = 26,
|
||||||
|
this.duration = const Duration(milliseconds: 250),
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<GradientSwitch> createState() => _GradientSwitchState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _GradientSwitchState extends State<GradientSwitch>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
late bool _isOn;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_isOn = widget.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didUpdateWidget(covariant GradientSwitch oldWidget) {
|
||||||
|
super.didUpdateWidget(oldWidget);
|
||||||
|
if (oldWidget.value != widget.value) {
|
||||||
|
_isOn = widget.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _toggle() {
|
||||||
|
setState(() => _isOn = !_isOn);
|
||||||
|
widget.onChanged(_isOn);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: _toggle,
|
||||||
|
child: AnimatedContainer(
|
||||||
|
duration: widget.duration,
|
||||||
|
width: widget.width,
|
||||||
|
height: widget.height,
|
||||||
|
padding: const EdgeInsets.all(3),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(widget.height / 2),
|
||||||
|
gradient: _isOn
|
||||||
|
? LinearGradient(
|
||||||
|
colors: [AppColors.cFF6F00, AppColors.cFFAB40],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
color: _isOn ? null : context.appThemeColors.inActiveColor2,
|
||||||
|
),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
AnimatedAlign(
|
||||||
|
duration: widget.duration,
|
||||||
|
alignment: _isOn ? Alignment.centerRight : Alignment.centerLeft,
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
child: Container(
|
||||||
|
width: widget.height - 4,
|
||||||
|
height: widget.height - 4,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
|
borderRadius: BorderRadius.circular(widget.height / 2),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: AppColors.c292F3D.newWithOpacity(.25),
|
||||||
|
blurRadius: 4,
|
||||||
|
offset: const Offset(0, 10),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -55,7 +55,17 @@ class _AppTextFormFieldState extends State<AppTextFormField> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TextFormField(
|
return DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
offset: const Offset(0, 4),
|
||||||
|
color: AppColors.cA7AEC1.newWithOpacity(.15),
|
||||||
|
blurRadius: 70,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: TextFormField(
|
||||||
enabled: true,
|
enabled: true,
|
||||||
//autofocus: true,
|
//autofocus: true,
|
||||||
maxLines: widget.maxLines ?? 1,
|
maxLines: widget.maxLines ?? 1,
|
||||||
@@ -64,7 +74,7 @@ class _AppTextFormFieldState extends State<AppTextFormField> {
|
|||||||
focusNode: widget.focusNode,
|
focusNode: widget.focusNode,
|
||||||
inputFormatters: widget.inputFormatters,
|
inputFormatters: widget.inputFormatters,
|
||||||
keyboardType: widget.keyBoardType,
|
keyboardType: widget.keyBoardType,
|
||||||
style: widget.textStyle ?? AppTextStyles.size16Regular,
|
style: widget.textStyle ?? context.appThemeTextStyles.size14Regular,
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
textAlign: widget.textAlign ?? TextAlign.start,
|
textAlign: widget.textAlign ?? TextAlign.start,
|
||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
@@ -72,15 +82,17 @@ class _AppTextFormFieldState extends State<AppTextFormField> {
|
|||||||
obscureText: widget.obscureText ? visibility : false,
|
obscureText: widget.obscureText ? visibility : false,
|
||||||
obscuringCharacter: "*",
|
obscuringCharacter: "*",
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
cursorColor: AppColors.cFF6F00,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
enabled: true,
|
enabled: true,
|
||||||
filled: true,
|
filled: true,
|
||||||
|
fillColor: context.appThemeColors.iconColor ?? AppColors.cEEEEEE,
|
||||||
fillColor: widget.fillColor ?? AppColors.cEEEEEE,
|
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
hintStyle:
|
hintStyle:
|
||||||
widget.hintTextStyle ??
|
widget.hintTextStyle ??
|
||||||
AppTextStyles.size16Regular.copyWith(color: AppColors.c7F7F7F),
|
context.appThemeTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.cA7AEC1,
|
||||||
|
),
|
||||||
suffixIcon: widget.obscureText
|
suffixIcon: widget.obscureText
|
||||||
? IconButton(
|
? IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -88,34 +100,48 @@ class _AppTextFormFieldState extends State<AppTextFormField> {
|
|||||||
visibility = !visibility;
|
visibility = !visibility;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: SvgPicture.asset(
|
||||||
visibility ? Icons.visibility : Icons.visibility_off,
|
visibility
|
||||||
color: AppColors.c000000,
|
? AppIcons.icVisibility
|
||||||
|
: AppIcons.icVisibilityOff,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: widget.suffixIcon,
|
: widget.suffixIcon,
|
||||||
prefixIconConstraints: BoxConstraints(minHeight: 24, minWidth: 0),
|
prefixIconConstraints: BoxConstraints(minHeight: 24, minWidth: 0),
|
||||||
prefixIcon: widget.prefixIcon?.paddingOnly(left: 10).paddingAll(3),
|
prefixIcon: widget.prefixIcon?.paddingOnly(left: 10).paddingAll(3),
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 12, horizontal: 12),
|
contentPadding: EdgeInsets.symmetric(vertical: 16, horizontal: 14),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius40,
|
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius16,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide(
|
||||||
|
color: context.appThemeColors.borderColor,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius40,
|
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius16,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide(
|
||||||
|
color: context.appThemeColors.borderColor,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius40,
|
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius16,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide(
|
||||||
|
color: context.appThemeColors.borderColor,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius40,
|
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius16,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide(color: AppColors.cFF6F00, width: 1),
|
||||||
),
|
),
|
||||||
disabledBorder: OutlineInputBorder(
|
disabledBorder: OutlineInputBorder(
|
||||||
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius40,
|
borderRadius: widget.borderRadius ?? AppUtils.kBorderRadius40,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide(
|
||||||
|
color: context.appThemeColors.borderColor,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:food_delivery_client/core/core.dart';
|
||||||
|
|
||||||
|
import '../../../../core/theme/app_colors.dart';
|
||||||
|
|
||||||
|
/// A simple animated dot indicator that uses AnimatedContainer.
|
||||||
|
/// Update [activeIndex] to animate which dot is active.
|
||||||
|
class AnimatedDotsIndicator extends StatelessWidget {
|
||||||
|
final int count;
|
||||||
|
final int activeIndex;
|
||||||
|
final double dotSize;
|
||||||
|
final double activeDotWidth;
|
||||||
|
final double spacing;
|
||||||
|
final Duration duration;
|
||||||
|
final Curve curve;
|
||||||
|
final Color activeColor;
|
||||||
|
final Color inactiveColor;
|
||||||
|
final BorderRadius borderRadius;
|
||||||
|
|
||||||
|
const AnimatedDotsIndicator({
|
||||||
|
Key? key,
|
||||||
|
required this.count,
|
||||||
|
required this.activeIndex,
|
||||||
|
this.dotSize = 4,
|
||||||
|
this.activeDotWidth = 32.0,
|
||||||
|
this.spacing =4,
|
||||||
|
this.duration = const Duration(milliseconds: 300),
|
||||||
|
this.curve = Curves.easeInOut,
|
||||||
|
this.activeColor = AppColors.cFF6F00,
|
||||||
|
this.inactiveColor = AppColors.cFFEDCC,
|
||||||
|
this.borderRadius = const BorderRadius.all(Radius.circular(12)),
|
||||||
|
}) : assert(count >= 0),
|
||||||
|
assert(activeIndex >= 0),
|
||||||
|
super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: List.generate(count, (index) {
|
||||||
|
final bool isActive = index == activeIndex;
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(right: index == count - 1 ? 0 : spacing),
|
||||||
|
child: AnimatedContainer(
|
||||||
|
duration: duration,
|
||||||
|
curve: curve,
|
||||||
|
width: activeDotWidth,
|
||||||
|
height: dotSize,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: isActive ? activeColor : inactiveColor,
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
33
lib/feature/common/presentation/widgets/w_back_button.dart
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import '../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class WBackButton extends StatelessWidget {
|
||||||
|
const WBackButton({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
context.pop();
|
||||||
|
},
|
||||||
|
borderRadius: AppUtils.kBorderRadius22,
|
||||||
|
child: Ink(
|
||||||
|
height: 44,
|
||||||
|
width: 44,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: AppUtils.kBorderRadius22,
|
||||||
|
color: context.appThemeColors.iconColor,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: AppColors.cA7AEC1.newWithOpacity(.3),
|
||||||
|
offset: const Offset(0, 4),
|
||||||
|
blurRadius: 80,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
context.appThemeIcons.icArrowLeft,
|
||||||
|
).paddingAll(10),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||