Browse Source

add: home page

pull/2/head
AmirrezaChegini 1 month ago
parent
commit
348799b48d
  1. BIN
      assets/images/add_background.png
  2. BIN
      assets/images/cup.png
  3. BIN
      assets/images/icon_crown.png
  4. BIN
      assets/images/mic.png
  5. BIN
      assets/images/mic_blur.png
  6. BIN
      assets/images/shia_mind_group.png
  7. 39
      assets/svg/friend_battle.svg
  8. 3
      assets/svg/icon_clock.svg
  9. 37
      assets/svg/medal.svg
  10. 13
      lib/common_ui/resources/my_assets.dart
  11. 5
      lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
  12. 78
      lib/core/widgets/container/gradient_container.dart
  13. 49
      lib/features/home/presentation/pages/home_page.dart
  14. 136
      lib/features/home/presentation/pages/widgets/home_battle_cast.dart
  15. 75
      lib/features/home/presentation/pages/widgets/home_battle_league.dart
  16. 191
      lib/features/home/presentation/pages/widgets/home_custom_widget.dart
  17. 57
      lib/features/home/presentation/pages/widgets/home_membership.dart
  18. 5
      lib/l10n/app_en.arb
  19. 18
      lib/l10n/app_localizations.dart
  20. 9
      lib/l10n/app_localizations_en.dart
  21. 8
      pubspec.lock
  22. 1
      pubspec.yaml

BIN
assets/images/add_background.png

After

Width: 22  |  Height: 22  |  Size: 147 B

BIN
assets/images/cup.png

After

Width: 154  |  Height: 176  |  Size: 16 KiB

BIN
assets/images/icon_crown.png

After

Width: 20  |  Height: 16  |  Size: 1.0 KiB

BIN
assets/images/mic.png

After

Width: 45  |  Height: 86  |  Size: 3.4 KiB

BIN
assets/images/mic_blur.png

After

Width: 22  |  Height: 38  |  Size: 1.9 KiB

BIN
assets/images/shia_mind_group.png

After

Width: 161  |  Height: 108  |  Size: 19 KiB

39
assets/svg/friend_battle.svg

@ -0,0 +1,39 @@
<svg width="43" height="43" viewBox="0 0 43 43" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_9230)">
<path d="M20.1523 0.909063C20.6092 0.501738 21.2525 0.419434 21.8413 0.463945C22.5199 0.525254 23.1338 1.01236 23.358 1.65484C23.5159 2.1218 23.4773 2.6215 23.484 3.10693C23.4722 3.77797 23.5394 4.46664 23.327 5.11584C22.8491 4.64553 22.2284 4.33731 21.8102 3.80484C21.4869 3.40004 21.2483 2.93141 21.0728 2.44514C20.8679 1.87404 20.9023 1.2576 20.888 0.660469C20.6403 0.737735 20.3925 0.81332 20.1523 0.909063Z" fill="#F1C2AA" stroke="#F1C2AA" stroke-width="0.333333"/>
<path d="M20.1517 0.90875C20.3919 0.813008 20.6396 0.737422 20.8874 0.660156C20.9017 1.25729 20.8672 1.87373 21.0722 2.44482C21.2477 2.93109 21.4862 3.39973 21.8095 3.80453C22.2278 4.33699 22.8484 4.64522 23.3263 5.11553C23.0785 5.52033 22.7535 5.9033 22.2983 6.07799C21.445 6.42904 20.3339 6.16197 19.8367 5.35488C19.4479 4.73424 19.5462 3.97082 19.531 3.27375C19.526 2.46498 19.4622 1.48236 20.1517 0.90875Z" fill="#DBA589" stroke="#DBA589" stroke-width="0.333333"/>
<path d="M6.61328 1.30686C6.95846 1.0927 7.38426 1.20188 7.74035 1.33037C8.27449 1.55209 8.72717 1.9233 9.23275 2.19709C9.45111 2.32055 9.69635 2.18533 9.91135 2.12151C10.4161 1.92162 10.9469 1.72594 11.5012 1.79985C11.969 1.81076 12.383 2.21641 12.4065 2.68252C12.4368 3.21078 12.4317 3.75668 12.2369 4.25723C12.1495 4.56125 11.9681 4.92071 12.1781 5.21549C12.5871 5.82102 13.1019 6.43998 13.0868 7.21432C11.6339 7.27731 10.0953 6.94809 8.9682 5.98143C7.61018 4.83084 6.99289 2.98738 7.08779 1.24051C6.92906 1.26067 6.77033 1.28082 6.61328 1.30686Z" fill="#F9E771" stroke="#F9E771" stroke-width="0.333333"/>
<path d="M33.5877 2.28223C34.2613 2.03028 34.7114 1.33993 35.4438 1.20975C35.8822 1.15768 36.4482 1.15264 36.7044 1.586C37.1008 2.27635 36.9017 3.11032 37.0554 3.85946C37.105 4.12821 37.3628 4.27098 37.5652 4.4188C37.9826 4.69258 38.3496 5.04196 38.6478 5.44172C38.8855 5.76255 38.8695 6.20346 38.7217 6.55956C38.5184 7.10881 37.8869 7.32717 37.3553 7.40528C37.4208 7.35153 37.4863 7.29778 37.5509 7.24235C36.5742 6.96604 35.5563 6.70737 34.7341 6.08169C33.7952 5.33674 33.0956 4.27602 32.8436 3.09856C32.7663 2.70887 32.6429 2.3301 32.4648 1.97569C32.5178 1.98745 32.6236 2.00928 32.6765 2.0202C32.9889 2.07647 33.2787 2.21421 33.5877 2.28223Z" fill="#F9E771" stroke="#F9E771" stroke-width="0.333333"/>
<path d="M6.61035 1.30854C6.7674 1.2825 6.92613 1.26234 7.08486 1.24219C6.98996 2.98906 7.60724 4.83252 8.96527 5.98311C10.0923 6.94977 11.6309 7.27898 13.0839 7.216C13.0385 7.49062 13.02 7.81061 12.7966 8.00881C12.5774 8.19525 12.3062 8.34391 12.0131 8.3565C11.4117 8.38254 10.8079 8.32375 10.2082 8.3691C9.86978 8.93096 9.47674 9.46762 8.98291 9.90518C8.65117 10.1857 8.14642 10.1916 7.7559 10.0505C6.96896 9.57176 6.92697 8.56226 6.6599 7.77449C6.21058 7.54857 5.68652 7.51918 5.23972 7.2815C4.80888 7.06062 4.25963 6.82883 4.16892 6.29217C4.02783 5.66564 4.52586 5.16174 4.96761 4.80061C5.27752 4.52094 5.705 4.33281 5.88724 3.93893C5.96031 3.44342 5.86373 2.93279 5.98299 2.44064C6.06949 2.01568 6.18287 1.51934 6.61035 1.30854Z" fill="#F4CC54" stroke="#F4CC54" stroke-width="0.333333"/>
<path d="M30.5365 2.68067C30.6037 2.28594 30.9086 1.90381 31.3218 1.84754C31.7795 1.78119 32.2355 1.91809 32.6773 2.02055C32.6244 2.00963 32.5186 1.98779 32.4656 1.97604C32.6437 2.33045 32.7671 2.70922 32.8444 3.09891C33.0964 4.27637 33.796 5.33709 34.7349 6.08203C35.5571 6.70772 36.575 6.96639 37.5517 7.2427C37.4871 7.29813 37.4216 7.35188 37.3561 7.40563C37.0344 7.56184 36.6724 7.60551 36.3281 7.68949C36.2197 8.34961 36.1358 9.05928 35.731 9.61358C35.4211 10.0259 34.8584 10.2275 34.3603 10.0839C34.0882 9.98731 33.8707 9.78574 33.6767 9.57746C33.3508 9.20961 33.0191 8.82748 32.8545 8.35549C32.2884 8.34121 31.7224 8.35969 31.1563 8.36557C30.6516 8.40504 30.1527 8.05399 29.9705 7.59207C29.8898 7.14863 29.8646 6.65145 30.1099 6.25252C30.3215 5.82084 30.6608 5.46895 30.8733 5.03979C30.8515 4.70385 30.6969 4.39479 30.6323 4.06725C30.5315 3.61373 30.4912 3.14342 30.5365 2.68067Z" fill="#F4CC54" stroke="#F4CC54" stroke-width="0.333333"/>
<path d="M1.41016 12.7348C2.10387 12.5736 2.82193 12.6886 3.52656 12.6458C4.08422 12.6021 4.66539 12.7575 5.08027 13.1438C5.82521 13.8334 5.94867 15.1015 5.31627 15.9053C5.066 16.2454 4.67127 16.4251 4.2925 16.5838C3.63742 16.0279 3.11252 15.3199 2.77742 14.5279C2.54059 13.9669 2.45408 13.3588 2.40369 12.7567C2.07279 12.7399 1.74189 12.7231 1.41016 12.7348Z" fill="#F1C2AA" stroke="#F1C2AA" stroke-width="0.333333"/>
<path d="M38.6604 12.7135C38.9812 12.6304 39.3146 12.6539 39.643 12.6522C39.7102 13.3846 39.7992 14.1329 40.1209 14.8048C40.4148 15.4716 40.9087 16.02 41.431 16.5172C40.4971 16.6138 39.5565 16.56 38.6201 16.5617C38.138 16.4105 37.703 16.0864 37.4426 15.6505C37.1058 15.0424 37.1117 14.2689 37.4359 13.6558C37.6895 13.1906 38.1414 12.8311 38.6604 12.7135Z" fill="#DBA589" stroke="#DBA589" stroke-width="0.333333"/>
<path d="M39.644 12.6524C40.1471 12.644 40.651 12.639 41.1541 12.6457C41.8352 12.6306 42.4533 13.0967 42.7548 13.6854C42.9774 14.0667 42.8841 14.5236 42.906 14.9427C42.9169 15.7598 42.2047 16.404 41.4564 16.5846C40.7988 16.6736 40.1337 16.6349 39.4727 16.6517C39.1863 16.661 38.8999 16.6282 38.6211 16.5619C39.5575 16.5602 40.4981 16.614 41.4321 16.5174C40.9097 16.0202 40.4158 15.4718 40.1219 14.8049C39.8002 14.1331 39.7112 13.3848 39.644 12.6524Z" fill="#F2C3AA" stroke="#F2C3AA" stroke-width="0.333333"/>
<path d="M0.259616 13.7682C0.482175 13.2845 0.916374 12.9217 1.40936 12.7344C1.7411 12.7226 2.072 12.7394 2.4029 12.7562C2.45329 13.3584 2.53979 13.9664 2.77663 14.5275C3.11173 15.3194 3.63663 16.0274 4.29171 16.5834C3.50393 16.6094 2.71532 16.6103 1.92755 16.6078C1.03563 16.6724 0.213425 15.9006 0.111804 15.0339C0.0992061 14.6114 0.0496553 14.1554 0.259616 13.7682Z" fill="#DBA589" stroke="#DBA589" stroke-width="0.333333"/>
<g filter="url(#filter0_d_1_9230)">
<path d="M19.2317 11.0424C19.7591 10.7333 20.274 10.3294 20.9055 10.2807C21.312 10.2546 21.7252 10.2462 22.1283 10.3168C22.9715 10.5536 23.6963 11.1902 24.0222 12.0065C24.3203 12.7859 24.2439 13.6644 23.9382 14.4295C24.7965 14.065 25.8337 14.0121 26.6585 14.4958C27.7209 15.0392 28.302 16.3569 28.0047 17.51C27.9124 17.8812 27.7167 18.213 27.5462 18.5506C28.108 18.2306 28.732 17.9644 29.3947 18.0232C30.3387 18.0635 31.2365 18.6312 31.6681 19.4744C31.9999 19.9993 32.0217 20.6426 31.957 21.2415C31.8999 21.7034 31.6413 22.1023 31.4212 22.5004C31.7815 22.2778 32.1435 22.0099 32.5794 21.9704C33.158 21.92 33.7644 21.9595 34.2918 22.2249C35.0569 22.5692 35.623 23.273 35.8833 24.0616C36.0219 24.4799 36.0059 24.9284 35.9916 25.3634C35.9648 25.9076 35.7271 26.4073 35.5029 26.8936C35.004 28.1366 34.16 29.1939 33.3394 30.2379C32.2493 31.5539 30.9753 32.7162 29.5769 33.6963C28.3869 34.5908 27.0691 35.3189 25.6733 35.8363C24.7629 36.1428 23.8106 36.383 22.8431 36.3612C22.5474 36.3486 22.2476 36.3511 21.957 36.2864C21.6068 36.0328 21.2499 35.7892 20.903 35.5306C19.7869 34.6403 18.9395 33.4654 18.2306 32.2375C17.6495 31.2961 17.2371 30.2622 16.8877 29.2166C16.7021 28.6715 16.472 28.1424 16.3284 27.5848C16.0454 26.467 15.7749 25.339 15.7103 24.1834C15.6288 22.6507 15.7195 21.1146 15.7027 19.5802C16.5358 19.3224 17.222 18.6069 17.4084 17.7494C17.5394 17.2094 17.4067 16.6567 17.3076 16.1234C18.1559 16.362 19.1167 16.2536 19.8347 15.722C20.8988 15.0358 21.1382 13.4401 20.4092 12.4281C20.0783 11.9125 19.5131 11.5942 19.2317 11.0424Z" fill="#F2C9B3" stroke="#F2C9B3" stroke-width="0.333333"/>
<path d="M16.5728 10.4392C17.243 10.2175 18.04 10.2587 18.6263 10.6786C18.7867 10.7894 18.937 10.9146 19.0907 11.0355C19.1377 11.0372 19.1856 11.0397 19.2335 11.0422C19.5148 11.594 20.08 11.9123 20.4109 12.428C21.1399 13.44 20.9006 15.0357 19.8365 15.7218C19.1184 16.2535 18.1576 16.3618 17.3094 16.1233C16.6257 15.4506 15.9614 14.7552 15.2232 14.1404C15.2786 13.791 15.025 13.5089 14.9587 13.1822C14.7193 12.0349 15.4701 10.8037 16.5728 10.4392Z" fill="#CD9C80" stroke="#CD9C80" stroke-width="0.333333"/>
<path d="M12.4681 14.2379C13.2626 13.6979 14.4148 13.5442 15.2236 14.1397C15.9618 14.7544 16.6261 15.4498 17.3098 16.1225C17.4089 16.6558 17.5416 17.2085 17.4105 17.7485C17.2241 18.606 16.5379 19.3215 15.7048 19.5793C15.3504 19.6406 14.9868 19.665 14.6298 19.618C14.2578 19.5676 13.9218 19.3904 13.5767 19.2543C13.5918 19.2862 13.6203 19.3509 13.6354 19.3828C13.4045 19.0544 13.1248 18.7647 12.8275 18.4976C12.4403 18.1524 12.1531 17.7174 11.8449 17.305C11.5518 16.954 11.4829 16.4811 11.498 16.0377C11.5367 15.3348 11.9222 14.6713 12.4681 14.2379Z" fill="#C49276" stroke="#C49276" stroke-width="0.333333"/>
<path d="M8.53227 18.1819C9.02526 17.5386 9.83067 17.1338 10.6453 17.1615C11.0636 17.1817 11.4448 17.3715 11.8211 17.5377C11.827 17.4798 11.999 17.5 11.999 17.5C12.3072 17.9124 12.4409 18.1525 12.8281 18.4977C13.1254 18.7648 13.405 19.0545 13.636 19.3829C13.9123 19.8977 14.0895 20.4814 13.9829 21.071C13.8409 21.9259 13.1783 22.6532 12.3704 22.9421C11.8035 23.1244 11.1895 23.0765 10.6168 22.9472C10.1607 22.707 9.77776 22.3551 9.42922 21.9805C9.11344 21.6387 8.71955 21.3792 8.29795 21.1869C8.41973 21.181 8.54151 21.1743 8.66328 21.1684C8.41973 20.7434 8.11571 20.3185 8.09303 19.8104C8.06531 19.2418 8.21901 18.6581 8.53227 18.1819Z" fill="#CD9C80" stroke="#CD9C80" stroke-width="0.333333"/>
<path d="M13.5761 19.2559C13.9212 19.3919 14.2572 19.5691 14.6292 19.6195C14.9862 19.6665 15.3498 19.6422 15.7042 19.5809C15.721 21.1153 15.6303 22.6513 15.7118 24.1841C15.7765 25.3397 16.0469 26.4676 16.3299 27.5854C16.4735 28.1431 16.7036 28.6722 16.8892 29.2172C17.2386 30.2628 17.651 31.2967 18.2322 32.2382C18.941 33.466 19.7884 34.641 20.9045 35.5312C21.2514 35.7899 22.1478 36.0754 22.498 36.329C23.498 36.5 21.1128 36.2703 20.6946 36.329C20.5426 36.4197 20.4284 36.56 20.3099 36.6893C19.4734 37.6694 18.5807 38.5991 17.7224 39.5608C17.111 40.1537 16.5768 40.8205 15.9511 41.4009C15.1986 42.1869 14.1144 42.6917 13.0142 42.6102C12.1534 42.5254 11.3471 42.1038 10.7416 41.4916C8.60335 39.35 6.44411 37.2285 4.33526 35.0575C3.90862 34.5561 3.55001 33.9388 3.54665 33.2628C3.53321 32.7589 3.51558 32.2348 3.7079 31.7586C3.99261 30.9944 4.5931 30.4174 5.15327 29.8505C6.02839 28.8242 7.05888 27.9457 8.09188 27.0874C8.6529 26.9723 9.26515 27.0395 9.77913 26.7473C10.5829 26.3198 11.112 25.4363 11.1019 24.5242C11.1304 23.9548 10.8239 23.4559 10.6156 22.9487C11.1884 23.078 11.8023 23.1259 12.3692 22.9436C13.1771 22.6547 13.8398 21.9274 13.9817 21.0724C14.0884 20.4829 13.9112 19.8992 13.6349 19.3844C13.6197 19.3524 13.5912 19.2878 13.5761 19.2559Z" fill="#DDB49D" stroke="#DDB49D" stroke-width="0.333333"/>
<path d="M5.50158 22.3002C6.02984 21.3663 7.26357 20.7624 8.29658 21.1874C8.71818 21.3797 9.11206 21.6392 9.42785 21.981C9.77638 22.3556 10.1593 22.7075 10.6154 22.9477C10.8237 23.455 11.1302 23.9538 11.1017 24.5233C11.1117 25.4353 10.5826 26.3188 9.7789 26.7463C9.26492 27.0386 8.65267 26.9714 8.09165 27.0865C7.94804 26.8295 7.64822 26.7514 7.4139 26.601C6.83861 26.271 6.43044 25.7351 5.97273 25.2682C5.62839 24.923 5.31849 24.5056 5.24794 24.0109C5.19251 23.4348 5.18663 22.8108 5.50158 22.3002Z" fill="#C49276" stroke="#C49276" stroke-width="0.333333"/>
<path d="M33.3401 30.2368C34.1606 29.1929 35.0047 28.1355 35.5036 26.8926C35.4733 27.2428 35.6478 27.3254 35.9971 27.5C36.9971 28 37.4971 29 37.9971 29.5C37.8988 29.8326 37.4411 29.895 37.2202 30.1654C36.3031 31.3656 35.3247 32.5187 34.2875 33.6164C33.5039 34.4411 32.5893 35.1197 31.6923 35.8134C30.9012 36.3786 30.121 36.9623 29.2602 37.4183C28.3918 38.0222 27.4125 38.4429 26.4072 38.7621C26.015 38.8881 25.9052 38.9563 25.4971 39C24.716 38.1182 23.4971 37 22.8438 36.3601C23.8113 36.382 24.7636 36.1418 25.674 35.8352C27.0698 35.3179 28.3876 34.5897 29.5776 33.6953C30.976 32.7152 32.25 31.5529 33.3401 30.2368Z" fill="#C49276" stroke="#C49276" stroke-width="0.333333"/>
<path d="M37.6785 29C38.205 29.5173 38.6863 30.0775 39.1566 30.6453C39.8259 31.4288 39.9553 32.5584 39.7294 33.5352C39.3346 34.7991 38.1983 35.581 37.3803 36.5527C36.9302 37.1347 36.3809 37.6252 35.8678 38.1493C34.9834 39.0286 34.1234 39.9322 33.2105 40.7822C32.5739 41.4322 31.8483 42.073 30.9379 42.2821C29.9603 42.5223 28.9147 42.1889 28.1395 41.5792C27.5499 41.1089 26.9662 40.6268 26.4413 40.0843C26.0206 39.6492 25.5587 39.2486 25.1992 38.7573C25.6074 38.7136 26.0155 38.649 26.4078 38.523C27.413 38.2038 28.3923 37.7831 29.2607 37.1792C30.1215 36.7232 30.9018 36.1395 31.6929 35.5743C32.5898 34.8806 33.5044 34.202 34.288 33.3773C35.3252 32.2796 36.3036 31.1265 37.2207 29.9263C37.4416 29.6559 37.5802 29.3326 37.6785 29Z" fill="#CD9C80" stroke="#CD9C80" stroke-width="0.333333"/>
</g>
</g>
<defs>
<filter id="filter0_d_1_9230" x="1.37109" y="8.0957" width="40.6289" height="36.6895" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="1"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.543269 0 0 0 0 0.337333 0 0 0 0 0.222009 0 0 0 1 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_9230"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_9230" result="shape"/>
</filter>
<clipPath id="clip0_1_9230">
<rect width="43" height="43" fill="white"/>
</clipPath>
</defs>
</svg>

3
assets/svg/icon_clock.svg

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9 1.5C13.1423 1.5 16.5 4.85775 16.5 9C16.5 13.1423 13.1423 16.5 9 16.5C4.85775 16.5 1.5 13.1423 1.5 9C1.5 4.85775 4.85775 1.5 9 1.5ZM9 3C7.4087 3 5.88258 3.63214 4.75736 4.75736C3.63214 5.88258 3 7.4087 3 9C3 10.5913 3.63214 12.1174 4.75736 13.2426C5.88258 14.3679 7.4087 15 9 15C10.5913 15 12.1174 14.3679 13.2426 13.2426C14.3679 12.1174 15 10.5913 15 9C15 7.4087 14.3679 5.88258 13.2426 4.75736C12.1174 3.63214 10.5913 3 9 3ZM9 4.5C9.1837 4.50002 9.361 4.56747 9.49828 4.68954C9.63556 4.81161 9.72326 4.97981 9.74475 5.16225L9.75 5.25V8.6895L11.7802 10.7198C11.9148 10.8547 11.9929 11.0358 11.9987 11.2263C12.0045 11.4167 11.9376 11.6023 11.8116 11.7452C11.6855 11.8881 11.5098 11.9777 11.3201 11.9958C11.1305 12.0139 10.941 11.9591 10.7902 11.8425L10.7198 11.7802L8.46975 9.53025C8.35318 9.41358 8.27832 9.26175 8.25675 9.09825L8.25 9V5.25C8.25 5.05109 8.32902 4.86032 8.46967 4.71967C8.61032 4.57902 8.80109 4.5 9 4.5Z" fill="white"/>
</svg>

37
assets/svg/medal.svg

@ -0,0 +1,37 @@
<svg width="37" height="51" viewBox="0 0 37 51" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d_1_9262)">
<path d="M21.4102 21.1695C21.9263 20.9531 22.3278 20.5109 22.4807 19.9652L22.8535 19.6641L23.2072 19.9652C23.0256 20.8872 22.3278 21.6305 21.4293 21.894L21.4102 21.1695Z" fill="#F8BA06"/>
<path d="M19.9225 21.9018C19.0239 21.6289 18.3357 20.8856 18.1445 19.973L18.4982 19.6719L18.871 19.973C19.0239 20.5093 19.4254 20.9515 19.9416 21.1773L19.9225 21.9018Z" fill="#F8BA06"/>
<path d="M19.9102 22.559V21.364C19.9102 20.9501 20.2543 20.6113 20.6749 20.6113C20.8852 20.6113 21.0763 20.696 21.2102 20.8277C21.344 20.9595 21.43 21.1476 21.43 21.3546V22.5496H19.9102V22.559Z" fill="#E8A615"/>
<path d="M17.0807 2.00977L17.377 2.31085V19.3694L17.0807 19.8586C16.9182 19.8022 16.7748 19.7081 16.641 19.6046L11.1638 15.0412C10.8101 14.7496 10.6094 14.3261 10.6094 13.8745V2.71544C10.6094 2.32967 10.9344 2.00977 11.3263 2.00977H17.0807Z" fill="#F41943"/>
<path d="M30.74 2.71508V13.8647C30.74 14.3164 30.5393 14.7398 30.1856 15.0315L24.7084 19.5948C24.5745 19.7077 24.4312 19.7924 24.2687 19.8489L23.8672 19.4537V2.60218L24.2687 2H30.0231C30.415 2.00941 30.74 2.32932 30.74 2.71508Z" fill="#F41943"/>
<path d="M24.2685 2.00977V19.8586C24.0869 19.9245 23.8957 19.9621 23.7046 19.9621H17.6538C17.4626 19.9621 17.2619 19.9245 17.0898 19.8586V2.00977H24.2685Z" fill="#EBF2F2"/>
<path d="M17.0802 17.6394V19.8599C16.9177 19.8034 16.7743 19.7093 16.6404 19.6058L12.75 16.3691C13.7919 16.7455 15.3691 17.2724 17.0802 17.6394Z" fill="#C6123D"/>
<path d="M24.2685 17.0195V19.861C24.0869 19.9269 23.8957 19.9645 23.7046 19.9645H17.6538C17.4626 19.9645 17.2619 19.9269 17.0898 19.861V17.6405C17.1854 17.6593 17.2906 17.6782 17.3862 17.7064C18.495 17.9322 19.6421 18.0827 20.7318 18.0827C21.8693 18.0827 22.9303 17.744 23.8766 17.2548C24.0009 17.1795 24.1347 17.1042 24.2685 17.0195Z" fill="#C3DBDA"/>
<path d="M30.7409 2.71508V13.8647C30.7409 14.3164 30.5401 14.7398 30.1865 15.0315L24.7092 19.5948C24.5754 19.7077 24.432 19.7924 24.2695 19.8489V17.0074C25.4931 16.2923 26.4872 15.3514 27.1372 14.6363C27.7107 14.0153 28.0166 13.2061 28.0166 12.3687V5.40606C28.0166 3.56189 26.5254 2.04704 24.6614 2C24.6041 2 24.5372 2 24.4703 2H30.0144C30.4159 2.00941 30.7409 2.32932 30.7409 2.71508Z" fill="#C6123D"/>
<path d="M14.4922 3.00781H11.8158C11.7011 3.00781 11.6055 3.1019 11.6055 3.21481V6.39505C11.6055 6.62087 11.9114 6.68673 12.0069 6.47973C12.4371 5.52002 13.2496 4.16512 14.5974 3.39358C14.7886 3.28067 14.7025 3.00781 14.4922 3.00781Z" fill="#FF85A2"/>
<path d="M20.6751 44.9994C27.026 44.9994 32.1744 39.9317 32.1744 33.6804C32.1744 27.429 27.026 22.3613 20.6751 22.3613C14.3242 22.3613 9.17578 27.429 9.17578 33.6804C9.17578 39.9317 14.3242 44.9994 20.6751 44.9994Z" fill="#F9B906"/>
<path d="M32.1772 33.6814C32.1772 39.9383 27.025 45.0004 20.6779 45.0004C17.3228 45.0004 14.3022 43.589 12.1992 41.3309C14.2448 43.175 17.4375 44.3794 20.4294 44.3794C26.786 44.3794 31.6132 39.562 31.6132 33.3144C31.6132 30.3694 30.3228 27.3397 28.4493 25.3262C30.7338 27.3962 32.1772 30.3694 32.1772 33.6814Z" fill="#E8A615"/>
<path d="M20.6757 43.9956C26.4617 43.9956 31.1522 39.3787 31.1522 33.6834C31.1522 27.9881 26.4617 23.3711 20.6757 23.3711C14.8897 23.3711 10.1992 27.9881 10.1992 33.6834C10.1992 39.3787 14.8897 43.9956 20.6757 43.9956Z" fill="#E8A615"/>
<path d="M30.512 33.6822C30.512 39.0265 26.0958 43.3641 20.6759 43.3641C19.1369 43.3641 17.684 43.0159 16.384 42.395C15.0266 41.7457 13.8509 40.8048 12.9332 39.6475C12.5126 39.1206 12.1494 38.5467 11.8435 37.9445C11.2031 36.6555 10.8398 35.2159 10.8398 33.6916C10.8398 32.5625 11.0406 31.4711 11.4038 30.4643C12.5031 27.4252 15.0935 25.073 18.3149 24.292C19.07 24.1039 19.8634 24.0098 20.6855 24.0098C22.5016 24.0098 24.2031 24.499 25.6656 25.3458C26.3156 25.7222 26.9178 26.1738 27.4627 26.6819C28.4855 27.6416 29.3075 28.8178 29.8333 30.1444C30.273 31.2265 30.512 32.4308 30.512 33.6822Z" fill="#F9B906"/>
<path d="M25.6561 25.3247L11.8435 37.9328C11.2031 36.6437 10.8398 35.2042 10.8398 33.6799C10.8398 32.5508 11.0406 31.4594 11.4038 30.4526L18.3149 24.2803C19.07 24.0921 19.8634 23.998 20.6855 23.998C22.4921 23.998 24.1936 24.4779 25.6561 25.3247Z" fill="#FFC943"/>
<path d="M29.8241 30.125L16.3843 42.3943C15.027 41.7451 13.8512 40.8042 12.9336 39.6469L27.463 26.6719C28.4763 27.6316 29.2983 28.8077 29.8241 30.125Z" fill="#FFC943"/>
<path d="M20.4781 21.5159C20.5889 21.5159 20.6788 21.4022 20.6788 21.2619C20.6788 21.1215 20.5889 21.0078 20.4781 21.0078C20.3672 21.0078 20.2773 21.1215 20.2773 21.2619C20.2773 21.4022 20.3672 21.5159 20.4781 21.5159Z" fill="#F8BA06"/>
</g>
<path d="M2.30893 12.9071C2.74643 12.8603 2.5514 12.8377 2.84018 12.9293C3.27334 13.0875 3.64044 13.3524 4.05045 13.5477C4.22753 13.6358 4.4264 13.5393 4.60076 13.4938C5.01009 13.3512 5.44053 13.2116 5.89004 13.2643C6.2694 13.2721 6.60517 13.5615 6.62424 13.894C6.64876 14.2709 6.64467 14.6603 6.48666 15.0174C6.41583 15.2343 6.26872 15.4908 6.43898 15.7011C6.77067 16.1331 7.18843 16.58 7.17617 17.1324C5.99791 17.1774 4.74991 16.9372 3.83591 16.2475C2.73461 15.4267 2.23402 14.1115 2.31098 12.8652C2.18226 12.8796 2.4363 12.8885 2.30893 12.9071Z" fill="#DAF9E9" stroke="#DAF9E9" stroke-width="0.39375"/>
<path d="M2.10666 12.8795C2.22964 12.8593 2.35393 12.8437 2.47822 12.8281C2.40391 14.1807 2.88728 15.6081 3.95069 16.4989C4.83325 17.2474 6.03806 17.5023 7.17578 17.4535C7.14027 17.6662 7.1258 17.9139 6.95087 18.0674C6.77922 18.2118 6.5668 18.3269 6.33728 18.3366C5.86641 18.3568 5.39356 18.3112 4.92401 18.3464C4.65897 18.7814 4.3512 19.1969 3.9645 19.5357C3.70473 19.7529 3.30949 19.7575 3.00368 19.6482C2.38747 19.2776 2.35459 18.4959 2.14546 17.886C1.79362 17.711 1.38325 17.6883 1.03338 17.5043C0.696007 17.3332 0.265907 17.1538 0.194882 16.7382C0.0843975 16.2531 0.474381 15.863 0.820302 15.5833C1.06297 15.3668 1.39771 15.2211 1.54042 14.9162C1.59764 14.5325 1.52201 14.1371 1.61539 13.7561C1.68313 13.427 1.77191 13.0427 2.10666 12.8795Z" fill="#B4E2CA" stroke="#B4E2CA" stroke-width="0.35"/>
<path d="M33.3953 20.7466C33.6453 20.7198 33.5338 20.7069 33.6989 20.7593C33.9464 20.8497 34.1561 21.001 34.3904 21.1126C34.4916 21.163 34.6053 21.1078 34.7049 21.0818C34.9388 21.0003 35.1848 20.9206 35.4416 20.9507C35.6584 20.9551 35.8503 21.1205 35.8612 21.3105C35.8752 21.5259 35.8728 21.7484 35.7826 21.9525C35.7421 22.0764 35.658 22.223 35.7553 22.3431C35.9448 22.59 36.1836 22.8454 36.1766 23.1611C35.5033 23.1867 34.7901 23.0495 34.2678 22.6554C33.6385 22.1863 33.3525 21.4348 33.3965 20.7227C33.3229 20.7309 33.4681 20.736 33.3953 20.7466Z" fill="#DAF9E9" stroke="#DAF9E9" stroke-width="0.225"/>
<path d="M33.2791 20.7305C33.3494 20.719 33.4204 20.7101 33.4915 20.7012C33.449 21.4741 33.7252 22.2897 34.3329 22.7988C34.8372 23.2265 35.5257 23.3721 36.1758 23.3443C36.1555 23.4658 36.1472 23.6073 36.0473 23.695C35.9492 23.7775 35.8278 23.8433 35.6966 23.8489C35.4276 23.8604 35.1574 23.8344 34.8891 23.8545C34.7376 24.103 34.5617 24.3405 34.3408 24.5341C34.1923 24.6582 33.9665 24.6608 33.7917 24.5984C33.4396 24.3866 33.4208 23.9399 33.3013 23.5914C33.1003 23.4914 32.8658 23.4784 32.6658 23.3732C32.4731 23.2755 32.2273 23.173 32.1867 22.9355C32.1236 22.6583 32.3464 22.4354 32.5441 22.2756C32.6827 22.1518 32.874 22.0686 32.9556 21.8943C32.9883 21.6751 32.9451 21.4492 32.9984 21.2314C33.0371 21.0434 33.0879 20.8238 33.2791 20.7305Z" fill="#B4E2CA" stroke="#B4E2CA" stroke-width="0.2"/>
<defs>
<filter id="filter0_d_1_9262" x="5.17578" y="0" width="31" height="51" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_9262"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_9262" result="shape"/>
</filter>
</defs>
</svg>

13
lib/common_ui/resources/my_assets.dart

@ -10,6 +10,12 @@ class MyAssets {
static const String iconProfile = 'assets/images/icon_profile.png'; static const String iconProfile = 'assets/images/icon_profile.png';
static const String iconDiamond = 'assets/images/icon_diamond.png'; static const String iconDiamond = 'assets/images/icon_diamond.png';
static const String iconFlash = 'assets/images/icon_flash.png'; static const String iconFlash = 'assets/images/icon_flash.png';
static const String iconCrown = 'assets/images/icon_crown.png';
static const String shiaMindGroup = 'assets/images/shia_mind_group.png';
static const String cup = 'assets/images/cup.png';
static const String addBackground = 'assets/images/add_background.png';
static const String mic = 'assets/images/mic.png';
static const String micBLur = 'assets/images/mic_blur.png';
/// ----- Svg ----- /// ----- Svg -----
static const String sampleSvg = 'assets/svg/sample.svg'; static const String sampleSvg = 'assets/svg/sample.svg';
@ -19,6 +25,10 @@ class MyAssets {
static const String iconPlus = 'assets/svg/icon_plus.svg'; static const String iconPlus = 'assets/svg/icon_plus.svg';
static const String iconSetting = 'assets/svg/icon_setting.svg'; static const String iconSetting = 'assets/svg/icon_setting.svg';
static const String iconShare = 'assets/svg/icon_share.svg'; static const String iconShare = 'assets/svg/icon_share.svg';
static const String iconClock = 'assets/svg/icon_clock.svg';
static const String medal = 'assets/svg/medal.svg';
static const String friendBattle = 'assets/svg/friend_battle.svg';
/// ----- Audios ----- /// ----- Audios -----
static const String sampleAudio = 'assets/audios/sample.mp3'; static const String sampleAudio = 'assets/audios/sample.mp3';
@ -32,5 +42,8 @@ class MyAssets {
question, question,
iconProfile, iconProfile,
iconDiamond, iconDiamond,
iconFlash,
iconCrown,
shiaMindGroup,
]; ];
} }

5
lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart'; import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart';
import 'package:get/get_state_manager/src/simple/get_view.dart'; import 'package:get/get_state_manager/src/simple/get_view.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart'; import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart';
import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart'; import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart';
@ -12,6 +13,10 @@ class BottomNavBar extends GetView<HomeController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
clipBehavior: Clip.none,
padding: EdgeInsets.symmetric(
horizontal: MySpaces.s30
),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: RadialGradient( gradient: RadialGradient(
radius: 2.5, radius: 2.5,

78
lib/core/widgets/container/gradient_container.dart

@ -0,0 +1,78 @@
import 'package:flutter/material.dart';
class GradientContainer extends StatelessWidget {
const GradientContainer({
super.key,
this.width,
this.height,
this.margin,
this.padding,
this.shapeBorder,
this.boxShape,
this.borderGradient,
this.borderRadius,
this.boxShadow,
this.color,
this.child,
this.image,
this.gradient,
this.borderColor,
});
final double? width;
final double? height;
final EdgeInsetsGeometry? margin;
final EdgeInsetsGeometry? padding;
final ShapeBorder? shapeBorder;
final BoxShape? boxShape;
final Gradient? borderGradient;
final Gradient? gradient;
final BorderRadiusGeometry? borderRadius;
final List<BoxShadow>? boxShadow;
final Color? color;
final Color? borderColor;
final Widget? child;
final DecorationImage? image;
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(1),
width: width,
height: height,
margin: margin,
decoration: shapeBorder == null
? BoxDecoration(
shape: boxShape ?? BoxShape.rectangle,
gradient: borderGradient,
borderRadius: borderRadius,
boxShadow: boxShadow,
color: borderColor,
)
: ShapeDecoration(
shape: shapeBorder!,
gradient: borderGradient,
shadows: boxShadow,
color: borderColor,
),
child: Container(
padding: padding,
decoration: shapeBorder == null
? BoxDecoration(
shape: boxShape ?? BoxShape.rectangle,
gradient: gradient,
borderRadius: borderRadius,
color: color,
image: image,
)
: ShapeDecoration(
shape: shapeBorder!,
gradient: gradient,
color: color,
image: image,
),
child: child,
),
);
}
}

49
lib/features/home/presentation/pages/home_page.dart

@ -1,9 +1,17 @@
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' hide BoxShadow, BoxDecoration;
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
import 'package:shia_game_flutter/core/utils/gap.dart';
import 'package:shia_game_flutter/core/widgets/app_bar/home_app_bar.dart'; import 'package:shia_game_flutter/core/widgets/app_bar/home_app_bar.dart';
import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/bottom_nav_bar.dart'; import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/bottom_nav_bar.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
import 'package:shia_game_flutter/features/home/presentation/controller/home_controller.dart'; import 'package:shia_game_flutter/features/home/presentation/controller/home_controller.dart';
import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_battle_cast.dart';
import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_battle_league.dart';
import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_custom_widget.dart';
import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_membership.dart';
class HomePage extends GetView<HomeController> { class HomePage extends GetView<HomeController> {
const HomePage({super.key}); const HomePage({super.key});
@ -14,6 +22,45 @@ class HomePage extends GetView<HomeController> {
backgroundColor: context.backgroundColor, backgroundColor: context.backgroundColor,
bottomNavigationBar: BottomNavBar(), bottomNavigationBar: BottomNavBar(),
appBar: HomeAppBar(), appBar: HomeAppBar(),
body: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: MySpaces.s32),
child: Column(
children: [
MySpaces.s28.gapHeight,
MyImage(asset: MyAssets.shiaMindGroup),
MySpaces.s40.gapHeight,
HomeMembership(),
HomeBattleLeague(),
MySpaces.s20.gapHeight,
_customWidgets(),
MySpaces.s20.gapHeight,
HomeBattleCast(),
],
),
),
);
}
Widget _customWidgets() {
return Row(
spacing: MySpaces.s22,
children: [
Expanded(
child: HomeCustomWidget(
type: CustomWidgetType.customLeague,
firstText: 'ongoing:',
secondText:
'Saba Center League - Imam Hassan ministry London school',
),
),
Expanded(
child: HomeCustomWidget(
type: CustomWidgetType.friendBattle,
firstText: 'online:',
secondText: 'No one\'s online',
),
),
],
); );
} }
} }

136
lib/features/home/presentation/pages/widgets/home_battle_cast.dart

@ -0,0 +1,136 @@
import 'package:flutter/material.dart' hide BoxDecoration, BoxShadow;
import 'package:flutter_inset_box_shadow_update/flutter_inset_box_shadow_update.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/gap.dart';
import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class HomeBattleCast extends StatelessWidget {
const HomeBattleCast({
super.key,
});
@override
Widget build(BuildContext context) {
return Stack(
alignment: Alignment.center,
clipBehavior: Clip.none,
children: [
GradientContainer(
height: 120,
borderRadius: BorderRadiusDirectional.all(Radius.circular(MySpaces.s20)),
borderGradient: LinearGradient(
begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFF567EFF), Color(0XFF304DB8)],
),
gradient: RadialGradient(
radius: 1,
center: Alignment(-0.5, -1),
colors: [Color(0XFF104CBA).withValues(alpha: 0.2), Color(0XFF104CBA)],
),
padding: EdgeInsets.all(MySpaces.s10),
image: DecorationImage(
image: AssetImage(MyAssets.addBackground),
repeat: ImageRepeat.repeat,
colorFilter: ColorFilter.mode(
Colors.black.withValues(alpha: 0.02),
BlendMode.srcIn,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
ShaderMask(
blendMode: BlendMode.modulate,
shaderCallback: (bounds) => LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0XFFFFFFFF), Color(0XFFE4E3FF)],
).createShader(bounds),
child: Text(
'Battle Cast',
style: Lexend.extraBold.copyWith(
fontSize: 22,
shadows: [
BoxShadow(
color: Color(0xFF3C38C4),
blurRadius: 0.52,
offset: Offset(0, 1.04),
spreadRadius: 0,
),
],
),
),
),
MySpaces.s10.gapHeight,
Container(
padding: EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
color: Color(0XFF203689),
boxShadow: [
BoxShadow(
color: Color(0XFF000000).withValues(alpha: 0.3),
blurRadius: 3,
offset: Offset(0, 2),
inset: true,
),
],
),
child: Text(
'Sheikh.Sadra VS Ali Masoudi (online) - Sheikh.Sadra number tow VS Ali Masoudi tabar (tomorrow)',
maxLines: 1,
style: Lexend.semiBold.copyWith(
fontSize: 8,
color: Color(0XFFB6B3FF),
),
),
),
],
),
),
PositionedDirectional(
start: -1,
top: -MySpaces.s4,
child: GradientContainer(
color: Color(0XFFCC9B22),
padding: EdgeInsets.symmetric(
vertical: MySpaces.s2,
horizontal: MySpaces.s8,
),
borderRadius: BorderRadiusDirectional.only(
topStart: Radius.circular(6),
topEnd: Radius.circular(6),
bottomStart: Radius.circular(0),
bottomEnd: Radius.circular(6),
),
child: Text(
'2 New',
style: Lexend.extraBold.copyWith(
fontSize: 11,
),
),
),
),
PositionedDirectional(
end: MySpaces.s20,
top: -MySpaces.s10,
child: Row(
children: [
MyImage(
asset: MyAssets.mic,
),
MyImage(
asset: MyAssets.micBLur,
),
],
),
),
],
);
}
}

75
lib/features/home/presentation/pages/widgets/home_battle_league.dart

@ -0,0 +1,75 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class HomeBattleLeague extends StatelessWidget {
const HomeBattleLeague({super.key});
@override
Widget build(BuildContext context) {
return Stack(
alignment: AlignmentDirectional.bottomEnd,
children: [
GradientContainer(
width: context.widthScreen,
height: 120,
padding: EdgeInsets.symmetric(
horizontal: MySpaces.s12,
vertical: MySpaces.s16,
),
borderGradient: LinearGradient(
begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd,
colors: [Color(0XFF3A0A85), Color(0XFF6C2ECD)],
),
gradient: LinearGradient(
begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd,
colors: [Color(0XFF3A0D83), Color(0XFF4F09BF)],
),
borderRadius: BorderRadius.all(Radius.circular(20)),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ShaderMask(
blendMode: BlendMode.modulate,
shaderCallback: (bounds) => LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0XFFFFFFFF), Color(0XFFCAA8FF)],
).createShader(bounds),
child: Text(
'Battle League',
style: Lexend.extraBold.copyWith(
fontSize: 22,
shadows: [
BoxShadow(
color: Color(0xFF3E1381),
blurRadius: 0.84,
offset: Offset(0, 1.69),
spreadRadius: 0,
),
],
),
),
),
Text(
'The faster you answer, the winner',
style: Lexend.medium.copyWith(
fontSize: 10,
color: Color(0XFFA183D2),
),
),
],
),
),
MyImage(asset: MyAssets.cup),
],
);
}
}

191
lib/features/home/presentation/pages/widgets/home_custom_widget.dart

@ -0,0 +1,191 @@
import 'package:flutter/material.dart' hide BoxDecoration, BoxShadow;
import 'package:flutter_inset_box_shadow_update/flutter_inset_box_shadow_update.dart';
import 'package:get/get.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/gap.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
enum CustomWidgetType {
customLeague,
friendBattle;
static Map<CustomWidgetType, Gradient> get borderGradient => {
CustomWidgetType.customLeague: LinearGradient(
begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFF4BAD42), Color(0XFF147743)],
),
CustomWidgetType.friendBattle: LinearGradient(
begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFFED9851), Color(0XFFC77041)],
),
};
static Map<CustomWidgetType, Gradient> get gradient => {
CustomWidgetType.customLeague: RadialGradient(
radius: 0.7,
center: Alignment(-0.6, -0.8),
colors: [Color(0XFF58AE23), Color(0XFF066A36)],
),
CustomWidgetType.friendBattle: RadialGradient(
radius: 0.7,
center: Alignment(-0.6, -0.8),
colors: [Color(0XFFE99E53), Color(0XFFBC673A)],
),
};
static Map<CustomWidgetType, String> get image => {
CustomWidgetType.customLeague: MyAssets.medal,
CustomWidgetType.friendBattle: MyAssets.friendBattle,
};
static Map<CustomWidgetType, Color> get containerColor => {
CustomWidgetType.customLeague: Color(0XFF05542B),
CustomWidgetType.friendBattle: Color(0XFFA45A31),
};
static Map<CustomWidgetType, Color> get firstTextColor => {
CustomWidgetType.customLeague: Color(0XFF4FDF94),
CustomWidgetType.friendBattle: Color(0XFFE3DFD5),
};
static Map<CustomWidgetType, Color> get secondTextColor => {
CustomWidgetType.customLeague: Color(0XFF85C9A6),
CustomWidgetType.friendBattle: Color(0XFFDFBC9D),
};
static Map<CustomWidgetType, Widget> get title => {
CustomWidgetType.customLeague: ShaderMask(
blendMode: BlendMode.modulate,
shaderCallback: (bounds) => LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0XFFFFFFFF), Color(0XFFFFFFFF), Color(0XFFBEF8DA)],
).createShader(bounds),
child: Text(
Get.context?.translate.custom_league ?? '',
style: Lexend.extraBold.copyWith(
fontSize: 14,
shadows: [
BoxShadow(
color: Color(0xFF07592F),
blurRadius: 0.52,
offset: Offset(0, 1.04),
spreadRadius: 0,
),
],
),
),
),
CustomWidgetType.friendBattle: ShaderMask(
blendMode: BlendMode.modulate,
shaderCallback: (bounds) => LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0XFFFFFFFF), Color(0XFFFFFFFF), Color(0XFFFFB994)],
).createShader(bounds),
child: Text(
Get.context?.translate.friends_battle ?? '',
style: Lexend.extraBold.copyWith(
fontSize: 14,
shadows: [
BoxShadow(
color: Color(0xFFAA5B31),
blurRadius: 0.52,
offset: Offset(0, 1.04),
spreadRadius: 0,
),
],
),
),
),
};
}
class HomeCustomWidget extends StatelessWidget {
const HomeCustomWidget({
super.key,
this.type = CustomWidgetType.customLeague,
this.firstText,
this.secondText,
});
final CustomWidgetType type;
final String? firstText;
final String? secondText;
@override
Widget build(BuildContext context) {
return GradientContainer(
height: 130,
borderRadius: BorderRadius.all(Radius.circular(20)),
borderGradient: CustomWidgetType.borderGradient[type],
gradient: CustomWidgetType.gradient[type],
image: DecorationImage(
image: AssetImage(MyAssets.addBackground),
repeat: ImageRepeat.repeat,
colorFilter: ColorFilter.mode(
Colors.black.withValues(alpha: 0.02),
BlendMode.srcIn,
),
),
padding: EdgeInsets.all(MySpaces.s10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Align(
alignment: AlignmentDirectional.centerEnd,
child: MyImage(asset: CustomWidgetType.image[type] ?? '',),
),
Spacer(),
CustomWidgetType.title[type] ?? SizedBox.shrink(),
MySpaces.s10.gapHeight,
Container(
padding: EdgeInsets.all(5),
width: context.widthScreen,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
color: CustomWidgetType.containerColor[type],
boxShadow: [
BoxShadow(
color: Color(0XFF000000).withValues(alpha: 0.3),
blurRadius: 3,
offset: Offset(0, 2),
inset: true,
),
],
),
child: Text.rich(
maxLines: 1,
overflow: TextOverflow.ellipsis,
TextSpan(
children: [
TextSpan(
text: firstText,
style: Lexend.semiBold.copyWith(
fontSize: 8,
color: CustomWidgetType.firstTextColor[type],
),
),
TextSpan(
text: ' $secondText',
style: Lexend.semiBold.copyWith(
fontSize: 8,
color: CustomWidgetType.secondTextColor[type],
),
),
],
),
),
),
],
),
);
}
}

57
lib/features/home/presentation/pages/widgets/home_membership.dart

@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
import 'package:shia_game_flutter/core/utils/gap.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class HomeMembership extends StatelessWidget {
const HomeMembership({super.key});
@override
Widget build(BuildContext context) {
return GradientContainer(
width: context.widthScreen,
color: context.backgroundColor,
borderGradient: LinearGradient(
begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd,
colors: [
Color(0XFFDE8B4D).withValues(alpha: 0.3),
Color(0XFFDE8B4D).withValues(alpha: 0.05),
],
),
borderRadius: BorderRadius.all(Radius.circular(MySpaces.s20)),
boxShadow: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 17,
offset: Offset(0, 4),
spreadRadius: 20,
),
],
padding: EdgeInsets.symmetric(horizontal: MySpaces.s16, vertical: 13),
child: Row(
children: [
MyImage(asset: MyAssets.iconCrown),
MySpaces.s8.gapWidth,
Text(
context.translate.pro_membership,
style: Lexend.semiBold.copyWith(
fontSize: 12,
color: Color(0XFFFCC230),
),
),
Spacer(),
MyImage(asset: MyAssets.iconClock),
MySpaces.s6.gapWidth,
Text('125d 4h', style: Lexend.semiBold.copyWith(fontSize: 12)),
],
),
);
}
}

5
lib/l10n/app_en.arb

@ -4,5 +4,8 @@
"home": "Home", "home": "Home",
"shop": "Shop", "shop": "Shop",
"awards": "Awards", "awards": "Awards",
"profile": "Profile"
"profile": "Profile",
"pro_membership": "Pro Membership",
"custom_league": "Custom League",
"friends_battle": "Friends Battle"
} }

18
lib/l10n/app_localizations.dart

@ -123,6 +123,24 @@ abstract class AppLocalizations {
/// In en, this message translates to: /// In en, this message translates to:
/// **'Profile'** /// **'Profile'**
String get profile; String get profile;
/// No description provided for @pro_membership.
///
/// In en, this message translates to:
/// **'Pro Membership'**
String get pro_membership;
/// No description provided for @custom_league.
///
/// In en, this message translates to:
/// **'Custom League'**
String get custom_league;
/// No description provided for @friends_battle.
///
/// In en, this message translates to:
/// **'Friends Battle'**
String get friends_battle;
} }
class _AppLocalizationsDelegate class _AppLocalizationsDelegate

9
lib/l10n/app_localizations_en.dart

@ -22,4 +22,13 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get profile => 'Profile'; String get profile => 'Profile';
@override
String get pro_membership => 'Pro Membership';
@override
String get custom_league => 'Custom League';
@override
String get friends_battle => 'Friends Battle';
} }

8
pubspec.lock

@ -102,6 +102,14 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_inset_box_shadow_update:
dependency: "direct main"
description:
name: flutter_inset_box_shadow_update
sha256: "91c912d01c049e761d0b7e9d81061acc62677f33bdde4e854257f1b10d8f0821"
url: "https://pub.dev"
source: hosted
version: "0.0.1"
flutter_lints: flutter_lints:
dependency: "direct dev" dependency: "direct dev"
description: description:

1
pubspec.yaml

@ -11,6 +11,7 @@ dependencies:
equatable: ^2.0.7 equatable: ^2.0.7
flutter: flutter:
sdk: flutter sdk: flutter
flutter_inset_box_shadow_update: ^0.0.1
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
get: ^4.7.2 get: ^4.7.2

Loading…
Cancel
Save