feat: add more detail for arch

This commit is contained in:
Yashar Panahi
2025-08-02 14:44:48 +03:30
parent 64c4ebf0f8
commit 24e14b325a
7 changed files with 461 additions and 41 deletions
+26
View File
@@ -0,0 +1,26 @@
class AppConfig {
// این فلگ نشان می‌دهد که آیا برنامه در حالت Development است یا خیر.
// می‌توانید این مقدار را با استفاده از environment variables در زمان بیلد تغییر دهید.
static const bool isDevelopment = true;
static const Duration connectTimeout = Duration(seconds: 15);
static const Duration receiveTimeout = Duration(seconds: 15);
// این متد بر اساس محیط فعال، URL مناسب را برمی‌گرداند.
static String get apiBaseUrl {
if (isDevelopment) {
return 'https://api.dev.your-app.com';
} else {
return 'https://api.prod.your-app.com';
}
}
// کلیدهای حساس را به این شکل مدیریت کنید
static String get apiKey {
if (isDevelopment) {
return 'dev-api-key-123';
} else {
return 'prod-api-key-456';
}
}
}
+21
View File
@@ -0,0 +1,21 @@
import 'package:flutter/material.dart';
class AppColors {
// Primary Colors
static const Color primaryColor = Color(0xFF007BFF);
static const Color accentColor = Color(0xFFE83E8C);
// Backgrounds
static const Color lightBackgroundColor = Color(0xFFF8F9FA);
static const Color darkBackgroundColor = Color(0xFF343A40);
// Text Colors
static const Color primaryTextColor = Color(0xFF212529);
static const Color secondaryTextColor = Color(0xFF6C757D);
static const Color linkTextColor = primaryColor;
// Status Colors
static const Color successColor = Color(0xFF28A745);
static const Color errorColor = Color(0xFFDC3545);
static const Color warningColor = Color(0xFFFFC107);
}
+17
View File
@@ -0,0 +1,17 @@
class AppStrings {
// App Titles
static const String appName = 'My Awesome App';
static const String loginTitle = 'Welcome Back';
// Labels and Buttons
static const String loginButton = 'Sign In';
static const String signupButton = 'Create Account';
static const String forgotPassword = 'Forgot Password?';
static const String emailHint = 'Email address';
static const String passwordHint = 'Password';
// Error Messages
static const String loginFailed =
'Login failed. Please check your credentials.';
static const String networkError = 'Network error. Please try again.';
}
+1 -2
View File
@@ -1,6 +1,5 @@
import 'package:tm_app/core/utils/result.dart';
import '../../core/utils/app_exceptions.dart';
import '../../core/utils/result.dart';
import '../models/user_model.dart';
import '../services/auth_service.dart';