create profile page

This commit is contained in:
mohamadmahdi jebeli 2025-08-21 11:30:51 +03:30
parent c472181d14
commit 274f8a0037
20 changed files with 626 additions and 57 deletions

View File

@ -2,7 +2,7 @@ plugins {
id("com.android.application")
id("kotlin-android")
id("dev.flutter.flutter-gradle-plugin")
// اضافه کردن پلاگin گوگل سرویسز برای فایربیس
// اضافه کردن پلاگین گوگل سرویسز برای فایربیس
id("com.google.gms.google-services")
}
@ -12,8 +12,7 @@ android {
ndkVersion = flutter.ndkVersion
compileOptions {
// فلاتر به صورت پیش‌فرض از جاوا ۸ استفاده می‌کند.
// اگر به صورت دستی به ۱۱ تغییر داده‌اید، مشکلی نیست.
// استفاده از جاوا ۸ برای سازگاری بهتر
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
@ -24,8 +23,6 @@ android {
defaultConfig {
applicationId = "com.example.lba"
// حداقل SDK برای کتابخانه‌های جدید فایربیس معمولاً ۲۱ است.
// ۲۴ که شما تنظیم کرده‌اید کاملاً مناسب است.
minSdk = 24
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
@ -33,13 +30,17 @@ android {
}
buildTypes {
release {
signingConfig = signingConfigs.getByName("debug")
// این تنظیمات برای نسخه نهایی (release) مهم هستند
// اما برای تست می‌توانید آن‌ها را غیرفعال نگه دارید.
// isMinifyEnabled = true
// isShrinkResources = true
// proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
getByName("release") {
// برای نسخه نهایی (release) بهتر است از کلید امضای خودتان استفاده کنید.
// signingConfig = signingConfigs.getByName("release")
signingConfig = signingConfigs.getByName("debug") // موقتا برای تست
// فعال‌سازی کوچک‌سازی و بهینه‌سازی کد با سینتکس کاتلین
isMinifyEnabled = true
isShrinkResources = true
// افزودن فایل قوانین ProGuard برای جلوگیری از حذف کلاس‌های ضروری
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
}
@ -48,10 +49,8 @@ flutter {
source = "../.."
}
// اضافه کردن این بخش برای کتابخانه‌های فایربیس
dependencies {
// اضافه کردن Firebase Bill of Materials (BoM)
// این کار نسخه‌های تمام کتابخانه‌های فایربیس را مدیریت می‌کند
implementation(platform("com.google.firebase:firebase-bom:33.1.0"))
// کتابخانه‌های مورد نیاز برای آنالیتیکس و احراز هویت

View File

@ -1,42 +1,40 @@
# Flutter related
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
#=============== Flutter Core ===============
# قوانین مربوط به موتور و پلاگین‌های اصلی فلاتر
-keep class io.flutter.embedding.** { *; }
-keep class io.flutter.plugins.** { *; }
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
# Mobile Scanner
-keep class com.google.mlkit.** { *; }
#=============== Google Play & Firebase ===============
# این قوانین برای سرویس‌های گوگل پلی و فایربیس ضروری هستند
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
-keep class com.google.firebase.** { *; }
-dontwarn com.google.firebase.**
-keep class com.google.android.play.core.** { *; }
-dontwarn com.google.android.play.core.**
# Geolocator
#=============== Mobile Scanner & ML Kit ===============
# قوانین مربوط به پکیج اسکنر کد QR و ML Kit
-keep class com.google.mlkit.** { *; }
-dontwarn com.google.mlkit.**
#=============== Flutter Plugins ===============
# قوانین مربوط به سایر پکیج‌های استفاده شده
-keep class com.baseflow.geolocator.** { *; }
# Image Picker
-keep class io.flutter.plugins.imagepicker.** { *; }
# Permission Handler
-keep class com.baseflow.permissionhandler.** { *; }
# Keep native methods
#=============== General Rules ===============
# قوانین عمومی برای حفظ متدهای نیتیو، کلاس‌های Parcelable و انوتیشن‌ها
-keepclasseswithmembernames class * {
native <methods>;
}
# Keep Parcelable implementations
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
# General warnings
-dontwarn com.google.android.gms.**
-dontwarn com.google.mlkit.**
-dontwarn java.lang.invoke.**
# Keep annotations
-keepattributes *Annotation*
-keepattributes Signature
-keepattributes InnerClasses
-keepattributes EnclosingMethod
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod

13
assets/icons/brush.svg Normal file
View File

@ -0,0 +1,13 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3685_7825)">
<path d="M7.125 14.625V13.5H3.375C2.9625 13.5 2.5875 13.335 2.3175 13.0575C2.04 12.7875 1.875 12.4125 1.875 12C1.875 11.2275 2.475 10.5825 3.2325 10.5075C3.2775 10.5 3.3225 10.5 3.375 10.5H14.625C14.6775 10.5 14.7225 10.5 14.7675 10.5075C15.1275 10.5375 15.4425 10.695 15.6825 10.9425C15.99 11.2425 16.155 11.67 16.1175 12.135C16.05 12.9225 15.3375 13.5 14.5425 13.5H10.875V14.625C10.875 15.66 10.035 16.5 9 16.5C7.965 16.5 7.125 15.66 7.125 14.625Z" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15.1275 3.975L14.7675 10.5075C14.7225 10.5 14.6775 10.5 14.625 10.5H3.375C3.3225 10.5 3.2775 10.5 3.2325 10.5075L2.8725 3.975C2.7375 2.6475 3.78 1.5 5.1075 1.5H12.8925C14.22 1.5 15.2625 2.6475 15.1275 3.975Z" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.99249 1.5V5.25" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 1.5V3" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_3685_7825">
<rect width="18" height="18" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,4 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.11968 8.715C9.09718 8.715 9.08218 8.715 9.05968 8.715C9.02218 8.7075 8.96968 8.7075 8.92468 8.715C6.74968 8.6475 5.10718 6.9375 5.10718 4.83C5.10718 2.685 6.85468 0.9375 8.99968 0.9375C11.1447 0.9375 12.8922 2.685 12.8922 4.83C12.8847 6.9375 11.2347 8.6475 9.14218 8.715C9.13468 8.715 9.12718 8.715 9.11968 8.715ZM8.99968 2.0625C7.47718 2.0625 6.23218 3.3075 6.23218 4.83C6.23218 6.33 7.40218 7.5375 8.89468 7.59C8.93218 7.5825 9.03718 7.5825 9.13468 7.59C10.6047 7.5225 11.7597 6.315 11.7672 4.83C11.7672 3.3075 10.5222 2.0625 8.99968 2.0625Z" fill="#2196F3"/>
<path d="M9.12721 16.9125C7.65721 16.9125 6.17971 16.5375 5.06221 15.7875C4.01971 15.0975 3.44971 14.1525 3.44971 13.125C3.44971 12.0975 4.01971 11.145 5.06221 10.4475C7.31221 8.955 10.9572 8.955 13.1922 10.4475C14.2272 11.1375 14.8047 12.0825 14.8047 13.11C14.8047 14.1375 14.2347 15.09 13.1922 15.7875C12.0672 16.5375 10.5972 16.9125 9.12721 16.9125ZM5.68471 11.3925C4.96471 11.8725 4.57471 12.4875 4.57471 13.1325C4.57471 13.77 4.97221 14.385 5.68471 14.8575C7.55221 16.11 10.7022 16.11 12.5697 14.8575C13.2897 14.3775 13.6797 13.7625 13.6797 13.1175C13.6797 12.48 13.2822 11.865 12.5697 11.3925C10.7022 10.1475 7.55221 10.1475 5.68471 11.3925Z" fill="#2196F3"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,6 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.305 17.0625H4.695C2.8275 17.0625 1.3125 15.5475 1.3125 13.68V8.63251C1.3125 6.76501 2.8275 5.25 4.695 5.25H13.305C15.1725 5.25 16.6875 6.76501 16.6875 8.63251V9.71251C16.6875 10.02 16.4325 10.275 16.125 10.275H14.61C14.3475 10.275 14.1075 10.3725 13.935 10.5525L13.9275 10.56C13.7175 10.7625 13.62 11.04 13.6425 11.325C13.6875 11.82 14.16 12.2175 14.7 12.2175H16.125C16.4325 12.2175 16.6875 12.4725 16.6875 12.78V13.6725C16.6875 15.5475 15.1725 17.0625 13.305 17.0625ZM4.695 6.375C3.45 6.375 2.4375 7.38751 2.4375 8.63251V13.68C2.4375 14.925 3.45 15.9375 4.695 15.9375H13.305C14.55 15.9375 15.5625 14.925 15.5625 13.68V13.35H14.7C13.5675 13.35 12.6075 12.51 12.5175 11.43C12.4575 10.815 12.6825 10.2075 13.1325 9.76501C13.5225 9.36751 14.0475 9.15001 14.61 9.15001H15.5625V8.63251C15.5625 7.38751 14.55 6.375 13.305 6.375H4.695Z" fill="#2196F3"/>
<path d="M1.875 9.87001C1.5675 9.87001 1.3125 9.61501 1.3125 9.30751V5.88005C1.3125 4.76255 2.0175 3.75 3.06 3.3525L9.015 1.1025C9.63 0.870004 10.3125 0.952541 10.845 1.32754C11.385 1.70254 11.7 2.31004 11.7 2.96254V5.81253C11.7 6.12003 11.445 6.37503 11.1375 6.37503C10.83 6.37503 10.575 6.12003 10.575 5.81253V2.96254C10.575 2.67754 10.44 2.41503 10.2 2.25003C9.96 2.08503 9.675 2.04752 9.405 2.15252L3.45 4.40252C2.8425 4.63502 2.43 5.22755 2.43 5.88005V9.30751C2.4375 9.62251 2.1825 9.87001 1.875 9.87001Z" fill="#2196F3"/>
<path d="M14.7 13.3499C13.5675 13.3499 12.6075 12.5099 12.5175 11.4299C12.4575 10.8074 12.6825 10.1999 13.1325 9.7574C13.515 9.3674 14.04 9.1499 14.6025 9.1499H16.1625C16.905 9.1724 17.475 9.75737 17.475 10.4774V12.0224C17.475 12.7424 16.905 13.3274 16.185 13.3499H14.7ZM16.1475 10.2749H14.61C14.3475 10.2749 14.1075 10.3724 13.935 10.5524C13.7175 10.7624 13.6125 11.0474 13.6425 11.3324C13.6875 11.8274 14.16 12.2249 14.7 12.2249H16.17C16.2675 12.2249 16.3575 12.1349 16.3575 12.0224V10.4774C16.3575 10.3649 16.2675 10.2824 16.1475 10.2749Z" fill="#2196F3"/>
<path d="M10.5 9.5625H5.25C4.9425 9.5625 4.6875 9.3075 4.6875 9C4.6875 8.6925 4.9425 8.4375 5.25 8.4375H10.5C10.8075 8.4375 11.0625 8.6925 11.0625 9C11.0625 9.3075 10.8075 9.5625 10.5 9.5625Z" fill="#2196F3"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

7
assets/icons/gift.svg Normal file
View File

@ -0,0 +1,7 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9775 17.0625H5.97748C3.41248 17.0625 2.41498 16.065 2.41498 13.5V7.5C2.41498 7.1925 2.66998 6.9375 2.97748 6.9375H14.9775C15.285 6.9375 15.54 7.1925 15.54 7.5V13.5C15.54 16.065 14.5425 17.0625 11.9775 17.0625ZM3.53998 8.0625V13.5C3.53998 15.435 4.04248 15.9375 5.97748 15.9375H11.9775C13.9125 15.9375 14.415 15.435 14.415 13.5V8.0625H3.53998Z" fill="#2196F3"/>
<path d="M14.625 8.0625H3.375C2.0625 8.0625 1.3125 7.3125 1.3125 6V5.25C1.3125 3.9375 2.0625 3.1875 3.375 3.1875H14.625C15.9 3.1875 16.6875 3.975 16.6875 5.25V6C16.6875 7.275 15.9 8.0625 14.625 8.0625ZM3.375 4.3125C2.6925 4.3125 2.4375 4.5675 2.4375 5.25V6C2.4375 6.6825 2.6925 6.9375 3.375 6.9375H14.625C15.285 6.9375 15.5625 6.66 15.5625 6V5.25C15.5625 4.59 15.285 4.3125 14.625 4.3125H3.375Z" fill="#2196F3"/>
<path d="M8.73001 4.31253H4.59001C4.43251 4.31253 4.28251 4.24503 4.17751 4.13253C3.72001 3.63003 3.73501 2.85753 4.21501 2.37753L5.28001 1.31253C5.77501 0.817534 6.59251 0.817534 7.08751 1.31253L9.12751 3.35253C9.28501 3.51003 9.33751 3.75753 9.24751 3.96753C9.16501 4.17753 8.96251 4.31253 8.73001 4.31253ZM5.00251 3.18753H7.38001L6.29251 2.10753C6.23251 2.04753 6.13501 2.04753 6.07501 2.10753L5.01001 3.17253C5.01001 3.18003 5.00251 3.18003 5.00251 3.18753Z" fill="#2196F3"/>
<path d="M13.4025 4.31253H9.2625C9.0375 4.31253 8.8275 4.17753 8.745 3.96753C8.655 3.75753 8.7075 3.51753 8.865 3.35253L10.905 1.31253C11.4 0.817534 12.2175 0.817534 12.7125 1.31253L13.7775 2.37753C14.2575 2.85753 14.28 3.63003 13.815 4.13253C13.71 4.24503 13.56 4.31253 13.4025 4.31253ZM10.6275 3.18753H13.005C12.9975 3.18003 12.9975 3.18003 12.99 3.17253L11.925 2.10753C11.865 2.04753 11.7675 2.04753 11.7075 2.10753L10.6275 3.18753Z" fill="#2196F3"/>
<path d="M7.45502 12.675C7.24502 12.675 7.02752 12.6225 6.83252 12.5175C6.40502 12.285 6.14252 11.8425 6.14252 11.3625V7.5C6.14252 7.1925 6.39752 6.9375 6.70502 6.9375H11.235C11.5425 6.9375 11.7975 7.1925 11.7975 7.5V11.3475C11.7975 11.835 11.535 12.2775 11.1075 12.5025C10.68 12.735 10.1625 12.705 9.75752 12.435L9.09002 11.985C9.03002 11.94 8.94752 11.94 8.88002 11.985L8.17502 12.45C7.95752 12.6 7.70252 12.675 7.45502 12.675ZM7.26752 8.0625V11.355C7.26752 11.4525 7.32752 11.4975 7.36502 11.52C7.40252 11.5425 7.47752 11.565 7.56002 11.5125L8.26502 11.0475C8.70752 10.755 9.27752 10.755 9.71252 11.0475L10.38 11.4975C10.4625 11.55 10.5375 11.5275 10.575 11.505C10.6125 11.4825 10.6725 11.4375 10.6725 11.34V8.055H7.26752V8.0625Z" fill="#2196F3"/>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,11 @@
<svg width="53" height="53" viewBox="0 0 53 53" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M48.0214 45.7899L46.4615 44.2299C47.2631 43.0166 47.7398 41.5432 47.7398 39.9832C47.7398 35.6932 44.2731 32.2266 39.9831 32.2266C35.6931 32.2266 32.2264 35.6932 32.2264 39.9832C32.2264 44.2732 35.6931 47.7399 39.9831 47.7399C41.5648 47.7399 43.0164 47.2632 44.2298 46.4616L45.7898 48.0216C46.0931 48.3249 46.5048 48.4766 46.8948 48.4766C47.3064 48.4766 47.6964 48.3249 47.9998 48.0216C48.6281 47.3932 48.6281 46.3966 48.0214 45.7899Z" fill="#176BAD"/>
<path opacity="0.4" d="M5.20814 32.5081C5.20814 32.5731 5.16479 32.6597 5.16479 32.7247C7.15813 36.7114 10.4081 39.983 14.3948 41.9547C14.4598 41.9547 14.5465 41.9114 14.6115 41.9114C13.8748 39.398 13.3115 36.8197 12.8998 34.2414C10.2998 33.808 7.72147 33.2447 5.20814 32.5081Z" fill="#176BAD"/>
<path opacity="0.4" d="M42.1281 14.7415C40.0915 10.4732 36.6464 7.02818 32.3998 5.01318C33.1798 7.59152 33.8298 10.2349 34.2631 12.8782C36.9064 13.3115 39.5498 13.9398 42.1281 14.7415Z" fill="#176BAD"/>
<path opacity="0.4" d="M4.99146 14.7415C7.59146 13.9615 10.2348 13.3116 12.8782 12.8782C13.3115 10.2999 13.8531 7.74323 14.5898 5.2299C14.5248 5.2299 14.4381 5.18652 14.3731 5.18652C10.2998 7.20152 6.98479 10.6032 4.99146 14.7415Z" fill="#176BAD"/>
<path opacity="0.4" d="M30.7532 12.4232C30.2332 9.60649 29.5832 6.78986 28.6515 4.05986C28.6082 3.90819 28.6082 3.77821 28.5865 3.60487C26.9832 3.21487 25.2931 2.95483 23.5598 2.95483C21.8048 2.95483 20.1365 3.19321 18.5115 3.60487C18.4898 3.75654 18.5115 3.88652 18.4681 4.05986C17.5581 6.78986 16.8865 9.60649 16.3665 12.4232C21.1548 11.9032 25.9648 11.9032 30.7532 12.4232Z" fill="#176BAD"/>
<path opacity="0.4" d="M12.4232 16.3665C9.58482 16.8865 6.78982 17.5365 4.05982 18.4681C3.90816 18.5115 3.77814 18.5115 3.60481 18.5331C3.21481 20.1365 2.95483 21.8265 2.95483 23.5598C2.95483 25.3148 3.19314 26.9831 3.60481 28.6081C3.75647 28.6298 3.88649 28.6082 4.05982 28.6515C6.78982 29.5615 9.58482 30.2332 12.4232 30.7532C11.9032 25.9648 11.9032 21.1548 12.4232 16.3665Z" fill="#176BAD"/>
<path opacity="0.4" d="M43.4931 18.5331C43.3415 18.5331 43.2115 18.5115 43.0381 18.4681C40.3081 17.5581 37.4915 16.8865 34.6748 16.3665C35.2165 21.1548 35.2165 25.9648 34.6748 30.7315C37.4915 30.2115 40.3081 29.5615 43.0381 28.6298C43.1898 28.5865 43.3198 28.6082 43.4931 28.5865C43.8831 26.9615 44.1431 25.2931 44.1431 23.5381C44.1431 21.8264 43.9048 20.1581 43.4931 18.5331Z" fill="#176BAD"/>
<path opacity="0.4" d="M16.3665 34.6965C16.8865 37.5349 17.5365 40.3298 18.4681 43.0598C18.5115 43.2115 18.4898 43.3415 18.5115 43.5148C20.1365 43.9048 21.8048 44.1649 23.5598 44.1649C25.2931 44.1649 26.9832 43.9265 28.5865 43.5148C28.6082 43.3631 28.6082 43.2332 28.6515 43.0598C29.5615 40.3298 30.2332 37.5349 30.7532 34.6965C28.3698 34.9565 25.9648 35.1515 23.5598 35.1515C21.1548 35.1298 18.7498 34.9565 16.3665 34.6965Z" fill="#176BAD"/>
<path opacity="0.4" d="M15.8681 15.8681C15.2181 20.9814 15.2181 26.1381 15.8681 31.2731C20.9814 31.9231 26.1381 31.9231 31.2731 31.2731C31.9231 26.1598 31.9231 21.0031 31.2731 15.8681C26.1381 15.2181 20.9814 15.2181 15.8681 15.8681Z" fill="#176BAD"/>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,9 @@
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.5 9.5C16.5 5.36 13.14 2 9 2C4.86 2 1.5 5.36 1.5 9.5C1.5 13.64 4.86 17 9 17" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6.00001 2.75H6.75001C5.28751 7.13 5.28751 11.87 6.75001 16.25H6.00001" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11.25 2.75C11.9775 4.94 12.345 7.22 12.345 9.5" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2.25 12.5V11.75C4.44 12.4775 6.72 12.845 9 12.845" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2.25 7.24995C6.63 5.78745 11.37 5.78745 15.75 7.24995" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M13.65 16.55C14.9755 16.55 16.05 15.4755 16.05 14.15C16.05 12.8245 14.9755 11.75 13.65 11.75C12.3245 11.75 11.25 12.8245 11.25 14.15C11.25 15.4755 12.3245 16.55 13.65 16.55Z" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16.5 17L15.75 16.25" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

3
assets/icons/heart.svg Normal file
View File

@ -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.465 15.6075C9.21 15.6975 8.79 15.6975 8.535 15.6075C6.36 14.865 1.5 11.7675 1.5 6.51745C1.5 4.19995 3.3675 2.32495 5.67 2.32495C7.035 2.32495 8.2425 2.98495 9 4.00495C9.7575 2.98495 10.9725 2.32495 12.33 2.32495C14.6325 2.32495 16.5 4.19995 16.5 6.51745C16.5 11.7675 11.64 14.865 9.465 15.6075Z" stroke="#2196F3" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 477 B

View File

@ -0,0 +1,7 @@
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.7423 7.78247H5.25732C4.94982 7.78247 4.69482 7.52747 4.69482 7.21997C4.69482 6.91247 4.94982 6.65747 5.25732 6.65747H12.7423C13.0498 6.65747 13.3048 6.91247 13.3048 7.21997C13.3048 7.52747 13.0498 7.78247 12.7423 7.78247Z" fill="#2196F3"/>
<path d="M9 7.78246C8.6925 7.78246 8.4375 7.52746 8.4375 7.21996V5.95996C8.4375 5.65246 8.6925 5.39746 9 5.39746C9.3075 5.39746 9.5625 5.65246 9.5625 5.95996V7.21996C9.5625 7.52746 9.3075 7.78246 9 7.78246Z" fill="#2196F3"/>
<path d="M5.25 13.6024C4.9425 13.6024 4.6875 13.3474 4.6875 13.0399C4.6875 12.7324 4.9425 12.4774 5.25 12.4774C8.04 12.4774 10.3125 10.115 10.3125 7.20496C10.3125 6.89746 10.5675 6.64246 10.875 6.64246C11.1825 6.64246 11.4375 6.89746 11.4375 7.20496C11.4375 10.7375 8.6625 13.6024 5.25 13.6024Z" fill="#2196F3"/>
<path d="M12.7502 13.6024C11.2727 13.6024 9.90017 12.8675 8.89517 11.525C8.70767 11.2775 8.76019 10.925 9.00769 10.7375C9.25519 10.55 9.60768 10.6024 9.79518 10.8499C10.5902 11.8999 11.6402 12.4774 12.7577 12.4774C13.0652 12.4774 13.3202 12.7324 13.3202 13.0399C13.3202 13.3474 13.0577 13.6024 12.7502 13.6024Z" fill="#2196F3"/>
<path d="M11.25 17.5625H6.75C2.6775 17.5625 0.9375 15.8225 0.9375 11.75V7.25C0.9375 3.1775 2.6775 1.4375 6.75 1.4375H11.25C15.3225 1.4375 17.0625 3.1775 17.0625 7.25V11.75C17.0625 15.8225 15.3225 17.5625 11.25 17.5625ZM6.75 2.5625C3.2925 2.5625 2.0625 3.7925 2.0625 7.25V11.75C2.0625 15.2075 3.2925 16.4375 6.75 16.4375H11.25C14.7075 16.4375 15.9375 15.2075 15.9375 11.75V7.25C15.9375 3.7925 14.7075 2.5625 11.25 2.5625H6.75Z" fill="#2196F3"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

5
assets/icons/logout.svg Normal file
View File

@ -0,0 +1,5 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.43 16.7026H11.3325C8.00251 16.7026 6.39751 15.3901 6.12001 12.4501C6.09001 12.1426 6.31501 11.8651 6.63001 11.8351C6.93001 11.8051 7.21501 12.0376 7.24501 12.3451C7.46251 14.7001 8.57251 15.5776 11.34 15.5776H11.4375C14.49 15.5776 15.57 14.4976 15.57 11.4451V6.55511C15.57 3.50261 14.49 2.42261 11.4375 2.42261H11.34C8.55751 2.42261 7.44751 3.31511 7.24501 5.71511C7.20751 6.02261 6.94501 6.25511 6.63001 6.22511C6.31501 6.20261 6.09001 5.92511 6.11251 5.61761C6.36751 2.63261 7.98001 1.29761 11.3325 1.29761H11.43C15.1125 1.29761 16.6875 2.87261 16.6875 6.55511V11.4451C16.6875 15.1276 15.1125 16.7026 11.43 16.7026Z" fill="#B71C1C"/>
<path d="M11.25 9.5625H2.71503C2.40753 9.5625 2.15253 9.3075 2.15253 9C2.15253 8.6925 2.40753 8.4375 2.71503 8.4375H11.25C11.5575 8.4375 11.8125 8.6925 11.8125 9C11.8125 9.3075 11.5575 9.5625 11.25 9.5625Z" fill="#B71C1C"/>
<path d="M4.38752 12.0749C4.24502 12.0749 4.10252 12.0224 3.99002 11.9099L1.47752 9.39738C1.26002 9.17988 1.26002 8.81988 1.47752 8.60238L3.99002 6.08988C4.20752 5.87238 4.56752 5.87238 4.78502 6.08988C5.00252 6.30738 5.00252 6.66738 4.78502 6.88488L2.67002 8.99988L4.78502 11.1149C5.00252 11.3324 5.00252 11.6924 4.78502 11.9099C4.68002 12.0224 4.53002 12.0749 4.38752 12.0749Z" fill="#B71C1C"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,5 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 16.7399C5.79 16.7399 5.57249 16.6874 5.37749 16.5824C4.94999 16.3574 4.6875 15.9074 4.6875 15.4274V14.3625C2.4225 14.13 0.9375 12.4649 0.9375 10.0799V5.57996C0.9375 2.99996 2.67 1.26746 5.25 1.26746H12.75C15.33 1.26746 17.0625 2.99996 17.0625 5.57996V10.0799C17.0625 12.6599 15.33 14.3924 12.75 14.3924H9.92249L6.72748 16.5225C6.50998 16.665 6.255 16.7399 6 16.7399ZM5.25 2.38495C3.315 2.38495 2.0625 3.63745 2.0625 5.57245V10.0725C2.0625 12.0075 3.315 13.26 5.25 13.26C5.5575 13.26 5.8125 13.515 5.8125 13.8225V15.42C5.8125 15.5175 5.8725 15.5625 5.91 15.585C5.9475 15.6075 6.02251 15.63 6.10501 15.5775L9.44252 13.3575C9.53252 13.2975 9.64501 13.26 9.75751 13.26H12.7575C14.6925 13.26 15.945 12.0075 15.945 10.0725V5.57245C15.945 3.63745 14.6925 2.38495 12.7575 2.38495H5.25Z" fill="#2196F3"/>
<path d="M8.99986 9.08252C8.69236 9.08252 8.43736 8.82752 8.43736 8.52002V8.36255C8.43736 7.49255 9.07485 7.06504 9.31485 6.90004C9.59235 6.71254 9.68234 6.58505 9.68234 6.39005C9.68234 6.01505 9.37486 5.70752 8.99986 5.70752C8.62486 5.70752 8.31738 6.01505 8.31738 6.39005C8.31738 6.69755 8.06238 6.95255 7.75488 6.95255C7.44738 6.95255 7.19238 6.69755 7.19238 6.39005C7.19238 5.39255 8.00236 4.58252 8.99986 4.58252C9.99736 4.58252 10.8073 5.39255 10.8073 6.39005C10.8073 7.24505 10.1774 7.67253 9.94487 7.83003C9.65237 8.02503 9.56236 8.15255 9.56236 8.36255V8.52002C9.56236 8.83502 9.30736 9.08252 8.99986 9.08252Z" fill="#2196F3"/>
<path d="M9 10.95C8.685 10.95 8.4375 10.695 8.4375 10.3875C8.4375 10.08 8.6925 9.82495 9 9.82495C9.3075 9.82495 9.5625 10.08 9.5625 10.3875C9.5625 10.695 9.315 10.95 9 10.95Z" fill="#2196F3"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.0199 20.5299C9.68987 20.5299 7.35987 20.1599 5.14987 19.4199C4.30987 19.1299 3.66987 18.5399 3.38987 17.7699C3.09987 16.9999 3.19987 16.1499 3.65987 15.3899L4.80987 13.4799C5.04987 13.0799 5.26987 12.2799 5.26987 11.8099V8.91992C5.26987 5.19992 8.29987 2.16992 12.0199 2.16992C15.7399 2.16992 18.7699 5.19992 18.7699 8.91992V11.8099C18.7699 12.2699 18.9899 13.0799 19.2299 13.4899L20.3699 15.3899C20.7999 16.1099 20.8799 16.9799 20.5899 17.7699C20.2999 18.5599 19.6699 19.1599 18.8799 19.4199C16.6799 20.1599 14.3499 20.5299 12.0199 20.5299ZM12.0199 3.66992C9.12987 3.66992 6.76987 6.01992 6.76987 8.91992V11.8099C6.76987 12.5399 6.46987 13.6199 6.09987 14.2499L4.94987 16.1599C4.72987 16.5299 4.66987 16.9199 4.79987 17.2499C4.91987 17.5899 5.21987 17.8499 5.62987 17.9899C9.80987 19.3899 14.2399 19.3899 18.4199 17.9899C18.7799 17.8699 19.0599 17.5999 19.1899 17.2399C19.3199 16.8799 19.2899 16.4899 19.0899 16.1599L17.9399 14.2499C17.5599 13.5999 17.2699 12.5299 17.2699 11.7999V8.91992C17.2699 6.01992 14.9199 3.66992 12.0199 3.66992Z" fill="#292D32"/>
<path d="M13.8801 3.94018C13.8101 3.94018 13.7401 3.93018 13.6701 3.91018C13.3801 3.83018 13.1001 3.77018 12.8301 3.73018C11.9801 3.62018 11.1601 3.68018 10.3901 3.91018C10.1101 4.00018 9.81011 3.91018 9.62011 3.70018C9.43011 3.49018 9.37011 3.19018 9.48011 2.92018C9.89011 1.87018 10.8901 1.18018 12.0301 1.18018C13.1701 1.18018 14.1701 1.86018 14.5801 2.92018C14.6801 3.19018 14.6301 3.49018 14.4401 3.70018C14.2901 3.86018 14.0801 3.94018 13.8801 3.94018Z" fill="#292D32"/>
<path d="M12.02 22.8101C11.03 22.8101 10.07 22.4101 9.37002 21.7101C8.67002 21.0101 8.27002 20.0501 8.27002 19.0601H9.77002C9.77002 19.6501 10.01 20.2301 10.43 20.6501C10.85 21.0701 11.43 21.3101 12.02 21.3101C13.26 21.3101 14.27 20.3001 14.27 19.0601H15.77C15.77 21.1301 14.09 22.8101 12.02 22.8101Z" fill="#292D32"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

3
assets/icons/shield.svg Normal file
View File

@ -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="M8.99999 17.07C8.18249 17.07 7.37249 16.83 6.73499 16.3575L3.50999 13.95C2.65499 13.3125 1.98749 11.9775 1.98749 10.92V5.33996C1.98749 4.18496 2.83499 2.95496 3.92249 2.54996L7.66499 1.14746C8.40749 0.869956 9.57749 0.869956 10.32 1.14746L14.0625 2.54996C15.15 2.95496 15.9975 4.18496 15.9975 5.33996V10.9125C15.9975 11.9775 15.33 13.305 14.475 13.9425L11.25 16.35C10.6275 16.83 9.81749 17.07 8.99999 17.07ZM8.06249 2.20496L4.31999 3.60746C3.68249 3.84746 3.11999 4.65746 3.11999 5.34746V10.92C3.11999 11.6325 3.62249 12.63 4.18499 13.05L7.40999 15.4575C8.27249 16.1025 9.72749 16.1025 10.5975 15.4575L13.8225 13.05C14.3925 12.6225 14.8875 11.6325 14.8875 10.92V5.33996C14.8875 4.65746 14.325 3.84746 13.6875 3.59996L9.94499 2.19746C9.43499 2.01746 8.56499 2.01746 8.06249 2.20496Z" fill="#2196F3"/>
</svg>

After

Width:  |  Height:  |  Size: 912 B

View File

@ -78,6 +78,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/back.svg
SvgGenImage get back => const SvgGenImage('assets/icons/back.svg');
/// File path: assets/icons/brush.svg
SvgGenImage get brush => const SvgGenImage('assets/icons/brush.svg');
/// File path: assets/icons/calendar-tick 2.svg
SvgGenImage get calendarTick2 =>
const SvgGenImage('assets/icons/calendar-tick 2.svg');
@ -128,10 +131,17 @@ class $AssetsIconsGen {
/// File path: assets/icons/down.svg
SvgGenImage get down => const SvgGenImage('assets/icons/down.svg');
/// File path: assets/icons/edit prof.svg
SvgGenImage get editProf => const SvgGenImage('assets/icons/edit prof.svg');
/// File path: assets/icons/element-equal.svg
SvgGenImage get elementEqual =>
const SvgGenImage('assets/icons/element-equal.svg');
/// File path: assets/icons/empty-wallet.svg
SvgGenImage get emptyWallet =>
const SvgGenImage('assets/icons/empty-wallet.svg');
/// File path: assets/icons/favorite.svg
SvgGenImage get favorite => const SvgGenImage('assets/icons/favorite.svg');
@ -161,14 +171,28 @@ class $AssetsIconsGen {
/// File path: assets/icons/game.svg
SvgGenImage get game => const SvgGenImage('assets/icons/game.svg');
/// File path: assets/icons/gift.svg
SvgGenImage get gift => const SvgGenImage('assets/icons/gift.svg');
/// File path: assets/icons/girl_clothes.svg
SvgGenImage get girlClothes =>
const SvgGenImage('assets/icons/girl_clothes.svg');
/// File path: assets/icons/global-search.svg
SvgGenImage get globalSearch =>
const SvgGenImage('assets/icons/global-search.svg');
/// File path: assets/icons/global-search2.svg
SvgGenImage get globalSearch2 =>
const SvgGenImage('assets/icons/global-search2.svg');
/// File path: assets/icons/healthicons_fruits-outline.svg
SvgGenImage get healthiconsFruitsOutline =>
const SvgGenImage('assets/icons/healthicons_fruits-outline.svg');
/// File path: assets/icons/heart.svg
SvgGenImage get heart => const SvgGenImage('assets/icons/heart.svg');
/// File path: assets/icons/hugeicons_baby-boy-dress.svg
SvgGenImage get hugeiconsBabyBoyDress =>
const SvgGenImage('assets/icons/hugeicons_baby-boy-dress.svg');
@ -188,6 +212,10 @@ class $AssetsIconsGen {
SvgGenImage get ionFastFoodOutline =>
const SvgGenImage('assets/icons/ion_fast-food-outline.svg');
/// File path: assets/icons/language-square.svg
SvgGenImage get languageSquare =>
const SvgGenImage('assets/icons/language-square.svg');
/// File path: assets/icons/like.svg
SvgGenImage get like => const SvgGenImage('assets/icons/like.svg');
@ -200,6 +228,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/location.svg
SvgGenImage get location => const SvgGenImage('assets/icons/location.svg');
/// File path: assets/icons/logout.svg
SvgGenImage get logout => const SvgGenImage('assets/icons/logout.svg');
/// File path: assets/icons/map selected.svg
SvgGenImage get mapSelected =>
const SvgGenImage('assets/icons/map selected.svg');
@ -235,6 +266,10 @@ class $AssetsIconsGen {
SvgGenImage get materialSymbolsLocationWork =>
const SvgGenImage('assets/icons/material-symbols_location-work.svg');
/// File path: assets/icons/message-question.svg
SvgGenImage get messageQuestion =>
const SvgGenImage('assets/icons/message-question.svg');
/// File path: assets/icons/microphone-2.svg
SvgGenImage get microphone2 =>
const SvgGenImage('assets/icons/microphone-2.svg');
@ -252,6 +287,10 @@ class $AssetsIconsGen {
SvgGenImage get notificationBing =>
const SvgGenImage('assets/icons/notification-bing.svg');
/// File path: assets/icons/notification.svg
SvgGenImage get notification =>
const SvgGenImage('assets/icons/notification.svg');
/// File path: assets/icons/ph_cheese.svg
SvgGenImage get phCheese => const SvgGenImage('assets/icons/ph_cheese.svg');
@ -296,6 +335,9 @@ class $AssetsIconsGen {
SvgGenImage get selectedList =>
const SvgGenImage('assets/icons/selected list.svg');
/// File path: assets/icons/shield.svg
SvgGenImage get shield => const SvgGenImage('assets/icons/shield.svg');
/// File path: assets/icons/shopping-cart.svg
SvgGenImage get shoppingCart =>
const SvgGenImage('assets/icons/shopping-cart.svg');
@ -367,6 +409,7 @@ class $AssetsIconsGen {
arrowRight,
arrowUp,
back,
brush,
calendarTick2,
calendarTick,
camera2,
@ -382,7 +425,9 @@ class $AssetsIconsGen {
deliveryOn,
dislike,
down,
editProf,
elementEqual,
emptyWallet,
favorite,
flatColorIconsIdea,
flatColorIconsPlanner,
@ -391,17 +436,23 @@ class $AssetsIconsGen {
game2,
gameIconsWinterGloves,
game,
gift,
girlClothes,
globalSearch,
globalSearch2,
healthiconsFruitsOutline,
heart,
hugeiconsBabyBoyDress,
hugeiconsCheeseCake01,
icRoundLocalOffer,
infoPic,
ionFastFoodOutline,
languageSquare,
like,
link2,
list,
location,
logout,
mapSelected,
map,
materialSymbolsLocationAir,
@ -411,11 +462,13 @@ class $AssetsIconsGen {
materialSymbolsLocationOn,
materialSymbolsLocationOnn,
materialSymbolsLocationWork,
messageQuestion,
microphone2,
nearby,
nearby2,
next,
notificationBing,
notification,
phCheese,
phQrCode,
pickUpOff,
@ -429,6 +482,7 @@ class $AssetsIconsGen {
routing2,
routing,
selectedList,
shield,
shoppingCart,
slide2,
slide3,

View File

@ -25,4 +25,5 @@ class LightAppColors{
static const textPrice = Color.fromARGB(255, 85, 84, 81);
static const deliverySelectedButton = Color.fromARGB(255, 237, 247, 238);
static const loadingBorder = Color.fromARGB(255, 239, 239, 239);
static const profileField = Color.fromARGB(255, 252, 252, 252);
}

View File

@ -5,7 +5,6 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:dots_indicator/dots_indicator.dart';
import 'package:lba/gen/assets.gen.dart';
import 'package:lba/res/colors.dart';
import 'package:lba/widgets/customBottomSheet.dart';
import 'package:lba/widgets/remainingTime.dart';
import 'package:lba/widgets/search_bar.dart';

View File

@ -25,7 +25,6 @@ class _BestnearbyState extends State<Bestnearby>
duration: const Duration(milliseconds: 1500),
);
// --- انیمیشنهای مرحلهای برای هر بخش ---
_staggeredAnimations = List.generate(3, (index) {
return Tween<double>(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
@ -48,7 +47,6 @@ class _BestnearbyState extends State<Bestnearby>
super.dispose();
}
// --- ویجت انیمیشنی برای هر بخش ---
Widget _buildAnimatedSection(Widget child, int index) {
return FadeTransition(
opacity: _staggeredAnimations[index],

View File

@ -1,10 +1,444 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:lba/gen/assets.gen.dart';
import 'package:lba/res/colors.dart';
class Profile extends StatelessWidget {
class Profile extends StatefulWidget {
const Profile({super.key});
@override
State<Profile> createState() => _ProfileState();
}
class _ProfileState extends State<Profile> with TickerProviderStateMixin {
bool _isDarkMode = false;
late AnimationController _animationController;
late List<Animation<double>> _animations;
@override
void initState() {
super.initState();
_animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 1200),
);
const int itemCount = 12;
_animations = List.generate(itemCount, (index) {
final double startTime = (index / itemCount) * 0.6;
final double endTime = (startTime + 0.4).clamp(0.0, 1.0);
return Tween<double>(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: _animationController,
curve: Interval(
startTime,
endTime,
curve: Curves.easeOutCubic,
),
),
);
});
_animationController.forward();
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
Widget _buildAnimatedWidget(Widget child, int index) {
if (index >= _animations.length) return child;
final slideAnimation = Tween<Offset>(
begin: const Offset(0.0, 0.5),
end: Offset.zero,
).animate(_animations[index]);
return FadeTransition(
opacity: _animations[index],
child: SlideTransition(
position: slideAnimation,
child: child,
),
);
}
@override
Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
backgroundColor: Colors.white,
appBar: PreferredSize(
preferredSize: const Size.fromHeight(kToolbarHeight + 1),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(18),
bottomRight: Radius.circular(18),
),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 10,
offset: const Offset(0, 4),
),
],
),
child: AppBar(
surfaceTintColor: Colors.white,
backgroundColor: Colors.transparent,
elevation: 0,
centerTitle: true,
title: const Text(
'Profile',
style: TextStyle(
color: Colors.black,
fontSize: 17,
fontWeight: FontWeight.w600,
),
),
),
),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildAnimatedWidget(_SectionTitle(title: 'General'), 0),
_buildAnimatedWidget(
_buildSectionContainer(
child: Column(
children: [
_buildInfoTile(
icon: SvgPicture.asset(Assets.icons.globalSearch2.path, width: 22),
title: 'Country',
trailing: const Text(
'United Arab Emirates',
style: TextStyle(
color: LightAppColors.primary,
fontSize: 15,
fontWeight: FontWeight.w500),
),
),
_buildInfoTile(
icon: SvgPicture.asset(Assets.icons.languageSquare.path, width: 22),
title: 'Language',
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset(Assets.images.usa.path, width: 24),
const SizedBox(width: 8),
const Text('English',
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,
color: Colors.black)),
const SizedBox(width: 8),
SvgPicture.asset(Assets.icons.arrowRight.path, color: Colors.black)
],
),
),
_buildSwitchTile(
icon: SvgPicture.asset(Assets.icons.brush.path, width: 22),
title: 'Dark mode',
value: _isDarkMode,
onChanged: (value) => setState(() => _isDarkMode = value),
),
],
),
),
1,
),
const SizedBox(height: 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.editProf.path, width: 22),
title: 'Edit Profile'),
),
2),
const SizedBox(height: 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.notification.path, color: LightAppColors.primary, width: 22),
title: 'Notifications'),
),
3),
const SizedBox(height: 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.emptyWallet.path, width: 22),
title: 'Transactions & Wallets'),
),
4),
const SizedBox(height: 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.gift.path, width: 22),
title: 'Exclusive Perks'),
),
5),
const SizedBox(height: 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.cardPos.path, color: LightAppColors.primary, width: 22),
title: 'Payment methods'),
),
6),
const SizedBox(height: 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.heart.path, width: 22),
title: 'Favorite Stores'),
),
7),
const SizedBox(height: 24),
_buildAnimatedWidget(_SectionTitle(title: 'Preferences'), 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.shield.path, width: 22),
title: 'Legal & Policies'),
),
9),
const SizedBox(height: 8),
_buildAnimatedWidget(
PressableListItem(
child: _buildDecoratedNavigationTile(
icon: SvgPicture.asset(Assets.icons.messageQuestion.path, width: 22),
title: 'Help & Support'),
),
10),
const SizedBox(height: 8),
_buildAnimatedWidget(PressableListItem(child: _buildLogoutButton()), 11),
const SizedBox(height: 85),
],
),
),
),
);
}
Widget _buildSectionContainer({required Widget child}) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: child,
);
}
Widget _buildInfoTile(
{required Widget icon, required String title, required Widget trailing}) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Row(
children: [
icon,
const SizedBox(width: 16),
Expanded(
child: Text(title,
style: const TextStyle(
fontSize: 16, fontWeight: FontWeight.w500, color: Colors.black))),
trailing,
],
),
);
}
Widget _buildSwitchTile(
{required Widget icon,
required String title,
required bool value,
required ValueChanged<bool> onChanged}) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 2.0),
child: Row(
children: [
icon,
const SizedBox(width: 16),
Expanded(
child: Text(title,
style: const TextStyle(
fontSize: 16, fontWeight: FontWeight.w500))),
Transform.scale(
scale: 0.75,
child: Switch(
value: value,
onChanged: onChanged,
activeColor: const Color(0xFF34C759),
activeTrackColor: const Color(0xFF34C759).withOpacity(0.5),
inactiveThumbColor: Colors.white,
inactiveTrackColor: const Color.fromARGB(57, 141, 141, 141),
),
),
],
),
);
}
Widget _buildDecoratedNavigationTile(
{required Widget icon, required String title}) {
return Container(
decoration: BoxDecoration(
color: LightAppColors.profileField,
borderRadius: BorderRadius.circular(14),
border: Border.all(color: LightAppColors.divider, width: 0.5),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 17),
child: Row(
children: [
icon,
const SizedBox(width: 16),
Expanded(
child: Text(title,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Colors.black))),
SvgPicture.asset(Assets.icons.arrowRight.path, color: Colors.black)
],
),
),
);
}
Widget _buildLogoutButton() {
return Container(
decoration: BoxDecoration(
color: LightAppColors.profileField,
borderRadius: BorderRadius.circular(14),
border: Border.all(color: LightAppColors.divider, width: 0.5),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Row(
children: [
SvgPicture.asset(
Assets.icons.logout.path,
width: 22,
),
const SizedBox(width: 16),
const Expanded(
child: Text(
'Logout',
style: TextStyle(
color: LightAppColors.allReviewOpener,
fontSize: 16,
fontWeight: FontWeight.w500),
),
),
],
),
),
);
}
}
// ویجت برای افکت لمس
class PressableListItem extends StatefulWidget {
final Widget child;
const PressableListItem({super.key, required this.child});
@override
State<PressableListItem> createState() => _PressableListItemState();
}
class _PressableListItemState extends State<PressableListItem>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _scaleAnimation;
@override
void initState() {
super.initState();
_controller = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 150),
reverseDuration: const Duration(milliseconds: 300),
);
_scaleAnimation = Tween<double>(begin: 1.0, end: 0.97).animate(
CurvedAnimation(parent: _controller, curve: Curves.easeOut),
);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
void _onTapDown(TapDownDetails details) {
_controller.forward();
}
void _onTapUp(TapUpDetails details) {
Future.delayed(const Duration(milliseconds: 100), () {
if(mounted) {
_controller.reverse();
}
});
}
void _onTapCancel() {
_controller.reverse();
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTapDown: _onTapDown,
onTapUp: _onTapUp,
onTapCancel: _onTapCancel,
onTap: () {},
child: ScaleTransition(
scale: _scaleAnimation,
child: widget.child,
),
);
}
}
class _SectionTitle extends StatelessWidget {
final String title;
const _SectionTitle({required this.title});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(bottom: 12.0, top: 8.0, left: 12.0),
child: Text(
title,
style: const TextStyle(
fontSize: 17,
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
);
}
}

View File

@ -97,8 +97,16 @@ class _CoolSplashScreenState extends State<CoolSplashScreen>
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color.lerp(const Color(0xFFF5F5F5), const Color(0xFFE0E0E0), _backgroundAnimation.value)!,
Color.lerp(const Color(0xFFFFFFFF), const Color(0xFFF5F5F5), _backgroundAnimation.value)!,
Color.lerp(
const Color(0xFFF5F5F5),
const Color(0xFFE0E0E0),
_backgroundAnimation.value,
)!,
Color.lerp(
const Color(0xFFFFFFFF),
const Color(0xFFF5F5F5),
_backgroundAnimation.value,
)!,
],
),
),
@ -108,13 +116,16 @@ class _CoolSplashScreenState extends State<CoolSplashScreen>
Particle(
animation: _particlesAnimation,
size: Random().nextDouble() * 5 + 2,
color: Colors.blueGrey.withOpacity(Random().nextDouble() * 0.3 + 0.1),
color: Colors.blueGrey.withOpacity(
Random().nextDouble() * 0.3 + 0.1,
),
alignment: Alignment(
(Random().nextDouble() * 2 - 1) * (2 - _particlesAnimation.value),
(Random().nextDouble() * 2 - 1) * (2 - _particlesAnimation.value),
(Random().nextDouble() * 2 - 1) *
(2 - _particlesAnimation.value),
(Random().nextDouble() * 2 - 1) *
(2 - _particlesAnimation.value),
),
),
Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -163,10 +174,7 @@ class Particle extends StatelessWidget {
child: Container(
width: size,
height: size,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
),
decoration: BoxDecoration(color: color, shape: BoxShape.circle),
),
),
);