feature/awards
#5
Merged
amirreza.chegini
merged 2 commits from feature/awards into develop 4 weeks ago
54 changed files with 615 additions and 182 deletions
-
13analysis_options.yaml
-
9assets/svg/cast_award_bronze.svg
-
9assets/svg/cast_award_gold.svg
-
9assets/svg/cast_award_silver.svg
-
9assets/svg/custom_award_bronze.svg
-
9assets/svg/custom_award_gold.svg
-
9assets/svg/custom_award_silver.svg
-
9assets/svg/league_award_bronze.svg
-
9assets/svg/league_award_gold.svg
-
9assets/svg/league_award_silver.svg
-
9lib/common_ui/resources/my_assets.dart
-
11lib/common_ui/resources/my_text_style.dart
-
15lib/core/utils/page_scalable.dart
-
12lib/core/widgets/app_bar/master_app_bar.dart
-
6lib/core/widgets/app_bar/styles/app_bar_action.dart
-
10lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
-
2lib/core/widgets/background/my_background.dart
-
4lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
-
4lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
-
18lib/core/widgets/button/styles/active_style.dart
-
14lib/core/widgets/button/styles/default_style.dart
-
6lib/core/widgets/container/my_container.dart
-
8lib/core/widgets/input/my_input.dart
-
4lib/core/widgets/text/gradient_text.dart
-
17lib/features/awards/presentation/controller/awards_controller.dart
-
25lib/features/awards/presentation/ui/awards_page.dart
-
186lib/features/awards/presentation/ui/widgets/award_widget.dart
-
8lib/features/home/presentation/pages/home_page.dart
-
32lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
-
38lib/features/home/presentation/pages/widgets/home_battle_cast.dart
-
18lib/features/home/presentation/pages/widgets/home_battle_league.dart
-
18lib/features/home/presentation/pages/widgets/home_custom_widget.dart
-
18lib/features/home/presentation/pages/widgets/home_membership.dart
-
4lib/features/intro/presentation/ui/intro_page.dart
-
6lib/features/intro/presentation/ui/widgets/intro_loading.dart
-
4lib/features/master/presentation/ui/master_page.dart
-
6lib/features/profile/presentation/ui/profile_page.dart
-
2lib/features/profile/presentation/ui/widgets/profile_avatar.dart
-
10lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
-
6lib/features/profile/presentation/ui/widgets/profile_location.dart
-
8lib/features/profile/presentation/ui/widgets/profile_logout.dart
-
2lib/features/shop/data/model/shop_model.dart
-
10lib/features/shop/presentation/controller/shop_controller.dart
-
2lib/features/shop/presentation/ui/shop_page.dart
-
14lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart
-
4lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart
-
8lib/features/shop/presentation/ui/widgets/shop_item/styles/boost_style.dart
-
22lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart
-
6lib/features/shop/presentation/ui/widgets/shop_item/styles/gem_style.dart
-
6lib/features/shop/presentation/ui/widgets/shop_item/styles/pro_membership_style.dart
-
18lib/features/shop/presentation/ui/widgets/shop_package_entity.dart
-
10lib/l10n/app_en.arb
-
48lib/l10n/app_localizations.dart
-
24lib/l10n/app_localizations_en.dart
@ -1 +1,14 @@ |
|||
include: package:flutter_lints/flutter.yaml |
|||
|
|||
linter: |
|||
rules: |
|||
prefer_const_constructors: true |
|||
prefer_const_declarations: true |
|||
prefer_const_constructors_in_immutables: true |
|||
prefer_final_fields: true |
|||
prefer_final_locals: true |
|||
avoid_classes_with_only_static_members: true |
|||
avoid_print: true |
|||
always_declare_return_types: true |
|||
use_key_in_widget_constructors: true |
|||
require_trailing_commas: true |
|||
9
assets/svg/cast_award_bronze.svg
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
9
assets/svg/cast_award_gold.svg
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
9
assets/svg/cast_award_silver.svg
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,9 @@ |
|||
<svg width="37" height="45" viewBox="0 0 37 45" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<path d="M18.5011 0C17.8078 0 17.1167 0.257701 16.5895 0.77091L13.6015 3.68054C13.0388 4.22678 12.2879 4.53732 11.5016 4.54392L7.31741 4.58797C5.84217 4.60339 4.63055 5.81042 4.61507 7.2773L4.57299 11.4336C4.55748 12.2155 4.25402 12.9621 3.70245 13.5216L0.774151 16.4951C-0.25805 17.5435 -0.25805 19.2483 0.774151 20.2967L3.70245 23.2658C4.254 23.8252 4.56408 24.5763 4.57299 25.3582L4.61507 29.5167C4.63058 30.9836 5.84001 32.1906 7.3152 32.206L11.4994 32.2478C12.2857 32.2633 13.0388 32.565 13.5992 33.1135L16.5873 36.0231C17.6417 37.0495 19.3583 37.0495 20.4127 36.0231L23.4008 33.1135C23.9634 32.565 24.7165 32.2567 25.5028 32.2478L29.6848 32.206C31.16 32.1906 32.3717 30.9835 32.3849 29.5167L32.427 25.3582C32.4425 24.5763 32.7482 23.8274 33.2998 23.268L36.2258 20.2989C37.258 19.2505 37.258 17.5457 36.2258 16.4973L33.2998 13.5216C32.7504 12.9643 32.4381 12.2155 32.4292 11.4336L32.3849 7.2773C32.3716 5.81036 31.16 4.60337 29.6848 4.58797L25.5028 4.54392C24.7165 4.53071 23.9634 4.22675 23.4008 3.68054L20.4149 0.77091C19.8877 0.257707 19.1944 0 18.5011 0ZM18.5011 7.05953C24.7852 7.05953 29.9016 12.1475 29.9016 18.3959C29.9016 24.6446 24.7849 29.7323 18.5011 29.7323C12.2173 29.7323 7.10057 24.6444 7.10057 18.3959C7.10057 12.1472 12.2173 7.05953 18.5011 7.05953ZM18.5011 9.14755C13.3512 9.14755 9.20035 13.2752 9.20035 18.396C9.20035 23.517 13.3513 27.6444 18.5011 27.6444C23.6509 27.6444 27.8019 23.5168 27.8019 18.396C27.8019 13.275 23.6509 9.14755 18.5011 9.14755ZM18.5011 11.4162C19.0792 11.4162 19.6596 11.6981 19.9387 12.2598L20.9421 14.2817C21.0993 14.6011 21.405 14.817 21.7572 14.8698L24.001 15.1958C25.2481 15.3764 25.7908 17.0393 24.8893 17.9138L23.2678 19.4886C23.0109 19.7375 22.8935 20.0921 22.9533 20.4424L23.3365 22.667C23.5491 23.9026 22.1293 24.9312 21.0129 24.3475L19.0061 23.2969C18.6893 23.1317 18.3127 23.1317 17.996 23.2969L15.9914 24.3475C14.875 24.9312 13.4507 23.9048 13.6656 22.667L14.0466 20.4424C14.1064 20.0921 13.9934 19.7353 13.7365 19.4886L12.1128 17.9138C11.2091 17.0371 11.7518 15.3764 13.0011 15.1958L15.2471 14.8698C15.5993 14.817 15.9027 14.6011 16.06 14.2817L17.0656 12.2576C17.3447 11.6937 17.9228 11.414 18.5009 11.414L18.5011 11.4162ZM18.5011 14.0813L17.9429 15.2046C17.48 16.1363 16.5829 16.7861 15.5484 16.9359L14.2992 17.1143L15.2007 17.9909C15.9493 18.72 16.2949 19.7684 16.1177 20.7948L15.905 22.0305L17.0192 21.449C17.9451 20.9644 19.0571 20.9644 19.9829 21.449L21.0993 22.0305L20.8867 20.7948C20.7095 19.7684 21.0528 18.72 21.8037 17.9931L22.7052 17.1165L21.456 16.9359C20.4215 16.7861 19.5245 16.1363 19.0615 15.2024L18.5011 14.0813ZM7.70504 34.2968L6.56652 43.1246C6.41146 44.3294 7.68956 45.3294 8.8303 44.8977L17.894 41.4661C18.2861 41.3185 18.7158 41.3185 19.1078 41.4661L28.1716 44.8977C29.3123 45.3294 30.5904 44.3294 30.4354 43.1246L29.2968 34.2968L25.5202 34.3321C25.2743 34.3321 25.0461 34.4312 24.8712 34.6008L21.8831 37.5126C20.0291 39.3187 16.9746 39.3187 15.1205 37.5126L12.1302 34.6008C11.9552 34.4312 11.7248 34.3321 11.479 34.3321L7.70504 34.2968Z" fill="url(#paint0_linear_1_10529)"/> |
|||
<defs> |
|||
<linearGradient id="paint0_linear_1_10529" x1="18.5" y1="0" x2="18.5" y2="45" gradientUnits="userSpaceOnUse"> |
|||
<stop stop-color="#C16C45"/> |
|||
<stop offset="1" stop-color="#E49267"/> |
|||
</linearGradient> |
|||
</defs> |
|||
</svg> |
|||
@ -0,0 +1,9 @@ |
|||
<svg width="37" height="44" viewBox="0 0 37 44" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<path d="M18.5011 0C17.8078 0 17.1167 0.251975 16.5895 0.753778L13.6015 3.59875C13.0388 4.13285 12.2879 4.43649 11.5016 4.44295L7.31741 4.48602C5.84217 4.50109 4.63055 5.6813 4.61507 7.11558L4.57299 11.1795C4.55748 11.944 4.25402 12.6741 3.70245 13.2211L0.774151 16.1285C-0.25805 17.1536 -0.25805 18.8205 0.774151 19.8457L3.70245 22.7488C4.254 23.2958 4.56408 24.0302 4.57299 24.7947L4.61507 28.8607C4.63058 30.2951 5.84001 31.4753 7.3152 31.4903L11.4994 31.5312C12.2857 31.5463 13.0388 31.8413 13.5992 32.3776L16.5873 35.2226C17.6417 36.2262 19.3583 36.2262 20.4127 35.2226L23.4008 32.3776C23.9634 31.8414 24.7165 31.5399 25.5028 31.5312L29.6848 31.4903C31.16 31.4752 32.3717 30.295 32.3849 28.8607L32.427 24.7947C32.4425 24.0302 32.7482 23.2979 33.2998 22.7509L36.2258 19.8478C37.258 18.8227 37.258 17.1558 36.2258 16.1306L33.2998 13.2211C32.7504 12.6763 32.4381 11.944 32.4292 11.1795L32.3849 7.11558C32.3716 5.68124 31.16 4.50107 29.6848 4.48602L25.5028 4.44295C24.7165 4.43002 23.9634 4.13282 23.4008 3.59875L20.4149 0.753778C19.8877 0.25198 19.1944 0 18.5011 0ZM18.5011 6.90265C24.7852 6.90265 29.9016 11.8775 29.9016 17.9871C29.9016 24.097 24.7849 29.0716 18.5011 29.0716C12.2173 29.0716 7.10057 24.0967 7.10057 17.9871C7.10057 11.8773 12.2173 6.90265 18.5011 6.90265ZM18.5011 8.94428C13.3512 8.94428 9.20035 12.9802 9.20035 17.9872C9.20035 22.9944 13.3513 27.0301 18.5011 27.0301C23.6509 27.0301 27.8019 22.9942 27.8019 17.9872C27.8019 12.98 23.6509 8.94428 18.5011 8.94428ZM18.5011 11.1625C19.0792 11.1625 19.6596 11.4382 19.9387 11.9873L20.9421 13.9644C21.0993 14.2766 21.405 14.4877 21.7572 14.5394L24.001 14.8581C25.2481 15.0347 25.7908 16.6607 24.8893 17.5157L23.2678 19.0556C23.0109 19.2989 22.8935 19.6457 22.9533 19.9881L23.3365 22.1632C23.5491 23.3714 22.1293 24.3772 21.0129 23.8065L19.0061 22.7792C18.6893 22.6177 18.3127 22.6177 17.996 22.7792L15.9914 23.8065C14.875 24.3772 13.4507 23.3736 13.6656 22.1632L14.0466 19.9881C14.1064 19.6457 13.9934 19.2968 13.7365 19.0556L12.1128 17.5157C11.2091 16.6585 11.7518 15.0347 13.0011 14.8581L15.2471 14.5394C15.5993 14.4877 15.9027 14.2766 16.06 13.9644L17.0656 11.9852C17.3447 11.4339 17.9228 11.1603 18.5009 11.1603L18.5011 11.1625ZM18.5011 13.7684L17.9429 14.8668C17.48 15.7777 16.5829 16.4131 15.5484 16.5595L14.2992 16.734L15.2007 17.5911C15.9493 18.304 16.2949 19.3291 16.1177 20.3327L15.905 21.5409L17.0192 20.9724C17.9451 20.4986 19.0571 20.4986 19.9829 20.9724L21.0993 21.5409L20.8867 20.3327C20.7095 19.3291 21.0528 18.304 21.8037 17.5933L22.7052 16.7361L21.456 16.5595C20.4215 16.4131 19.5245 15.7777 19.0615 14.8646L18.5011 13.7684ZM7.70504 33.5347L6.56652 42.1663C6.41146 43.3443 7.68956 44.3221 8.8303 43.9L17.894 40.5446C18.2861 40.4003 18.7158 40.4003 19.1078 40.5446L28.1716 43.9C29.3123 44.3221 30.5904 43.3443 30.4354 42.1663L29.2968 33.5347L25.5202 33.5691C25.2743 33.5691 25.0461 33.666 24.8712 33.8319L21.8831 36.679C20.0291 38.445 16.9746 38.445 15.1205 36.679L12.1302 33.8319C11.9552 33.666 11.7248 33.5691 11.479 33.5691L7.70504 33.5347Z" fill="url(#paint0_linear_1_10527)"/> |
|||
<defs> |
|||
<linearGradient id="paint0_linear_1_10527" x1="18.5" y1="0" x2="18.5" y2="44" gradientUnits="userSpaceOnUse"> |
|||
<stop stop-color="#F7BC15"/> |
|||
<stop offset="1" stop-color="#FCD928"/> |
|||
</linearGradient> |
|||
</defs> |
|||
</svg> |
|||
@ -0,0 +1,9 @@ |
|||
<svg width="37" height="45" viewBox="0 0 37 45" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<path d="M18.5011 0C17.8078 0 17.1167 0.257701 16.5895 0.77091L13.6015 3.68054C13.0388 4.22678 12.2879 4.53732 11.5016 4.54392L7.31741 4.58797C5.84217 4.60339 4.63055 5.81042 4.61507 7.2773L4.57299 11.4336C4.55748 12.2155 4.25402 12.9621 3.70245 13.5216L0.774151 16.4951C-0.25805 17.5435 -0.25805 19.2483 0.774151 20.2967L3.70245 23.2658C4.254 23.8252 4.56408 24.5763 4.57299 25.3582L4.61507 29.5167C4.63058 30.9836 5.84001 32.1906 7.3152 32.206L11.4994 32.2478C12.2857 32.2633 13.0388 32.565 13.5992 33.1135L16.5873 36.0231C17.6417 37.0495 19.3583 37.0495 20.4127 36.0231L23.4008 33.1135C23.9634 32.565 24.7165 32.2567 25.5028 32.2478L29.6848 32.206C31.16 32.1906 32.3717 30.9835 32.3849 29.5167L32.427 25.3582C32.4425 24.5763 32.7482 23.8274 33.2998 23.268L36.2258 20.2989C37.258 19.2505 37.258 17.5457 36.2258 16.4973L33.2998 13.5216C32.7504 12.9643 32.4381 12.2155 32.4292 11.4336L32.3849 7.2773C32.3716 5.81036 31.16 4.60337 29.6848 4.58797L25.5028 4.54392C24.7165 4.53071 23.9634 4.22675 23.4008 3.68054L20.4149 0.77091C19.8877 0.257707 19.1944 0 18.5011 0ZM18.5011 7.05953C24.7852 7.05953 29.9016 12.1475 29.9016 18.3959C29.9016 24.6446 24.7849 29.7323 18.5011 29.7323C12.2173 29.7323 7.10057 24.6444 7.10057 18.3959C7.10057 12.1472 12.2173 7.05953 18.5011 7.05953ZM18.5011 9.14755C13.3512 9.14755 9.20035 13.2752 9.20035 18.396C9.20035 23.517 13.3513 27.6444 18.5011 27.6444C23.6509 27.6444 27.8019 23.5168 27.8019 18.396C27.8019 13.275 23.6509 9.14755 18.5011 9.14755ZM18.5011 11.4162C19.0792 11.4162 19.6596 11.6981 19.9387 12.2598L20.9421 14.2817C21.0993 14.6011 21.405 14.817 21.7572 14.8698L24.001 15.1958C25.2481 15.3764 25.7908 17.0393 24.8893 17.9138L23.2678 19.4886C23.0109 19.7375 22.8935 20.0921 22.9533 20.4424L23.3365 22.667C23.5491 23.9026 22.1293 24.9312 21.0129 24.3475L19.0061 23.2969C18.6893 23.1317 18.3127 23.1317 17.996 23.2969L15.9914 24.3475C14.875 24.9312 13.4507 23.9048 13.6656 22.667L14.0466 20.4424C14.1064 20.0921 13.9934 19.7353 13.7365 19.4886L12.1128 17.9138C11.2091 17.0371 11.7518 15.3764 13.0011 15.1958L15.2471 14.8698C15.5993 14.817 15.9027 14.6011 16.06 14.2817L17.0656 12.2576C17.3447 11.6937 17.9228 11.414 18.5009 11.414L18.5011 11.4162ZM18.5011 14.0813L17.9429 15.2046C17.48 16.1363 16.5829 16.7861 15.5484 16.9359L14.2992 17.1143L15.2007 17.9909C15.9493 18.72 16.2949 19.7684 16.1177 20.7948L15.905 22.0305L17.0192 21.449C17.9451 20.9644 19.0571 20.9644 19.9829 21.449L21.0993 22.0305L20.8867 20.7948C20.7095 19.7684 21.0528 18.72 21.8037 17.9931L22.7052 17.1165L21.456 16.9359C20.4215 16.7861 19.5245 16.1363 19.0615 15.2024L18.5011 14.0813ZM7.70504 34.2968L6.56652 43.1246C6.41146 44.3294 7.68956 45.3294 8.8303 44.8977L17.894 41.4661C18.2861 41.3185 18.7158 41.3185 19.1078 41.4661L28.1716 44.8977C29.3123 45.3294 30.5904 44.3294 30.4354 43.1246L29.2968 34.2968L25.5202 34.3321C25.2743 34.3321 25.0461 34.4312 24.8712 34.6008L21.8831 37.5126C20.0291 39.3187 16.9746 39.3187 15.1205 37.5126L12.1302 34.6008C11.9552 34.4312 11.7248 34.3321 11.479 34.3321L7.70504 34.2968Z" fill="url(#paint0_linear_1_10528)"/> |
|||
<defs> |
|||
<linearGradient id="paint0_linear_1_10528" x1="18.5" y1="0" x2="18.5" y2="45" gradientUnits="userSpaceOnUse"> |
|||
<stop stop-color="#90A1A4"/> |
|||
<stop offset="1" stop-color="#CEDADA"/> |
|||
</linearGradient> |
|||
</defs> |
|||
</svg> |
|||
@ -0,0 +1,9 @@ |
|||
<svg width="37" height="44" viewBox="0 0 37 44" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<path d="M34.5917 0H1.4266C0.758283 0 0.257047 0.409346 0.173508 1.0643C0.0899684 1.39178 -0.828963 8.51441 2.59615 12.3623C3.7657 13.6722 5.2694 14.4909 7.10727 14.6546V16.2101C7.10727 20.7129 10.3653 24.4789 14.7093 25.2976V35.2857C12.4538 35.2857 10.5324 36.8412 10.1147 38.9698H8.69452C8.0262 38.9698 7.44143 39.5429 7.44143 40.1978V42.05C7.44143 42.7049 8.0262 43.278 8.69452 43.278H27.4073C28.0756 43.278 28.6604 42.7049 28.6604 42.05V40.1978C28.6604 39.5429 28.0756 38.9698 27.4073 38.9698H25.9872C25.4859 36.923 23.6481 35.2857 21.3925 35.2857V25.2976C25.7365 24.4789 28.9946 20.7129 28.9946 16.2101V14.6546C30.8324 14.409 32.3361 13.6722 33.5057 12.3623C36.9308 8.51441 35.9283 1.39178 35.9283 1.0643C35.7612 0.409346 35.26 0 34.5917 0ZM7.10727 12.1985C6.02126 12.0348 5.18587 11.5436 4.51755 10.7249C2.51261 8.43254 2.51261 4.33907 2.59615 2.45608H7.10727V12.1985ZM31.5843 10.7249C30.916 11.5436 29.997 11.9529 28.911 12.1985V2.45608H33.4221C33.5892 4.33907 33.5892 8.43254 31.5843 10.7249Z" fill="url(#paint0_linear_1_10540)"/> |
|||
<defs> |
|||
<linearGradient id="paint0_linear_1_10540" x1="18.0325" y1="0" x2="18.0325" y2="43.278" gradientUnits="userSpaceOnUse"> |
|||
<stop stop-color="#C16C45"/> |
|||
<stop offset="1" stop-color="#E49267"/> |
|||
</linearGradient> |
|||
</defs> |
|||
</svg> |
|||
@ -0,0 +1,9 @@ |
|||
<svg width="67" height="80" viewBox="0 0 67 80" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<path d="M63.6859 0H2.62647C1.39605 0 0.473242 0.753636 0.31944 1.95945C0.165638 2.56236 -1.52618 15.6756 4.7797 22.7598C6.93293 25.1715 9.70136 26.6787 13.085 26.9802V29.844C13.085 38.134 19.0833 45.0675 27.081 46.5748V64.9635C22.9283 64.9635 19.3909 67.8273 18.6219 71.7462H16.0072C14.7768 71.7462 13.7002 72.8013 13.7002 74.0071V77.4171C13.7002 78.6229 14.7768 79.678 16.0072 79.678H50.4589C51.6893 79.678 52.7659 78.6229 52.7659 77.4171V74.0071C52.7659 72.8013 51.6893 71.7462 50.4589 71.7462H47.8443C46.9215 67.9781 43.5378 64.9635 39.3852 64.9635V46.5748C47.3829 45.0675 53.3811 38.134 53.3811 29.844V26.9802C56.7648 26.528 59.5332 25.1715 61.6864 22.7598C67.9923 15.6756 66.1467 2.56236 66.1467 1.95945C65.8391 0.753636 64.9163 0 63.6859 0ZM13.085 22.4584C11.0856 22.1569 9.54756 21.2526 8.31715 19.7453C4.6259 15.5249 4.6259 7.98855 4.7797 4.52182H13.085V22.4584ZM58.149 19.7453C56.9186 21.2526 55.2268 22.0062 53.2273 22.4584V4.52182H61.5326C61.8402 7.98855 61.8402 15.5249 58.149 19.7453Z" fill="url(#paint0_linear_1_10511)"/> |
|||
<defs> |
|||
<linearGradient id="paint0_linear_1_10511" x1="33.1992" y1="0" x2="33.1992" y2="79.678" gradientUnits="userSpaceOnUse"> |
|||
<stop stop-color="#F7BC15"/> |
|||
<stop offset="1" stop-color="#FCD928"/> |
|||
</linearGradient> |
|||
</defs> |
|||
</svg> |
|||
@ -0,0 +1,9 @@ |
|||
<svg width="37" height="44" viewBox="0 0 37 44" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<path d="M34.5917 0H1.4266C0.758283 0 0.257047 0.409346 0.173508 1.0643C0.0899684 1.39178 -0.828963 8.51441 2.59615 12.3623C3.7657 13.6722 5.2694 14.4909 7.10727 14.6546V16.2101C7.10727 20.7129 10.3653 24.4789 14.7093 25.2976V35.2857C12.4538 35.2857 10.5324 36.8412 10.1147 38.9698H8.69452C8.0262 38.9698 7.44143 39.5429 7.44143 40.1978V42.05C7.44143 42.7049 8.0262 43.278 8.69452 43.278H27.4073C28.0756 43.278 28.6604 42.7049 28.6604 42.05V40.1978C28.6604 39.5429 28.0756 38.9698 27.4073 38.9698H25.9872C25.4859 36.923 23.6481 35.2857 21.3925 35.2857V25.2976C25.7365 24.4789 28.9946 20.7129 28.9946 16.2101V14.6546C30.8324 14.409 32.3361 13.6722 33.5057 12.3623C36.9308 8.51441 35.9283 1.39178 35.9283 1.0643C35.7612 0.409346 35.26 0 34.5917 0ZM7.10727 12.1985C6.02126 12.0348 5.18587 11.5436 4.51755 10.7249C2.51261 8.43254 2.51261 4.33907 2.59615 2.45608H7.10727V12.1985ZM31.5843 10.7249C30.916 11.5436 29.997 11.9529 28.911 12.1985V2.45608H33.4221C33.5892 4.33907 33.5892 8.43254 31.5843 10.7249Z" fill="url(#paint0_linear_1_10538)"/> |
|||
<defs> |
|||
<linearGradient id="paint0_linear_1_10538" x1="18.0325" y1="0" x2="18.0325" y2="43.278" gradientUnits="userSpaceOnUse"> |
|||
<stop stop-color="#90A1A4"/> |
|||
<stop offset="1" stop-color="#CEDADA"/> |
|||
</linearGradient> |
|||
</defs> |
|||
</svg> |
|||
@ -0,0 +1,15 @@ |
|||
class PageScalable { |
|||
static const PageScalable _i = PageScalable._internal(); |
|||
const PageScalable._internal(); |
|||
factory PageScalable() => _i; |
|||
|
|||
static double scale({ |
|||
required double currentPage, |
|||
required int index, |
|||
required double scaleFactor, |
|||
}) { |
|||
final double difference = (currentPage - index).abs(); |
|||
final double scale = 1 - (difference * scaleFactor).clamp(0.0, scaleFactor); |
|||
return scale; |
|||
} |
|||
} |
|||
@ -1,14 +1,33 @@ |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:shia_game_flutter/features/awards/presentation/controller/awards_controller.dart'; |
|||
import 'package:get/get.dart'; |
|||
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; |
|||
import 'package:shia_game_flutter/core/utils/gap.dart'; |
|||
import 'package:shia_game_flutter/core/widgets/background/my_background.dart'; |
|||
import 'package:shia_game_flutter/features/awards/presentation/controller/awards_controller.dart'; |
|||
import 'package:shia_game_flutter/features/awards/presentation/ui/widgets/award_widget.dart'; |
|||
|
|||
class AwardsPage extends GetView<AwardsController> { |
|||
const AwardsPage({super.key}); |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return const Center( |
|||
child: Text('Awards Page'), |
|||
return MyBackground( |
|||
child: Column( |
|||
children: [ |
|||
60.0.gapHeight, |
|||
AwardWidget( |
|||
images: controller.leagueAwards, |
|||
), |
|||
MySpaces.s28.gapHeight, |
|||
AwardWidget( |
|||
images: controller.customAwards, |
|||
), |
|||
MySpaces.s28.gapHeight, |
|||
AwardWidget( |
|||
images: controller.castAwards, |
|||
), |
|||
], |
|||
), |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,186 @@ |
|||
import 'package:flutter/material.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/my_localization.dart'; |
|||
import 'package:shia_game_flutter/core/utils/page_scalable.dart'; |
|||
import 'package:shia_game_flutter/core/utils/screen_size.dart'; |
|||
import 'package:shia_game_flutter/core/widgets/container/my_container.dart'; |
|||
import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; |
|||
import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; |
|||
|
|||
class AwardWidget extends StatefulWidget { |
|||
const AwardWidget({super.key, required this.images}); |
|||
|
|||
final List<String> images; |
|||
|
|||
@override |
|||
State<AwardWidget> createState() => _AwardWidgetState(); |
|||
} |
|||
|
|||
class _AwardWidgetState extends State<AwardWidget> { |
|||
final PageController pageController = PageController(viewportFraction: 0.35); |
|||
double currentPage = 0; |
|||
|
|||
void pageControllerListener() { |
|||
setState(() { |
|||
currentPage = pageController.page ?? 0; |
|||
}); |
|||
} |
|||
|
|||
void goToPrePage() { |
|||
pageController.previousPage( |
|||
duration: const Duration(milliseconds: 300), |
|||
curve: Curves.easeIn, |
|||
); |
|||
} |
|||
|
|||
void goToNextPage() { |
|||
pageController.nextPage( |
|||
duration: const Duration(milliseconds: 300), |
|||
curve: Curves.easeIn, |
|||
); |
|||
} |
|||
|
|||
@override |
|||
void initState() { |
|||
super.initState(); |
|||
pageController.addListener(pageControllerListener); |
|||
} |
|||
|
|||
@override |
|||
void dispose() { |
|||
pageController |
|||
..removeListener(pageControllerListener) |
|||
..dispose(); |
|||
super.dispose(); |
|||
} |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Stack( |
|||
alignment: Alignment.center, |
|||
clipBehavior: Clip.none, |
|||
children: [ |
|||
MyContainer( |
|||
width: context.widthScreen, |
|||
borderRadius: const BorderRadius.all(Radius.circular(12)), |
|||
borderGradient: LinearGradient( |
|||
begin: Alignment.topCenter, |
|||
end: Alignment.bottomCenter, |
|||
colors: [ |
|||
const Color(0XFF7D44CC), |
|||
const Color(0XFF7D44CC).withValues(alpha: 0), |
|||
], |
|||
), |
|||
color: const Color(0XFF2B105A), |
|||
padding: const EdgeInsets.only( |
|||
bottom: MySpaces.s10, |
|||
top: MySpaces.s40, |
|||
), |
|||
child: Column( |
|||
spacing: MySpaces.s12, |
|||
children: [ |
|||
SizedBox( |
|||
height: 100, |
|||
child: Stack( |
|||
alignment: Alignment.center, |
|||
children: [ |
|||
Padding( |
|||
padding: const EdgeInsets.symmetric( |
|||
horizontal: MySpaces.s16, |
|||
), |
|||
child: PageView.builder( |
|||
controller: pageController, |
|||
itemCount: widget.images.length, |
|||
physics: const NeverScrollableScrollPhysics(), |
|||
itemBuilder: (context, index) { |
|||
return Transform.scale( |
|||
scale: PageScalable.scale( |
|||
currentPage: currentPage, |
|||
index: index, |
|||
scaleFactor: 0.4, |
|||
), |
|||
child: MyImage(asset: widget.images[index]), |
|||
); |
|||
}, |
|||
), |
|||
), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
IconButton( |
|||
onPressed: currentPage == 0 ? null : goToPrePage, |
|||
icon: const Icon(Icons.keyboard_arrow_left_rounded), |
|||
iconSize: 30, |
|||
), |
|||
IconButton( |
|||
onPressed: currentPage == widget.images.length - 1 |
|||
? null |
|||
: goToNextPage, |
|||
icon: const Icon(Icons.keyboard_arrow_right_rounded), |
|||
iconSize: 30, |
|||
), |
|||
], |
|||
), |
|||
], |
|||
), |
|||
), |
|||
Column( |
|||
spacing: MySpaces.s2, |
|||
children: [ |
|||
Text( |
|||
context.translate.first_place, |
|||
style: Lexend.extraBold.copyWith(fontSize: 14), |
|||
), |
|||
GradientText( |
|||
text: '1ST Week (May 2024)', |
|||
textStyle: Lexend.semiBold.copyWith( |
|||
fontSize: 10, |
|||
shadows: [ |
|||
const BoxShadow( |
|||
color: Color(0XFF3E1381), |
|||
offset: Offset(0, 1.69), |
|||
blurRadius: 0.84, |
|||
), |
|||
], |
|||
), |
|||
color: const Color(0XFFCAA8FF), |
|||
), |
|||
], |
|||
), |
|||
], |
|||
), |
|||
), |
|||
Positioned( |
|||
top: -MySpaces.s14, |
|||
child: Container( |
|||
padding: const EdgeInsets.symmetric( |
|||
horizontal: MySpaces.s10, |
|||
vertical: MySpaces.s6, |
|||
), |
|||
decoration: const BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(12)), |
|||
color: Color(0XFF7D44CB), |
|||
), |
|||
child: Opacity( |
|||
opacity: 0.6, |
|||
child: GradientText( |
|||
text: context.translate.battle_league_awards, |
|||
color: const Color(0XFFCAA8FF), |
|||
textStyle: Lexend.medium.copyWith( |
|||
fontSize: 14, |
|||
shadows: [ |
|||
const BoxShadow( |
|||
color: Color(0XFF3E1381), |
|||
offset: Offset(0, 0.69), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
), |
|||
), |
|||
), |
|||
], |
|||
); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue